similar to: [LLVMdev] Help with using LLVM to re-compile hot functions at run-time

Displaying 20 results from an estimated 6000 matches similar to: "[LLVMdev] Help with using LLVM to re-compile hot functions at run-time"

2015 Jul 20
2
[LLVMdev] Help with using LLVM to re-compile hot functions at run-time
Hello Lang, Thanks for your answer. I am now looking for an example of the usage of CompileOnDemandLayer. Is there an example available for that (could not find one in llvm/examples)? Thanks, Revital From: Lang Hames <lhames at gmail.com> To: Revital1 Eres/Haifa/IBM at IBMIL Cc: LLVM Developers Mailing List <llvmdev at cs.uiuc.edu> Date: 10/07/2015 12:10 AM Subject:
2015 Jul 20
0
[LLVMdev] Help with using LLVM to re-compile hot functions at run-time
Hi Revital, The CompileOnDemand layer is used by the lazy bitcode JIT in the lli tool. You can find the code in llvm/tools/lli/OrcLazyJIT.* . Cheers, Lang. On Mon, Jul 20, 2015 at 2:32 AM, Revital1 Eres <ERES at il.ibm.com> wrote: > Hello Lang, > > Thanks for your answer. > > I am now looking for an example of the usage of CompileOnDemandLayer. Is > there an example
2015 Jul 27
15
[LLVMdev] Help with using LLVM to re-compile hot functions at run-time
Hi Again, I'm a little confused regarding what is the exact Orc's functions I should use in order to save the functions code in a code cache so it could be later replaced with different versions of it and I appreciate your help. Just a reminder I want to dynamically recompile the program based on profile collected at the run-time. I would like to start executing the program from the
2015 Jul 28
0
[LLVMdev] Help with using LLVM to re-compile hot functions at run-time
Hi Revital, What do you mean by "code cache"? Orc (and MCJIT) does have the concept of an ObjectCache, which is a long-lived, potentially persistent, compiled version of some IR. It's not a key component of the JIT though: Most clients run without a cache attached and just JIT their code from scratch in each session. Recompilation is orthogonal to caching. There is no in-tree
2016 Mar 29
0
MCJIT versus Orc
Russell Wallace via llvm-dev <llvm-dev at lists.llvm.org> writes: > When writing a JIT compiler using LLVM, as I understand it, you can use two > alternative APIs, MCJIT and Orc. The latter offers lazy compilation. Would > it be accurate to say that if you want eager compilation - always compile > an entire module upfront - you should use MCJIT? +lang. My understanding is that
2016 Mar 29
1
MCJIT versus Orc
Right, but is there any known use case where Orc's flexibility allows something to be done that couldn't be with MCJIT, apart from lazy compilation? On Wed, Mar 30, 2016 at 12:19 AM, Justin Bogner <mail at justinbogner.com> wrote: > Russell Wallace via llvm-dev <llvm-dev at lists.llvm.org> writes: > > When writing a JIT compiler using LLVM, as I understand it, you
2016 Mar 29
2
MCJIT versus Orc
When writing a JIT compiler using LLVM, as I understand it, you can use two alternative APIs, MCJIT and Orc. The latter offers lazy compilation. Would it be accurate to say that if you want eager compilation - always compile an entire module upfront - you should use MCJIT? -------------- next part -------------- An HTML attachment was scrubbed... URL:
2016 Jul 29
2
Memory usage with MCJit
Hi Koffie, I'd highly recommend switching to ORC from MCJIT. It is much more flexible when it comes to memory-management. 1. I took the approach of 1 execution engine with multiple modules (I'm not > removing modules once they have been added). During profiling, I noticed > that the memory usage is high with a lot of code. How can I reduce the > memory usage? Is one execution
2018 Sep 15
4
LLVMContext: Threads and Ownership.
Hi All, ORC's new concurrent compilation model generates some interesting lifetime and thread safety questions around LLVMContext: We need multiple LLVMContexts (one per module in the simplest case, but at least one per thread), and the lifetime of each context depends on the execution path of the JIT'd code. We would like to deallocate contexts once all modules associated with them have
2016 May 12
2
Orc/MCJIT: Relocations vs pointers to functions
Thanks! Currently using MCJIT. But migration to ORC is on my TODO list. - Paweł On Thu, May 12, 2016 at 8:30 PM Lang Hames <lhames at gmail.com> wrote: > Hi Pawel, > > Option (1) and (3) are very similar, but using custom resolution (option > 3) guarantees that JIT'd code can't accidentally end up depending on > functions in your JIT that you didn't mean to
2016 Aug 17
4
JITted code and thread-local storage
Hello, Am I right in thinking that MCJIT doesn't support thread-local variables (at least not on Linux x86-64)? Is there any plan or pending PR to support it (either in MCJIT or in ORC)? Thank you, Regards Antoine.
2016 Jul 25
0
Memory usage with MCJit
+Lang for JIT things. On Sun, Jul 24, 2016 at 8:50 AM koffie drinker via llvm-dev < llvm-dev at lists.llvm.org> wrote: > Hi all, > > I'm building a runtime that can jit and execute code. I've followed the > kaleidoscope tutorial and had a couple of questions. Basically I have a > pre-compiler that compiles the code to cache objects. These cached objects > are
2018 Jun 14
3
runStaticConstructorsDestructors() causes crash on exit
Greetings, LLVM wizards. I am using clang to compile a C++ module, and an ExecutionEngine (MCJIT) to execute a function it defines. That works (or pretends to). However, if I call the module's constructors first: exec_engine->runStaticConstructorsDestructors(false); exec_engine->runFunctionAsMain(function, argvec, NULL); execution still works, but my program crashes when it exits, in
2018 Jun 19
2
runStaticConstructorsDestructors() causes crash on exit
On Alex's advice I am switching from MCJIT to the Orc API to compile and execute functions. Starting from the new clang-interpreter example in the source code (top of the tree!), I am able to execute my functions all right... as long as there are no constructors and destructors to call. My question: is there a simple way, with the Orc API, to run a module's constructors and destructors? I
2019 Jan 05
2
Undefined symbols with inline functions using the ORC JIT on Linux
Hi Stefan, Thanks for your reply. I tried running my simple example on Linux using lli and it does work fine. So I think the best long-term solution is to migrate my code to the new lazy orc jit. Unfortunately, even the simplest example does not work on Windows: int main() { return 0; } This is the output: JITDylib "<main>" (ES: 0x000001b6e4ad3670): Search order: [
2016 May 11
2
Orc/MCJIT: Relocations vs pointers to functions
Hi LLVM, Lang. I'm looking for a advice here. And I truly understand very little what the relocations are and how they work. The problem I want to solve is the case where a jitted code has to call back the host application to query additional data. I can think of 3 possible solutions: 1. Use built-in relocation resolver (in default memory manager?) and allow the JIT to find the
2018 Jun 21
2
runStaticConstructorsDestructors() causes crash on exit
When OrcMCJITReplacement is given a new module, it asks for the module's constructors, gives them names like $static_ctor.0, $static_ctor.1, etc., and saves the mangled names in a map. Later, to execute them, it uses runViaLayer(), which looks for those symbol names in the given JIT layer. Could one not simply execute the constructors straight away, rather than naming them and looking them up
2019 Jun 27
2
Questions about moving from MCJIT to Orc JIT
Nice! Let me try to answer some questions, Before that I have to mention this is ORC version 2 APIs and this is where the project is moving forward. JITDylib is the symbol table, basically for a JIT Symbol it have an associated materializers, (you can think of it like an entity that generate the address for that symbol), Example: compiler are materializers. So to add symbols to your own JIT you
2019 Jun 27
2
Questions about moving from MCJIT to Orc JIT
Hi Bjoern, CC'ing Lang hames For questions, 1. In short yes, you can replace the memory manager, default one provided is section memory manager. 2. If you mean by " address of already compiled code", yes you can do that. Like this JITDylib.define(absoluteSymbols, ( Your_own_symbol , JITTargetAddress(Address of function))), now ORC can resolve all the references to Your_own_symbol
2015 Mar 13
4
[LLVMdev] Thoughts about ExecutionEngine/MCJIT interface
Hi, I think ExecutionEngine as a common interface for both Interpreter and MCJIT is almost useless in the current form. There are separated methods in ExecutionEngine for similar or the same features provided by Interpreter and MCJIT, i.e. to get a pointer to function you should call getPointerToFunction() for Interpreter or getFunctionAddress() for MCJIT. Personally, I'm using MCJIT and