rahul
2013-Mar-14 11:15 UTC
[LLVMdev] Get underlying object for Machine level memory operation
Hi, 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?? -- Regards, Rahul Patil. -- View this message in context: http://llvm.1065342.n5.nabble.com/Get-underlying-object-for-Machine-level-memory-operation-tp55970.html Sent from the LLVM - Dev mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130314/417ec459/attachment.html>
Nadav Rotem
2013-Mar-14 16:36 UTC
[LLVMdev] Get underlying object for Machine level memory operation
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:> Hi, > > 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?? > > -- > Regards, > Rahul Patil. > > View this message in context: Get underlying object for Machine level memory operation > Sent from the LLVM - Dev mailing list archive at Nabble.com. > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130314/86e2fbff/attachment.html>
Rahul
2013-Mar-15 03:49 UTC
[LLVMdev] Get underlying object for Machine level memory operation
Hi, 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. Thanks, Rahul 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: > > Hi, > > 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?? > > -- > Regards, > 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 > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > >-- Regards, Rahul Patil. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130315/56dfa90f/attachment.html>
Reasonably Related Threads
- [LLVMdev] Get underlying object for Machine level memory operation
- [LLVMdev] Dependence Analysis on Machine code
- [LLVMdev] Dependence Analysis on Machine code
- [LLVMdev] Problems about developing LLVM pass on windows visual studio
- [LLVMdev] AESOP autoparallelizing compiler