[LLVMdev] get the identifies of the unnamed temporaries from the instruction of LLVM IR
Duncan Sands
baldrick at free.fr
Tue Apr 9 02:40:48 PDT 2013
Hi,
On 09/04/13 11:19, Dong Chen wrote:
> hi, Duncan Sands:
> thanks for your reply old friend.
> the reason why I want to get the unnamed value is that I am doing some
> analysis based on the IR code. And IR is in the form of SSA(static single
> assignment). so i need to get the operands of each instructions including a
> lot of instructions like this (%4 = mul nsw i32 %1, %width).
> the unnamed values are the connection of instructions, if i can't get that,
> how can i know the dependency of the instructions?
if I is your multiplication instruction, then I->getOperand(0) is the first
argument (printed as %1 in the human readable IR).
Ciao, Duncan.
More information about the llvm-dev
mailing list