[LLVMdev] Tracing values in llvm IR

Micah Villmow micah.villmow at smachines.com
Thu Jan 2 11:05:29 PST 2014

One way, and most likely the easiest, is to write/use a library that does what you want and then write an LLVM IR pass that inserts function calls to execute at runtime and link in your library.


From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Jin Huang
Sent: Wednesday, January 01, 2014 9:39 PM
To: llvmdev at cs.uiuc.edu
Subject: [LLVMdev] Tracing values in llvm IR

Hi, everyone.

I want to writing a Pass to get the variable value while the program is running ,the basic idea is to insert an STL map in the program ,and get every value and address a program use ,but whether it's possible to do this by transforming the llvm IR?

I didn't find any useful functions to get a variable's address in LLVM IR .It seems that the IR is an SSA form and we can not get a value's address in compiling time.Is that right? But how can I dynamically get the variable's value in run time by writing a Pass ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140102/cc6802b1/attachment.html>

More information about the llvm-dev mailing list