[LLVMdev] load instruction memory operands value null

Pankaj Gode godepankaj at yahoo.com
Thu Mar 29 23:40:44 PDT 2012


Hi,
 
For a custom target, there is a pass to perform memory dependence analysis, where, i need to get memory pointer for "load instruction". I want to check the pointer alias behavior. I am getting this by considering the memoperands for the load instruction. 
 
For "load instruction", Machine Instruction dumps as below:
 
vr12<def> = LD_Iri %vr2<kill>, 0; mem:LD4[<unknown>]
 
I checked for memoperands for this MachInst, which are not empty, as "has_empty()" returns false. When I check "Value *", pointed by memoperands_begin() and memoperands_end(), i get NULL value. Thus, I don't the the memory pointer.
 
What can be probable reasons for this behavior? or is this behavior expected? 
 
I have also checked in the lib/CodeGen/SelectionDAG/InstrEmitter.cpp, where MachineInstruction node is created from SDNode, but couldn't get much clue on this.
 
 
Thanks & Regards,
Pankaj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120329/5b9d71c9/attachment.html>


More information about the llvm-dev mailing list