search for: lazyfunctioncr

Displaying 20 results from an estimated 24 matches for "lazyfunctioncr".

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 haven't actually tried this, but it seems to be the only way to use > this API, so I presume someone else has. The only potential problem I > can forsee is if the JI...
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.
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 haven't actually tried this, but it seems to be the only way to use this API, so I presume someone else has. The only potential problem I can forsee is if the JIT isn't actually...
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...
2009 Dec 07
0
[LLVMdev] 2.6 JIT using wrong address for external functions
I had that problem too: http://llvm.org/bugs/show_bug.cgi?id=5116. To work around the problem, you can: * Switch to the thread-unsafe lazy jit. * Allocate your JIT code within 2GB of your text segment. * Find a way to look up the external function with dlsym or maybe the ExecutionEngine's LazyFunctionCreator instead of addGlobalMapping. * Upgrade to the top of the svn tree. On Mon, Dec 7, 2009 at 10:01 AM, Howell, Nathan <nhowell at ebay.com> wrote: > I have an external function that was added with > ExecutionEngine::addGlobalMapping... and the JIT is burning the wrong > address i...
2010 Feb 25
0
[LLVMdev] 2nd attempt for a working patch for bug 2606
...e it another way. Now we can create multiples JIT. What if we decide to simplify the JIT in allowing only one module per instance of JIT ? It will simplify greatly the code of the JIT. If we need to jit 2 differents modules, we can create 2 JITs. If one module needs another module, we can create a LazyFunctionCreator (called by JIT::getPointerToNamedFunction) and easily resolved cross-module references. What do you think ? Anyone have an opinion on this ? Olivier. On Fri, Feb 19, 2010 at 5:21 PM, Garrison Venn <gvenn.cfe.dev at gmail.com>wrote: > This is the second version of a patch, which I...
2013 Nov 01
0
[LLVMdev] [Proposal] Adding callback mechanism to Execution Engines
...ate.getGlobalAddressMap when resolving symbols. Instead it uses RTDyldMemoryManager::getSymbolAddress which checks with DynamicLibrary::SearchForAddressOfSymbol, so Andy's suggestion of DynamicLibrary::addSymbol is better as it should work with both JIT and MCJIT. Another options is to use the LazyFunctionCreator which is implemented in both JIT and MCJIT. Andy - MCJIT::getPointerToFunction does call EE:addGlobalMapping - however EEState.getGlobalAddressMap is not used in MCJIT. Should this call be removed? Yaron 2013/11/1 sumeeth kc <sumeethkc at gmail.com> > Hi Andrew, > > I used...
2010 Feb 19
3
[LLVMdev] 2nd attempt for a working patch for bug 2606
This is the second version of a patch, which I recently attached to bug 2606, whose original version was modified to reflect the lists comments. Also please note the comment at the end of this email, which basically questions whether this bug is really a bug. 1) To solve the foreign Module GlobalVariable problem, I modified JIT::getOrEmitGlobalVariable(...) to directly attempt to map a found
2009 Dec 07
4
[LLVMdev] 2.6 JIT using wrong address for external functions
I have an external function that was added with ExecutionEngine::addGlobalMapping... and the JIT is burning the wrong address into the emitted function. All of the addresses have 0xffffff8d00000000 added to them. Does this look familiar to anyone? I'm using 2.6 on Solaris10/x64 if it matters. This has been working for about two months and I can't readily figure out what I changed to break
2010 Jun 17
2
[LLVMdev] Relocation issue with jump tables in ELF object files on X86_64
...s I had that problem too: http://llvm.org/bugs/show_bug.cgi?id=5116. To work around the problem, you can: * Switch to the thread-unsafe lazy jit. * Allocate your JIT code within 2GB of your text segment. * Find a way to look up the external function with dlsym or maybe the ExecutionEngine's LazyFunctionCreator instead of addGlobalMapping. * Upgrade to the top of the svn tree. -----Original Message----- From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Eli Friedman Sent: Thursday, June 17, 2010 1:06 PM To: Smith, Tim Cc: llvmdev at cs.uiuc.edu Subject: Re:...
2013 Nov 01
2
[LLVMdev] [Proposal] Adding callback mechanism to Execution Engines
Hi Andrew, I used the latest code from trunk. GlobalSymbolTable is being used in MCJIT. I guess it wasn't clear from the proposal that the user program will be modified to indicate that the callback should happen at that point in the code. The objective is to call some of the functions which belong to lli or the ExecutionEngine. Thanks, Sumeeth On Fri, Nov 1, 2013 at 5:40 PM, Kaylor,
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:...
2010 Apr 17
2
[LLVMdev] Parsing (and compiling) on demand.
lost wrote: > So you mean that is not the way. But what is InstallLazyFunctionCreator for? You can use it to return a function pointer when asked for a function by name. It can replace dlsym() style lookups. I would've expected that given its name it could be used to lazily create functions too, but apparently not. Nick > > 2010/4/17 Kenneth Uildriks<kennethu...
2012 Aug 09
0
[LLVMdev] RFC: MCJIT enhancements - JIT overview
...multiple modules into one and then JIT'ing one module? Lazy functions creator It is a feature of a JIT that allows you to load functions or modules on demand. When functions with a specific name cannot be found (it is not present in loaded modules or native libraries) a user callback called LazyFunctionCreator is called with the name of that function. The user responsibility is to somehow provide a pointer to that function. It can be to load some module, JIT it and return the pointer to the function. Legacy JIT supports this feature but only for functions. Global variables cannot be loaded on deman...
2010 Jun 17
0
[LLVMdev] Relocation issue with jump tables in ELF object files on X86_64
On Thu, Jun 17, 2010 at 12:38 PM, Smith, Tim <tim at bioware.com> wrote: > (llvm 2.6) > > > > We have an application where we are using LLVM to generate ELF object files > for X86_64.   At runtime we load these objects files into memory using our > own ELF loader. > > > > Everything is working except for the jump tables. > > > > The ELF emitter is
2010 Jun 17
0
[LLVMdev] Relocation issue with jump tables in ELF object files on X86_64
...s I had that problem too: http://llvm.org/bugs/show_bug.cgi?id=5116. To work around the problem, you can: * Switch to the thread-unsafe lazy jit. * Allocate your JIT code within 2GB of your text segment. * Find a way to look up the external function with dlsym or maybe the ExecutionEngine's LazyFunctionCreator instead of addGlobalMapping. * Upgrade to the top of the svn tree. -----Original Message----- From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Eli Friedman Sent: Thursday, June 17, 2010 1:06 PM To: Smith, Tim Cc: llvmdev at cs.uiuc.edu Subject: Re:...
2010 Jun 17
2
[LLVMdev] Relocation issue with jump tables in ELF object files on X86_64
(llvm 2.6) We have an application where we are using LLVM to generate ELF object files for X86_64. At runtime we load these objects files into memory using our own ELF loader. Everything is working except for the jump tables. The ELF emitter is generating JMPQ instructions using X86::reloc_absolute_word_sext relocations which we are unable to patch to the jump table in the .rodata segment
2008 Feb 04
0
[LLVMdev] Exception handling in JIT
...======================= > --- include/llvm/ExecutionEngine/ExecutionEngine.h (revision 46612) > +++ include/llvm/ExecutionEngine/ExecutionEngine.h (working copy) > @@ -85,6 +85,11 @@ > /// pointer is invoked to create it. If this returns null, the JIT > will abort. > void* (*LazyFunctionCreator)(const std::string &); > > + /// ExceptionTableRegister - If Exception Handling is set, the > JIT will > + /// register dwarf tables with this function > + typedef void (*EERegisterFn)(void*); > + static EERegisterFn ExceptionTableRegister; > + > public: >...
2008 Feb 01
2
[LLVMdev] Exception handling in JIT
Dear all, Here's a new patch with Evan's comments (thx Evan!) and some cleanups. Now the (duplicated) exception handling code is in a new file: lib/ExecutionEngine/JIT/JITDwarfEmitter. This patch should work on linux/x86 and linux/ppc (tested). Nicolas -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: jit-exceptions.patch URL:
2012 Jul 31
0
[LLVMdev] mcjit
Hi Pawel, Some of the issues I have come across (from memory!) are * MCJIT doesn't work on Windows, because it doesn't support COFF. If you want to use it on Windows you have to either target Mach-O (not clear whether that will work in general) or ELF (need to get a patch from Intel to be able to use this). * Make sure you include MCJIT.h and link in MCJIT.lib, otherwise (even if