search for: getpointertofunctionorstub

Displaying 17 results from an estimated 17 matches for "getpointertofunctionorstub".

2010 Feb 26
2
[LLVMdev] 2nd attempt for a working patch for bug 2606
...unctionStub is still needed ? JIT::forceEmitFunctionStub(...) was created to bring its implementation into JITEmitter file scope as JITResolver and therefore JITResolver::getLazyFunctionStub(...) are members of an anonymous namespace in that scope. However I can instead use a pre-existing method: getPointerToFunctionOrStub(...) which is declared in ExecutionEngine and overwritten in JIT (within JITEmitter file scope). Your response prompted my search. I've unit tested this and it works great. There is one caveat though. The implementation of JIT::getPointerToFunctionOrStub(...) first invokes ExecutionEngine::get...
2010 Feb 25
0
[LLVMdev] 2nd attempt for a working patch for bug 2606
Hi Garrison, I finally come back from holidays and take time to watch your patch. I must say that I largely prefer this version over the previous one ! I like the reuse of getLazyFunctionStub, but I don't know if the forceEmitFunctionStub is still needed ? I thought about JIT and modules, and I wonder if we don't need to take it another way. Now we can create multiples JIT. What if we
2008 Jul 07
2
[LLVMdev] Eager JIT
...e memory footprint by deallocating all LLVM objects. I've written my own JITMemoryManager to ensure that the binary code itself does not get deleted. Unfortunately, with lazy compilation the stub tries to call an LLVM method while everything else has already been deleted. It looks like JIT::getPointerToFunctionOrStub is responsibe for creating the stubs, and I've tried overloading it to emit the function instead of a stub, but unfortunately the JIT class has a private constructor, making it impossible to create a derived class. Is there any other way to achieve this without changing LLVM code? Or does t...
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
2013 Jan 31
1
[LLVMdev] Stub function generation in MCJIT using lli.
...l, I am new to LLVM so I apologize if my question seem lame to you. I was trying to understand the way in which MCJIT generates the stub functions when it encounters any functions which are not compiled yet. As far as I have looked into the code, the probable code which can do this is void *JIT::getPointerToFunctionOrStub and this is in JITEmitter under JIT. I may be wrong here though. Could you please give a brief overview how the stub functions are generated? Also, how does the original function when it is compiled is put in place of the stub? Your help is much appreciated. Thanks, Sumeeth -------------- next p...
2007 Mar 15
1
[LLVMdev] JIT slow
Hi! It appeared to me that runFunction in JIT.cpp is slow for repeatedly executing the same function with nontrivial arguments since the "Stub" function in JiT.cpp:183 (LLVM 1.9) is compiled again and again. Is there something I can do to accelerate this? g
2008 Apr 02
0
[LLVMdev] Introduction and questions
...e to bypass this and get a function pointer? So you could > use it like this: > > typedef void (*function_t)(methodOop method, JavaThread *thread); > function_t func = [some LLVM call here]; > func(method, thread); > > That would solve pretty much all my problems :) The getPointerToFunctionOrStub method that does what you want in the JIT. http://llvm.org/docs/doxygen/html/classllvm_1_1JIT.html#a6 — Gordon
2008 Apr 02
2
[LLVMdev] Introduction and questions
Hi all, I've been working on making a non-architecture specific port of OpenJDK these past few months. It's interpreter-only at present, and very slow, and I'd like to use LLVM to add some kind of JIT to it. So far I'm just trying to figure out how it would all slot in. The existing code in OpenJDK is written to accomodate different JITs, so integrating peripheral stuff like
2007 Dec 04
2
[LLVMdev] Memory allocation (or deallocation) model?
...when we're finished with them, and when? Let's say I've created a module, retrieved a bunch of types, created a function, a basic block, and instructions and inserted them all together. I've linked it all to an execution engine, and gotten a function pointer to actually call using getPointerToFunctionOrStub: * Does the function pointer stay good as long as the execution engine is alive? * Once the function is JITted, will all those types/instructions/functions still be allocated in memory? ** If so, is there a way to explicitly free them? * Can I "delete executionEngine" to free up all the...
2008 Jul 07
0
[LLVMdev] Eager JIT
...eallocating all LLVM objects. I’ve written my > own JITMemoryManager to ensure that the binary code itself does not > get deleted. Unfortunately, with lazy compilation the stub tries to > call an LLVM method while everything else has already been deleted. > > It looks like JIT::getPointerToFunctionOrStub is responsibe for > creating the stubs, and I’ve tried overloading it to emit the > function instead of a stub, but unfortunately the JIT class has a > private constructor, making it impossible to create a derived class. > > Is there any other way to achieve this without changi...
2011 Jun 06
0
[LLVMdev] Understanding resolving external/built-in function references
...nd have the set of functions > defined in the system keep growing, so that the next hunk > of bitcode added can have access to all the functions > defined so far? Yes. The JIT supports lazy compilation mode where it will generate thunks that only get compiled/linked when called - see JIT::getPointerToFunctionOrStub *. The above would solve a bijective requirement that earlier code may rely on functions defined in later code - if that is not necessary then the JIT should just work out of the box. * Note that the lazy compilation mode currently does not work well in a multithreaded environment. Cheers, Jame...
2010 Feb 26
1
[LLVMdev] 2nd attempt for a working patch for bug 2606
...; > > JIT::forceEmitFunctionStub(...) was created to bring its implementation > into JITEmitter file scope as JITResolver and > therefore JITResolver::getLazyFunctionStub(...) are members of an anonymous > namespace in that scope. However > I can instead use a pre-existing method: getPointerToFunctionOrStub(...) > which is declared in ExecutionEngine > and overwritten in JIT (within JITEmitter file scope). ... > Have you tried the existing pending functions mechanism? I don't want to introduce stubs in eager compilation mode, and I don't think you have to. -------------- next part --...
2011 Jun 06
2
[LLVMdev] Understanding resolving external/built-in function references
Hi James, > It depends on how your bitcode is loaded. It can be loaded either by llc, > which outputs pure ELF/Mach-O, in which case those function references get > turned into relocations that the linker (ld, Gold) applies. > > If you're loading bitcode via the JIT, it uses dlsym() to try and introspect > your runtime environment to find the symbol. Ah, that makes sense -
2010 Feb 26
0
[LLVMdev] 2nd attempt for a working patch for bug 2606
...needed ? > > JIT::forceEmitFunctionStub(...) was created to bring its implementation into JITEmitter file scope as JITResolver and > therefore JITResolver::getLazyFunctionStub(...) are members of an anonymous namespace in that scope. However > I can instead use a pre-existing method: getPointerToFunctionOrStub(...) which is declared in ExecutionEngine > and overwritten in JIT (within JITEmitter file scope). ... > > Have you tried the existing pending functions mechanism? I don't want to introduce stubs in eager compilation mode, and I don't think you have to. I'm not sure I understa...
2007 Dec 04
0
[LLVMdev] Memory allocation (or deallocation) model?
...nEngine) owns the module. > Let's say I've created a module, retrieved a bunch of types, created a > function, a basic block, and instructions and inserted them all together. > I've linked it all to an execution engine, and gotten a function pointer to > actually call using getPointerToFunctionOrStub: > > * Does the function pointer stay good as long as the execution engine is alive? Yes, or until you explicitly free it with EE->freeMachineCodeForFunction(F). Note that you can free the IR for the function body after you JIT the function by using F->deleteBody(). > * Once the...
2018 Jul 01
2
I've seen OrcJit is under overhaul, and also the MCJIT, so what's the plan?
I didn't seen any roadmap and plan about OrcJit & MCJIT. And would OrcJIT be stablize in version 7.0? Or latter version? Would MCJIT be removed in source tree, when? -- 此致 礼 罗勇刚 Yours sincerely, Yonggang Luo -------------- next part -------------- An HTML attachment was scrubbed... URL:
2010 Feb 27
2
[LLVMdev] 2nd attempt for a working patch for bug 2606
...:forceEmitFunctionStub(...) was created to bring its implementation >> into JITEmitter file scope as JITResolver and >> therefore JITResolver::getLazyFunctionStub(...) are members of an >> anonymous namespace in that scope. However >> I can instead use a pre-existing method: getPointerToFunctionOrStub(...) >> which is declared in ExecutionEngine >> and overwritten in JIT (within JITEmitter file scope). ... > > Have you tried the existing pending functions mechanism? I don't want to > introduce stubs in eager compilation mode, and I don't think you have to. > >...