search for: installlazyfunctioncr

Displaying 20 results from an estimated 25 matches for "installlazyfunctioncr".

2009 Jan 13
0
[LLVMdev] Crash when using InstallLazyFunctionCreator and JIT on Linux x64.
Hi everyone, I'm running into a problem using JIT compilation on Linux x86-64. LLVM revision is 62079. I've installed a lazy function creator using InstallLazyFunctionCreator(). I return the value 0x5ce64e from my lazyFunctionCreator function. However, the disassembled JIT'd function looks like this: 0x00007f45ef2b6018: sub $0x8,%rsp 0x00007f45ef2b601c: mov $0x7f45ef2b6010,%rax 0x00007f45ef2b6026: movss (%rax,%riz,1),%xmm0 0x00007f45ef2b602b:...
2012 Nov 25
2
[LLVMdev] MCJIT and Lazy Function Creators
Out of curiosity, I'm replacing the JIT with MCJIT on my compiler. As all "external" functions are provided by the language's FFI mechanism, it does MyExecutionEngine->DisableSymbolSearching(); MyExecutionEngine->InstallLazyFunctionCreator(&MyLazyFunctionCreator); which works fine with the JIT. However, MCJIT insists on resolving unknown symbols by searching them outdoors and seems oblivious of the existence of MyLazyFunctionCreator. Is this a bug? Is there a workaround, other than subclassing JITMemoryManager and impleme...
2012 Nov 27
0
[LLVMdev] MCJIT and Lazy Function Creators
...t;ofv at wanadoo.es> writes: > Out of curiosity, I'm replacing the JIT with MCJIT on my compiler. As > all "external" functions are provided by the language's FFI mechanism, > it does > > MyExecutionEngine->DisableSymbolSearching(); > MyExecutionEngine->InstallLazyFunctionCreator(&MyLazyFunctionCreator); > > which works fine with the JIT. However, MCJIT insists on resolving > unknown symbols by searching them outdoors and seems oblivious of the > existence of MyLazyFunctionCreator. > > Is this a bug? > > Is there a workaround, other than sub...
2014 May 23
2
[LLVMdev] Selectively Jitting using MCJIT
...the program and then load it into the jit. My question is then what would be a good way to callback into the jit for applying the optimisation passes before calling one of the function? My current idea is to make the function extern in the llvm IR prior to static compile, and then use "installLazyFunctionCreator" to generate this function by loading ircode from an isolated module. Is this a feasible approach?
2014 May 23
4
[LLVMdev] Selectively Jitting using MCJIT
...t;> My question is then what would be a good way to callback into the >> jit for applying the optimisation passes before calling one of the >> function? My current idea is to make the function extern in the >> llvm IR prior to static compile, and then use >> "installLazyFunctionCreator" to generate this function by loading >> ircode from an isolated module. Is this a feasible approach? >> > > What you can do is to isolate the function you want to jit by > extracting it to a new module. Load this module during runtime, > apply your pass and...
2009 Oct 16
3
[LLVMdev] MallocInst/CallInst bitcast,
On Oct 16, 2009, at 4:43 AM, Daniel Waterworth wrote: > Never mind, I used ExecutionEngine's InstallLazyFunctionCreator and > DisableSymbolSearching to cause malloc and free calls to be handled > by my logging functions. Sorry for the unnecessary list mail. No problem, this is a better way to go. The MallocInst and FreeInst instructions are about to be removed from LLVM IR. Malloc and free will...
2010 Jul 19
2
[LLVMdev] JIT crash takes down host-application
...r function call that the enclosing > program could, even _exit(). You can try to restrict function calls by > removing the name resolution: > > > > http://llvm.org/doxygen/classllvm_1_1ExecutionEngine.html#af062585affb7cd16bab9867b706ea460 > > and/or installing your own (see InstallLazyFunctionCreator), but ultimately > they're the same process/task from the point of view of the operating system > and there's no "llvm security model" or anything like that. > > If you're very determined, you could create an LLVM IR transformation pass > which checks every...
2009 Oct 16
0
[LLVMdev] MallocInst/CallInst bitcast,
Never mind, I used ExecutionEngine's InstallLazyFunctionCreator and DisableSymbolSearching to cause malloc and free calls to be handled by my logging functions. Sorry for the unnecessary list mail. Is it possible to find out the size and beginning pointer of the current stack frame, from a function operating outside of the virtual machine, but called by a...
2010 Apr 17
2
[LLVMdev] Parsing (and compiling) on demand.
Hi! I'm trying to develop JIT compiler using LLVM as its backend. I know LLVM itself supports JIT-compiling, but I need to generate IR first. I don't want to generate IR before function is actually needed. How can I achieve this? If it matters, I have prototypes for all functions I'm going to use. Best regards, Milovanov Victor.
2010 Apr 17
0
[LLVMdev] Parsing (and compiling) on demand.
...as its backend. I know > LLVM itself supports JIT-compiling, but I need to generate IR first. > I don't want to generate IR before function is actually needed. How > can I achieve this? > If it matters, I have prototypes for all functions I'm going to use. See ExecutionEngine::InstallLazyFunctionCreator(). http://llvm.org/doxygen/classllvm_1_1ExecutionEngine.html#6a126d6cd1fa07a4331179597de0c46a Nick
2010 Apr 17
2
[LLVMdev] Parsing (and compiling) on demand.
Ok than, but how to insert a call to an undefined function? > See ExecutionEngine::InstallLazyFunctionCreator(). > http://llvm.org/doxygen/classllvm_1_1ExecutionEngine.html#6a126d6cd1fa07a4331179597de0c46a > > Nick >
2010 Apr 17
0
[LLVMdev] Parsing (and compiling) on demand.
So you mean that is not the way. But what is InstallLazyFunctionCreator for? 2010/4/17 Kenneth Uildriks <kennethuil at gmail.com>: > On Sat, Apr 17, 2010 at 2:15 PM, Nick Lewycky <nicholas at mxc.ca> wrote: >> lost wrote: >>> Ok than, but how to insert a call to an undefined function? >> >> You need to have the function d...
2010 Apr 17
2
[LLVMdev] Parsing (and compiling) on demand.
On Sat, Apr 17, 2010 at 2:15 PM, Nick Lewycky <nicholas at mxc.ca> wrote: > lost wrote: >> Ok than, but how to insert a call to an undefined function? > > You need to have the function declaration and insert a call to that. > Once your LazyFunctionCreator is called, you fill in the body and call > JIT->getPointerToFunction() on it and return that result. > > I
2009 Oct 16
2
[LLVMdev] MallocInst/CallInst bitcast,
Hello, I'm writing a virtual machine that functions as a sandbox based on llvm. In order to prevent programs from accessing memory that has not been allocated to them, I want to replace calls to malloc and free with calls to a logged functions that will record the memory that is being allocated to the program. Is it possible to cast/convert a MallocInst or FreeInst to a CallInst? Thanks,
2010 Jul 18
0
[LLVMdev] JIT crash takes down host-application
...ree to make any memory operation or function call that the enclosing program could, even _exit(). You can try to restrict function calls by removing the name resolution: http://llvm.org/doxygen/classllvm_1_1ExecutionEngine.html#af062585affb7cd16bab9867b706ea460 and/or installing your own (see InstallLazyFunctionCreator), but ultimately they're the same process/task from the point of view of the operating system and there's no "llvm security model" or anything like that. If you're very determined, you could create an LLVM IR transformation pass which checks every load/store/call and...
2010 Jul 18
3
[LLVMdev] JIT crash takes down host-application
Hi, I'm doing some tests concerning the embedding of LLVM and clan in my application. Now I stumbled across the following ... which disturbs me. If the jitted program crashes, like e.g. if it contains an assert(0==1) or calls an external function which cannot be resolved, the hosting app goes down as well. There seems no error catch. Can this anyhow be circumvented? -Frank
2009 Oct 16
0
[LLVMdev] MallocInst/CallInst bitcast,
...e int a; return StackCmp((void *)&a); } Preferably one which isn't destroyed by optimization. Thanks again, Daniel 2009/10/16 Chris Lattner <clattner at apple.com> > > On Oct 16, 2009, at 4:43 AM, Daniel Waterworth wrote: > > Never mind, I used ExecutionEngine's InstallLazyFunctionCreator and > DisableSymbolSearching to cause malloc and free calls to be handled by my > logging functions. Sorry for the unnecessary list mail. > > > No problem, this is a better way to go. The MallocInst and FreeInst > instructions are about to be removed from LLVM IR. Malloc an...
2010 Jul 19
0
[LLVMdev] JIT crash takes down host-application
...operation or function call that the enclosing program could, even _exit(). You can try to restrict function calls by removing the name resolution: > > > http://llvm.org/doxygen/classllvm_1_1ExecutionEngine.html#af062585affb7cd16bab9867b706ea460 > > and/or installing your own (see InstallLazyFunctionCreator), but ultimately they're the same process/task from the point of view of the operating system and there's no "llvm security model" or anything like that. > > If you're very determined, you could create an LLVM IR transformation pass which checks every load/store/ca...
2010 Jul 19
1
[LLVMdev] JIT crash takes down host-application
...ng >> program could, even _exit(). You can try to restrict function calls by >> removing the name resolution: >> >> >> >> http://llvm.org/doxygen/classllvm_1_1ExecutionEngine.html#af062585affb7cd16bab9867b706ea460 >> >> and/or installing your own (see InstallLazyFunctionCreator), but >> ultimately they're the same process/task from the point of view of the >> operating system and there's no "llvm security model" or anything like that. >> >> If you're very determined, you could create an LLVM IR transformation pass >&gt...
2012 Nov 27
2
[LLVMdev] MCJIT and Lazy Function Creators
...ofv at wanadoo.es> writes: > Out of curiosity, I'm replacing the JIT with MCJIT on my compiler. As > all "external" functions are provided by the language's FFI mechanism, > it does > > MyExecutionEngine->DisableSymbolSearching(); > MyExecutionEngine->InstallLazyFunctionCreator(&MyLazyFunctionCreator); > > which works fine with the JIT. However, MCJIT insists on resolving > unknown symbols by searching them outdoors and seems oblivious of the > existence of MyLazyFunctionCreator. > > Is this a bug? > > Is there a workaround, other than s...