[LLVMdev] Question about use-def chain

신건철 kcshin at arcs.kaist.ac.kr
Wed Mar 12 00:22:19 PDT 2008

Programmers’ manual says we can iterate over a use-def chain by

It works fine except for load and store instruction of stack variables.


For example, a simple bitcode is like the below.

i = alloca i32

store i32 0, i32* %i, align 4

%tmp1 = load i32* %i, align 4


If I apply a use-def chain to load instruction, I get alloca instruction.

I think store instruction is a correct use-def chain.

Am I right?

Is there any other method to iterate over a use-def chain in this case?





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080312/89284d4d/attachment.html>

More information about the llvm-dev mailing list