[LLVMdev] LHS of an expression

abhi232 at cc.gatech.edu abhi232 at cc.gatech.edu
Mon Jul 23 12:47:16 PDT 2007


hello all,
If i have an IR instruction of the form
%tmp10 = call sbyte* %malloc( uint 4 )          ; <sbyte*> [#uses=1]
%tmp10 = cast sbyte* %tmp10 to int*             ; <int*> [#uses=1]
store int* %tmp10, int** %t

which is nothin but a malloc call how can i get %tmp into maybe a variable
set.

If i have a store instruction then it is pretty much simpler as the
getOperand(1) can give me the LHS of the expression but in the above case
how can we get it.

I tried searching for some stuff and got a method called getLHS() method
using BinaryOperator and takes Binops as parameter but i dont think that
is of much help if i am having a malloc instruction.

Can anybody please guide me on this thing please?
Thanks in advance..
Abhinav





More information about the llvm-dev mailing list