Dong Chen
2012-Dec-10 01:33 UTC
[LLVMdev] how to get and modify a local variable's value through executionEngine?
hello guys, recently, i successfully get and modify global variable by execution engine. the functions i used are listed here: int m=1; EE->updateGlobalMapping(p->M->getGlobalVariable("x",true),&m); EE->recompileAndRelinkFunction(EntryFn); x is the global variable in the module. but how to modify the local variable in the module? -- View this message in context: http://llvm.1065342.n5.nabble.com/how-to-get-and-modify-a-local-variable-s-value-through-executionEngine-tp52446.html Sent from the LLVM - Dev mailing list archive at Nabble.com.
Óscar Fuentes
2012-Dec-10 11:50 UTC
[LLVMdev] how to get and modify a local variable's value through executionEngine?
Dong Chen <jameschennerd at gmail.com> writes:> hello guys, > recently, i successfully get and modify global variable by execution engine. > the functions i used are listed here: > int m=1; > EE->updateGlobalMapping(p->M->getGlobalVariable("x",true),&m); > EE->recompileAndRelinkFunction(EntryFn); > x is the global variable in the module. > but how to modify the local variable in the module?A local variable does not exists until the function that defines it is executed, so pretending to get and modify it as you do for the global makes no sense.
Dong Chen
2012-Dec-10 12:02 UTC
[LLVMdev] how to get and modify a local variable's value through executionEngine?
hello Óscar Fuentes, thanks for your reply, if i use the API provided by parser.h and the program *.ll i parsed contains local variable, i can get a module have local variable without defines it first. i think that module is a structure like AST(i am not sure whether i was right), this must be a traversal method. am i right or do i misunderstand something? -- View this message in context: http://llvm.1065342.n5.nabble.com/how-to-get-and-modify-a-local-variable-s-value-through-executionEngine-tp52446p52456.html Sent from the LLVM - Dev mailing list archive at Nabble.com.
Reasonably Related Threads
- [LLVMdev] how to get and modify a local variable's value through executionEngine?
- [LLVMdev] how to get and modify a local variable's value through executionEngine?
- [LLVMdev] how to get and modify a local variable's value through executionEngine?
- [LLVMdev] how to get and modify a local variable's value through executionEngine?
- [LLVMdev] how to get and modify a local variable's value through executionEngine?