[LLVMdev] How to extract Left Hand side of Instruction
John Criswell
criswell at uiuc.edu
Thu Apr 15 12:00:59 PDT 2010
ambika wrote:
> Hi,
>
> Suppose I have llvm Instruction as :
>
> %9 = load i32* %b, align 4
>
> and I want to extract the name of temporary value used here ie 9.
> Can any body tell that how can I do that?
>
I believe it's the getNameStr() method.
Note that not all instructions have names (i.e., getNameStr() might give
you an empty string). I think the LLVM disassembler prints a number
when the instruction has no name.
There's a pass which, I think, gives names to all values, but I don't
recall the pass's name.
-- John T.
> thanks and regards,
> Ambika
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
More information about the llvm-dev
mailing list