[LLVMdev] newbie questions

Duncan Sands baldrick at free.fr
Fri Mar 25 05:39:32 PDT 2011


Hi George,

> 1) Is there a program dependence graph implementation in llvm?

the control flow graph is built into the IR, as is the def-use graph.

> 2) I am trying to instrument a program to print line number, function
> containing computation, and variable values.
> For example,
>
>
> print(function-name:line-number: k : y : ">");
> if(k>  y)
> x = a + b;
> print(function-name: line-number: x);
>
> How can I go about doing this? Thanks.

I'm not sure I understand what you are asking, but the answer is probably:
using debug info.

Ciao, Duncan.



More information about the llvm-dev mailing list