[LLVMdev] Get underlying object for Machine level memory operation
rahul3527 at gmail.com
Thu Mar 14 20:49:22 PDT 2013
Thanks for suggestion :)
Since I am using llvm-3.1, I didn't find method
"GetUnderlyingObjects "(available in llvm-3.2).
I was writing my own function to handle various memory operands. But I
guess, this should help me out.
On Thu, Mar 14, 2013 at 10:06 PM, Nadav Rotem <nrotem at apple.com> wrote:
> 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.
> On Mar 14, 2013, at 4:15 AM, rahul <rahul3527 at gmail.com> wrote:
> 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)
> In this pass I am trying to get underlying object for memory operations.
> 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)
> Can someone suggest best way to get the underlying object??
> Rahul Patil.
> View this message in context: Get underlying object for Machine level
> memory operation<http://llvm.1065342.n5.nabble.com/Get-underlying-object-for-Machine-level-memory-operation-tp55970.html>
> Sent from the LLVM - Dev mailing list archive<http://llvm.1065342.n5.nabble.com/LLVM-Dev-f3.html>
> at Nabble.com <http://nabble.com/>.
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev