[LLVMdev] type of the store operand

Zheng Wang jason.wangz at gmail.com
Fri May 14 07:21:16 PDT 2010


Hiya,

I want to know what's the type of the operand (value) along with the
store instruction. For example, the following instruction store the
content in an integer type pointer scevgep99.1 to the address another
integer pointer points to.

*"store i8* %scevgep99.1, i8** %scevgep92.1, align 4"*

It seems there is no APIs in StoreInst can do this.

Is there any way to figure the type of the operand of the store instruction?


-----------------------------------

 %scevgep92.1 = bitcast i8* %scevgep.1 to i8**   ; <i8**> [#uses=1]
  %tmp96.1 = mul i32 %36, %41                     ; <i32> [#uses=1]
  %tmp97.1 = add i32 %tmp96.1, 32                 ; <i32> [#uses=1]
  %tmp98.1 = add i32 %tmp97.1, %61                ; <i32> [#uses=1]
  %scevgep99.1 = getelementptr i8* %56, i32 %tmp98.1 ; <i8*> [#uses=1]
  store i8* %scevgep99.1, i8** %scevgep92.1, align 4
  %scevgep.2 = getelementptr i8* %0, i32 112      ; <i8*> [#uses=1]
  %scevgep92.2 = bitcast i8* %scevgep.2 to i8**   ; <i8**> [#uses=1]

Cheers,
Zheng



More information about the llvm-dev mailing list