similar to: [LLVMdev] Can I get the value of the global variable defined in some module (JITing)

Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] Can I get the value of the global variable defined in some module (JITing)"

2011 May 18
1
[LLVMdev] Can I get the value of the global variable defined in some module (JITing)
Ok, another explanation. In my runtime that uses LLVM as JIT engine, I have an instnace of GlobalVariable. The program I run in it writes some value to this variable. How can I read it? 2011/5/18 Duncan Sands <baldrick at free.fr>: > Hi, > >> I need to define the global variable which would be modified by JITted >> code. Can I read it from the JITter itself? It is of
2011 May 18
0
[LLVMdev] Can I get the value of the global variable defined in some module (JITing)
Hi, > I need to define the global variable which would be modified by JITted > code. Can I read it from the JITter itself? It is of pointer type. I'm not sure what you are asking, can you please be more explicit/detailed. Ciao, Duncan.
2012 Mar 03
0
[LLVMdev] Access Violation using ExecutionEngine on 64-bit Windows 8 Consumer Preview
On Windows, the LLVM JIT runner looks for the '_chkstk' symbol by enumerating all of the loaded DLLs. On Win8, NTDLL.DLL (where _chkstk is defined) is found in a location that is more than 32bits bytes away from the jitted code. Marina's patch changes the code that generates a call to '_chkstk' from PCREL32 (which uses a 32bit offset) to an indirect call (which uses a 64bit
2012 Mar 02
2
[LLVMdev] Access Violation using ExecutionEngine on 64-bit Windows 8 Consumer Preview
Hi Rotem, Thank to you, and especially to Marina! The problem gone. I'm a bit interested, what is the reason it worked in Win7, and not in Win8. I've recently used Process Explorer to discover, that the call was to ntdll.dll, which in Win8 is loaded to the totally different address. Best regards, Victor Milovanov Moscow State University graduate student 2012/3/3 Rotem, Nadav
2010 Sep 17
0
[LLVMdev] Accurate garbage collection
Hi Victor, You can write your own GC or use other's GC with LLVM. What LLVM provides is a framework to generate a representation of objects locations in a method's frames. Right now, LLVM can emit the shadow stack (which dynamically updates the locations), or the ocaml format. If you have implemented a GC, you can parse the ocaml format to locate the objects. I think the web page needs
2010 Jun 03
4
[LLVMdev] Passing structures by value on Windows
Hello, LLVM team! I faced a problem with passing structures by value on Windows (both x86 and x64). I tried to write simple { i32 i32 } Vector2D addition using IR builder (signature is Vector2D add(Vector2D a, Vector2D b)). x86 version worked fine, but on x64 function returned incorrect value. Some research showed, that { i16 i16 } addition also fails on x86, so I guess the problem is in passing
2010 Sep 16
4
[LLVMdev] Accurate garbage collection
Hello! I'm looking at "Overview of available features" here: http://llvm.org/docs/GarbageCollection.html#collector-algos and can't understand something. First, does table header mean that there are already some GC's implemented besides "shadow stack"? E.g. can I just use them? Second, does row "JIT", "NO" mean that GC is not compatible with
2011 Nov 09
2
[LLVMdev] LLVM: segfault while modifying a thread-local global variable
OK, that's my fault. I'm running jitted code on linux x86. 2011/11/9 Duncan Sands <baldrick at free.fr> > Hi Semion, > > > In my case the LLVM is built with assertions, but this doesn't help. From >> your >> answer I conclude that thread-local globals are fully implemented in x86 >> JIT. >> > > you didn't mention the JIT. You
2011 Nov 09
0
[LLVMdev] LLVM: segfault while modifying a thread-local global variable
Which version of LLVM? At any rate I don't recall TLS working for the JIT. It may take some work. -eric On Nov 9, 2011, at 4:46 AM, Semion Prihodko wrote: > OK, that's my fault. I'm running jitted code on linux x86. > > 2011/11/9 Duncan Sands <baldrick at free.fr> > Hi Semion, > > > In my case the LLVM is built with assertions, but this doesn't
2011 Nov 09
2
[LLVMdev] LLVM: segfault while modifying a thread-local global variable
In my case the LLVM is built with assertions, but this doesn't help. From your answer I conclude that thread-local globals are fully implemented in x86 JIT. So this is strange... 2011/11/9 Duncan Sands <baldrick at free.fr> > Hi Semion, > > > Really strange situation: when I modify a thread-local GlobalVariable I > get a > > segfault. It seems to be a bug,
2011 Nov 09
0
[LLVMdev] LLVM: segfault while modifying a thread-local global variable
Hi Semion, > In my case the LLVM is built with assertions, but this doesn't help. From your > answer I conclude that thread-local globals are fully implemented in x86 JIT. you didn't mention the JIT. You didn't give any details at all! That's why I was only able to make a generic suggestion. Don't read too much into it. Ciao, Duncan. So > this is strange...
2012 Mar 02
0
[LLVMdev] Access Violation using ExecutionEngine on 64-bit Windows 8 Consumer Preview
Hi Victor, Try this fix by Marina Yatsina: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120220/137532.html Nadav -----Original Message----- From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of lost Sent: Friday, March 02, 2012 22:53 To: NAKAMURA Takumi; LLVM Subject: Re: [LLVMdev] Access Violation using ExecutionEngine on 64-bit Windows 8
2012 Dec 05
4
[LLVMdev] how to get and modify a global variable inside a module
recently, i use LLVM API to write a program to read *.ll and excute it automatically. Further more, i want to change some global variables inside a module. i tried some functions provided by Module.h and ExecutionEngine.h but none were seemed to match my need. did someone have the experience or some advices? thank you ;) -- View this message in context:
2010 Feb 16
0
[LLVMdev] Creating a global variable in JIT context
Do you use load to get the value of V? If not then you probably return i32* instead of i32. Victor On 16 February 2010 11:26, Russell Wallace <russell.wallace at gmail.com>wrote: > I'm trying to create a global variable initialized to zero, and return > its value from a newly created function, in JIT context. I'm keeping > all types as i32 for the moment, and I only have
2012 Dec 05
0
[LLVMdev] how to get and modify a global variable inside a module
On 05/12/12 12:07, Dong Chen wrote: > recently, i use LLVM API to write a program to read *.ll and excute it > automatically. > Further more, i want to change some global variables inside a module. > i tried some functions provided by Module.h and ExecutionEngine.h but none > were seemed to match my need. > did someone have the experience or some advices? > thank you ;) You
2014 Mar 20
2
[LLVMdev] load bytecode from string for jiting problem
This segfault occuring only under valgrind, in shell way, and in gdb way i have Invalid bitcode signature simple_scev_dynamic_array: /home/willy/apollo/llvm/include/llvm/Support/ErrorOr.h:258: storage_type *llvm::ErrorOr<llvm::Module *>::getStorage() [T = llvm::Module *]: Assertion `!HasError && "Cannot get value when an error exists!"' failed. Command terminated by
2020 Jun 03
2
Fwd: I cannot change value of global variable in LLVM IR using IRBuilder
Hi Everyone, I'm quite new to LLVM and I want to update value of global variable in LLVM IR. I created new global variable in ModulePass: bool runOnModule(llvm::Module &M) { IRBuilder<> Builder(M.getContext()); Instruction *I = &*inst_begin(M.getFunction("main")); Builder.SetInsertPoint(I); M.getOrInsertGlobal("globalKey",
2020 Jun 03
2
Fwd: I cannot change value of global variable in LLVM IR using IRBuilder
I don't think it's the same problem as you described. By printing I meant calling printf function and passing my global variable as one of the arguments. My code: Instruction* InstructionVisitor::incrementGlobalKey(Instruction* I) { IRBuilder<> Builder(I->getContext()); Builder.SetInsertPoint(I->getNextNode()); GlobalVariable* key =
2011 Jan 12
2
[LLVMdev] How to define a global variable?
On Wed, Jan 12, 2011 at 6:08 PM, Renato Golin <rengolin at systemcall.org> wrote: > On 12 January 2011 22:28, Rob Nikander <rob.nikander at gmail.com> wrote: >> @x = external global %0* > > Hi Rob, > > Try removing the 'extern', as it implies the variable storage is > elsewhere (ie. another object file). > I have to pass something from the
2012 Mar 02
2
[LLVMdev] Access Violation using ExecutionEngine on 64-bit Windows 8 Consumer Preview
Hi, Takumi! I tried your patch, and it did not help. Moreover, I tried to compile under Windows 7 and copy files to Windows 8, and received the same exception. So the problem seems to be in Windows 8 itself or some non-portable code inside LLVM. Could anyone tell me what LLVM code in ExecutionEngine is responsible for allocating and protecting memory for generated native functions? Best