<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">You can use the GetUnderlyingObjects function (notice the S at the end of the name) to collect zero or more underlying objects.  This method is similar to GetUnderlyingObject except that it can look through phi and select instructions and return multiple objects. <div><br><div><div>On Mar 14, 2013, at 4:15 AM, rahul <<a href="mailto:rahul3527@gmail.com">rahul3527@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">Hi,<div><br></div><div>I am writing a pass that works at machine level and runs as last pass in llc (just before converting llvm specific machine instructions into target specific instructions) </div><div>In this pass I am trying to get underlying object for memory operations. </div><div>It turns out that due to various optimizations on machine instructions, the memory operand in the operation is not always getelementptr (for e.g., it can be phi node/bitcast/inttoptr instruction)</div><div>Can someone suggest best way to get the underlying object??</div><div><br></div><div><div>-- </div>Regards,<br>Rahul Patil.</div><br><hr align="left" width="300">View this message in context:<span class="Apple-converted-space"> </span><a href="http://llvm.1065342.n5.nabble.com/Get-underlying-object-for-Machine-level-memory-operation-tp55970.html">Get underlying object for Machine level memory operation</a><br>Sent from the<span class="Apple-converted-space"> </span><a href="http://llvm.1065342.n5.nabble.com/LLVM-Dev-f3.html">LLVM - Dev mailing list archive</a><span class="Apple-converted-space"> </span>at<span class="Apple-converted-space"> </span><a href="http://nabble.com/">Nabble.com</a>.<br>_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a><span class="Apple-converted-space"> </span>        <a href="http://llvm.cs.uiuc.edu/">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a></div></blockquote></div><br></div></body></html>