newbie questions

Hi Everyone,
   I am new to LLVM. I have two questions.

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

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.

George

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.