Dong Chen
2013-Apr-09 09:19 UTC
[LLVMdev] get the identifies of the unnamed temporaries from the instruction of LLVM IR
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? -- View this message in context: http://llvm.1065342.n5.nabble.com/get-the-identifies-of-the-unnamed-temporaries-from-the-instruction-of-LLVM-IR-tp56572p56577.html Sent from the LLVM - Dev mailing list archive at Nabble.com.
Duncan Sands
2013-Apr-09 09:40 UTC
[LLVMdev] get the identifies of the unnamed temporaries from the instruction of LLVM IR
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.
Dong Chen
2013-Apr-09 09:56 UTC
[LLVMdev] get the identifies of the unnamed temporaries from the instruction of LLVM IR
hi, Duncan: thanks for your patience. i have tried it. using instuction: errs()<<i->getOperand(0); but it prints the address: someting like 0x1139700; i checked the defination of getOperand() is Value* getOperand( unsigned int i); so is there someting i missed? -- View this message in context: http://llvm.1065342.n5.nabble.com/get-the-identifies-of-the-unnamed-temporaries-from-the-instruction-of-LLVM-IR-tp56572p56579.html Sent from the LLVM - Dev mailing list archive at Nabble.com.
Maybe Matching Threads
- [LLVMdev] get the identifies of the unnamed temporaries from the instruction of LLVM IR
- [LLVMdev] get the identifies of the unnamed temporaries from the instruction of LLVM IR
- [LLVMdev] get the identifies of the unnamed temporaries from the instruction of LLVM IR
- [LLVMdev] get the identifies of the unnamed temporaries from the instruction of LLVM IR
- [LLVMdev] get the identifies of the unnamed temporaries from the instruction of LLVM IR