search for: getoremitglobalvari

Displaying 20 results from an estimated 34 matches for "getoremitglobalvari".

2009 Dec 25
1
[LLVMdev] JIT buffer code skipping 8 bytes?
...atch the excepted type info offset. In truth I'm not sure what a type info is anyway, as I know they are not c++ type infos, but the array trick seems to work ... sort of. My question though is: 1) In JITDwarfEmitter.cpp these GlobalVariables are emitted with: JCE->emitInt64((intptr_t)Jit.getOrEmitGlobalVariable(GV)); (in JITDwarfEmitter::EmitExceptionTable) 2) The allocated emitted space is calculated by: JITCodeEmitter::allocateSpace(...) as eventually called by getOrEmitGlobalVariable(...) 3) If the correctly sized buffer was already allocated, and alignment did not affect the current buffer poi...
2010 Feb 19
3
[LLVMdev] 2nd attempt for a working patch for bug 2606
...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 "external" GlobalVariable. 2) To solve the foreign Module Function problem, I modified JIT.{h,cpp} to emit a stub for a found "external" Function instance, when that foreign Module defined Function has not yet been compiled. Al...
2010 Feb 25
0
[LLVMdev] 2nd attempt for a working patch for bug 2606
...d=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 "external" GlobalVariable. > 2) To solve the foreign Module Function problem, > I modified JIT.{h,cpp} to emit a stub for a found "external" Function > instance, when that foreign Module > defined Function has not yet...
2014 Mar 21
3
[LLVMdev] lli crashes when running cpp programs
...---------------- lib/ExecutionEngine/JIT/JITEmitter.cpp ------------------------ void *JITEmitter::getPointerToGlobal(GlobalValue *V, void *Reference, bool MayNeedFarStub) { if (GlobalVariable *GV = dyn_cast<GlobalVariable>(V)) return TheJIT->getOrEmitGlobalVariable(GV); if (GlobalAlias *GA = dyn_cast<GlobalAlias>(V)) return TheJIT->getPointerToGlobal(GA->resolveAliasedGlobal(false)); One possible solution is to let JITEmitter emit a stub for the name like following: @@ -687,8 +687,19 @@ if (GlobalVariable *GV = dyn_cast<Glo...
2013 Jan 07
1
[LLVMdev] Question on using GlobalVariable as function pointer
...,0, "",0,0,0); fty : i32 ({ i32, [32 x i32] }*) I get stuck here, the fifth argument is the initializer which is a LLVM Constant, I do not know how to describe a function pointer as a constant. so currently, I just pass false to it. then I use myjit->getOrEmitGlobalVariable(gv); // myjit is LLVM ExecutionEngine but, I get an error LLVM ERROR: Could not resolve external global address However, when I modify fty to be an integer type or some primitive type, there is no error. Since LLVM demo page is closed, so I am not sure how to do it correctly. Have A Nice...
2010 Feb 16
2
[LLVMdev] Work in progress patch to bug 2606
The patch I recently attached to bug 2606, reproduced here, is my first attempt to solve this issue as represented by the attached test cases. To solve the foreign Module GlobalVariable problem, I modified JIT::getOrEmitGlobalVariable(...) to directly attempt to map a found "external" GlobalVariable. To solve the foreign Module Function problem, I modified both JIT.{h,cpp} and JITEmitter.cpp to emit a stub for a found "external" Function instance, when that foreign Module defined Function has not yet been...
2008 Oct 15
0
[LLVMdev] bug in the JIT global variable emitter
...tes a new mem block if it doesn't exist > (i.e. > when dumping a global variable out of the scope of a function > compilation). > The patch is at: > http://web.ist.utl.pt/nuno.lopes/llvm_jit_global_emitter2.txt OK, I think I finally understand this: the allocation in JIT::getOrEmitGlobalVariable doesn't call into JITEmitter but uses the MachineCodeEmitter directly. Thus, if you call it from outside the JITEmitter, it won't update the data structures the JITEmitter relies on. In the usual case, the JITEmitter calls into JIT and updates its own data structures, so that...
2008 Oct 16
2
[LLVMdev] bug in the JIT global variable emitter
...esn't exist >> (i.e. >> when dumping a global variable out of the scope of a function >> compilation). >> The patch is at: >> http://web.ist.utl.pt/nuno.lopes/llvm_jit_global_emitter2.txt > > OK, I think I finally understand this: the allocation in > JIT::getOrEmitGlobalVariable doesn't call into JITEmitter but uses the > MachineCodeEmitter directly. Thus, if you call it from outside the > JITEmitter, it won't update the data structures the JITEmitter relies > on. In the usual case, the JITEmitter calls into JIT and updates its > own data structu...
2012 Sep 24
2
[LLVMdev] JIT problem with thread local global variable
....166.39/llvm-3.1.src/HTML/Y/23295.html>; *#else* llvm_unreachable <http://140.113.166.39/llvm-3.1.src/HTML/D/20353.html>("Cannot allocate thread local storage on this arch!"); *#endif }* ** Consequently, if we set LLVM global variable G to be thread local, and use jit to call getOrEmitGlobalVariable(G), we get an index, not address. So what if we want to change the value in G, how can we do this. Have A Nice Day Chia Lun Liu -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120924/c8352e10/attachmen...
2008 Oct 14
2
[LLVMdev] bug in the JIT global variable emitter
>> Today I found a nice bug in the JIT global variable emitter. >> The problem may lead to an assert() failure when doing the following: >> 1) compile some function >> 2) emit a global variable >> 3) compile another function. an assert() may trigger in the JIT memory >> manager >> >> This happens because the JIT global variable emitter is using the
2010 Feb 17
0
[LLVMdev] Work in progress patch to bug 2606
...com>wrote: > The patch I recently attached to bug 2606<http://llvm.org/bugs/show_bug.cgi?id=2606>, > reproduced here, is my first attempt to solve this issue > as represented by the attached test cases. To solve the foreign Module > GlobalVariable problem, > I modified JIT::getOrEmitGlobalVariable(...) to directly attempt to map a > found "external" GlobalVariable. > To solve the foreign Module Function problem, I modified both JIT.{h,cpp} > and JITEmitter.cpp to emit > a stub for a found "external" Function instance, when that foreign Module > defined...
2010 Feb 27
2
[LLVMdev] 2nd attempt for a working patch for bug 2606
...t; The > stubs are replaced at compile (JIT) time not at runtime. Is this not how > call sites are currently treated? Is this what you are referring to? Ah, I was confused. You're right, getLazyFunctionStub is the badly-named function you want. You currently have nearly the same loop in getOrEmitGlobalVariable() and getPointerToFunction(). Can you unify those, perhaps by making them searches for GlobalValues with getNamedValue()? GetLinkageResult() in lib/Linker/LinkModules.cpp has a lot of logic about choosing a function based on its linkage. You should read that to figure out how to filter GVs wit...
2019 Aug 08
6
New ORC v2 LLJIT - global variables
...ying to switch to the new orc v2 lljit engine at my work with hopes of parallel jitting. We are switching from the ExecutionEngine w/ OrcMCJitReplacement. We are having a hard time with global variables. We have found a way to create/emit new globals during jitting by using the old ExecutionEngine::getOrEmitGlobalVariable. Is there an easier way to do this with the new jit engine? We were hoping to create a new ThreadSafeModule, add a GlobalVariable, and then add the module to the JIT engine through addLazyIRModule(), but this doesn't seem to work. 2nd question; Is the lookup function supposed to work with...
2010 Feb 26
0
[LLVMdev] 2nd attempt for a working patch for bug 2606
Hi Jeffrey, On Feb 26, 2010, at 16:02, Jeffrey Yasskin wrote: > [sidenote: Please try to avoid extraneous whitespace and line wrapping changes in your patches. It makes it harder to see what you're actually changing] Sorry just saw some preexisting code was not in 80 columns. > > On Fri, Feb 26, 2010 at 4:57 AM, Garrison Venn <gvenn.cfe.dev at gmail.com> wrote: > Hi
2010 Feb 26
1
[LLVMdev] 2nd attempt for a working patch for bug 2606
[sidenote: Please try to avoid extraneous whitespace and line wrapping changes in your patches. It makes it harder to see what you're actually changing] On Fri, Feb 26, 2010 at 4:57 AM, Garrison Venn <gvenn.cfe.dev at gmail.com>wrote: > Hi Olivier, > > On Feb 25, 2010, at 14:10, Olivier Meurant wrote: > > Hi Garrison, > > I finally come back from holidays and take
2010 Feb 26
2
[LLVMdev] 2nd attempt for a working patch for bug 2606
...tly 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 "external" GlobalVariable. > 2) To solve the foreign Module Function problem, > I modified JIT.{h,cpp} to emit a stub for a found "external" Function instance, when that foreign Module > defined Function has not ye...
2009 Oct 28
0
[LLVMdev] Should LLVM JIT default to lazy or non-lazy?
On Oct 28, 2009, at 1:10 PM, Renato Golin wrote: > Creating another method (getLazyFunctionPointer) or passing a boolean, > enum, whatever seems like the best course of action right now. > I think that this is a great idea. Instead of making "lazy or not" be a policy maintained by the JIT, why don't we approach this as a bug in the current API. Perhaps we should
2012 Jun 03
0
[LLVMdev] [question] IR<-->native program state mode switch how / where is it done
...currently is that it happens in ExecutionEngine somewhere using these methods, but i cant find their wrapper, the one that would use these and say "now map everything and switch state" and somehow pass that mapping to the JIT and backwards. emitGlobals(), EmitGlobalVariable(), llvm::JIT::getOrEmitGlobalVariable() llvm::ExecutionEngineState::getGlobalAddressMap(), llvm::ExecutionEngineState::getGlobalAddressReverseMap() I hope I'm not misguided by an incorrect understanding of the JIT architecture, in any case any links to documentation, Doxygen tree, etc are absolutely welcome thanks, (and thank...
2013 Jan 11
0
[LLVMdev] modifiy the address of GlobalVariable emitted by JIT
...32 0, i32 1 %1 = getelementptr inbounds [32 x i32]* %0, i32 0, i32 23 store i32 0, i32* %1 ; // the first three instruction just stores information ret i32 296696 ; // return the same constantValue of the above said returnInst } I use JIT to compile the above function and also use JIT->getOrEmitGlobalVariable to get the address of @G , and store the address in a pointer variable. So later, I can modify the content pointed by the pointer then %x = call @G the above instruction would call another function. My environment has multi-thread, which means maybe some threads would try to modify th...
2013 Mar 05
0
[LLVMdev] Convert C variable to LLVM IR Variable
Hi Chia Lun Liu, > The reason why I take such indirect method is that as I know, JIT is not > able to > > do with LLVM GlobalVariable with ThreadLocal type. did you try mcjit? Run lli with -use-mcjit Ciao, Duncan.