[llvm-dev] questions about temporary variables in IntermidateRepresentation(IR)
PeiLIU via llvm-dev
llvm-dev at lists.llvm.org
Thu May 12 03:57:17 PDT 2016
Now, I am get the .ll file, some code just like this in the below.
%call89 = call noalias i8* @malloc(i64 %add88) #5, !dbg !374
%71 = bitcast i8* %call89 to i32*, !dbg !374
store i32* %71, i32** %buffer2, align 8, !dbg !374
You can see that the first operand of store is a temporary variables %71.
Q1. the StoreInst->getOperand(0)->getName().str() return the string
how does it happened, can I get that "71" name.
Q2. I want to get the real operand that is call89 which returned by
malloc. How can I get the original operand call89? I know I can get that
previous instruction bitcast, I can get it from the previous instruction
but it only work
in this circumstance the bitcast instruction, if the previous instruction
is changed, how
I get the variable name in efficiency. Is there a efficiency and elegance
way to get the
origin operand avoid temporary variables like 71(just decimal numbers).
Thanks a lot. Forgive I am a novice llvmer :)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev