Abhinash Jain
2013-Jun-19 01:12 UTC
[LLVMdev] Getting the memory address of all operands on an expression
In short if suppose i have some expression as a=b+c-d*e, and with the help of LLVM pass i want to make a string like this:- "[Hexadecimal address of 'b'] [opcode of +] [Hexadecimal address of 'c'] [opcode of -] [Hexadecimal address of 'd'] [opcode of *] [Hexadecimal address of 'e']". Than how can i make it................ -- View this message in context: http://llvm.1065342.n5.nabble.com/Getting-the-memory-address-of-all-operands-on-an-expression-tp58435p58616.html Sent from the LLVM - Dev mailing list archive at Nabble.com.
Duncan Sands
2013-Jun-19 06:02 UTC
[LLVMdev] Getting the memory address of all operands on an expression
On 19/06/13 03:12, Abhinash Jain wrote:> In short if suppose i have some expression as a=b+c-d*e, and with the help > of LLVM pass i want to make a string like this:- > > "[Hexadecimal address of 'b'] [opcode of +] [Hexadecimal address of 'c'] > [opcode of -] [Hexadecimal address of 'd'] [opcode of *] [Hexadecimal > address of 'e']". > > Than how can i make it................You can't, because addresses are only known at run-time, while passes are run at compile time. If you are running the program using the JIT then you can try to extract the info at run-time from the internal JIT data structures. Ciao, Duncan.
Abhinash Jain
2013-Jun-19 06:30 UTC
[LLVMdev] Getting the memory address of all operands on an expression
> You can't, because addresses are only known at run-time, while passes arerun at compile time. Actually I want to pass this string as an argument to a function (let say it will just print it in on stdout), and this function will be called before every store instruction at runtime. -- View this message in context: http://llvm.1065342.n5.nabble.com/Getting-the-memory-address-of-all-operands-on-an-expression-tp58435p58621.html Sent from the LLVM - Dev mailing list archive at Nabble.com.
Apparently Analagous Threads
- [LLVMdev] Getting the memory address of all operands on an expression
- [LLVMdev] Getting the memory address of all operands on an expression
- [LLVMdev] Getting the memory address of all operands on an expression
- [LLVMdev] Getting the memory address of all operands on an expression
- [LLVMdev] Getting the memory address of all operands on an expression