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.
Óscar Fuentes
2012-Dec-10 12:23 UTC
[LLVMdev] how to get and modify a local variable's value through executionEngine?
Dong Chen <jameschennerd at gmail.com> writes:> 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?Yes, you can traverse the functions and the basic blocks inside those functions, but how do you detect a local variable? LLVM IR is in SSA form plus memory loads/stores. A local variable, as you see it in the original source code (C, C++ or other language) might not clearly map to a local variable in LLVM IR, depending on how you generate the IR and/or the passes you run on it.
Dong Chen
2012-Dec-10 13:11 UTC
[LLVMdev] how to get and modify a local variable's value through executionEngine?
hi Óscar Fuentes, i am new to llvm, so i still have several questions. thanks for you help. (1)what is SSA form(static single assignment)? (2)how to traverse the basic blocks? if the module is gained by parser, what will the basic blocks contain? i will be on the line, thank you very much -- View this message in context: http://llvm.1065342.n5.nabble.com/how-to-get-and-modify-a-local-variable-s-value-through-executionEngine-tp52446p52458.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?