[LLVMdev] GetElementPtr

Reid Kleckner reid.kleckner at gmail.com
Thu Dec 8 11:08:03 PST 2011


Why would you want to remove all GEP instructions?  inttoptr+math+ptrtoint
don't have the exact same semantics in LLVM IR.  GEP instructions have
certain guarantees about what addresses can be computed with them that
straight pointer arithmetic doesn't.

Reid

On Thu, Dec 8, 2011 at 2:00 PM, Ryan Taylor <ryta1203 at gmail.com> wrote:

> Do you think I could use the SelectionDAGBuilder in a pass to accomplish
> this for me? if there is already code that does this I don't really think I
> should have to do this again, unless it's not possible to access that code
> from the stage where I want to use it?
>
> On Thu, Dec 8, 2011 at 12:56 AM, Pedro Ferreira <pedro.ferreira at imgtec.com
> > wrote:
>
>>  I was unaware of its removal. I am still using 2.8. I grep'd the source
>> tree for that pass and found it on the header I mentioned; it led me to
>> believe the pass was still there.
>>
>> The transformation itself isn't complicated; doing it manually should be
>> simple.
>>
>>
>> On 07/12/11 21:50, Ryan Taylor wrote:
>>
>> There is a GEPSplitterPass in the Scalar.h but not in the
>> LLVM_SRC/lib/Transforms/Scalar folder, there is no GEPSplitterPass.cpp
>> file. Is it possible to get this from 2.8 and compile it and use it for 2.9?
>>
>>  On Wed, Dec 7, 2011 at 12:31 PM, Ryan Taylor <ryta1203 at gmail.com> wrote:
>>
>>> Looking at the release notes for 2.9, it appears that GEPSplitterPass
>>> has been removed from 2.9. Is this the case, can I access it anyways or no?
>>>
>>> Due to all the changes between versions of LLVM, it's not timely to
>>> switch to any other version of LLVM, since the code modifications would be
>>> too many. Any other ideas?
>>>
>>>
>>> On Wed, Dec 7, 2011 at 12:14 PM, Ryan Taylor <ryta1203 at gmail.com> wrote:
>>>
>>>> Yes, exactly along these lines, how do I use this pass? It's not
>>>> documented in the Transforms section of llvm.org
>>>>
>>>>
>>>>  On Wed, Dec 7, 2011 at 6:06 AM, Pedro Ferreira <
>>>> pedro.ferreira at imgtec.com> wrote:
>>>>
>>>>>  You mean, something along the lines of the GEPSplitterPass?
>>>>>
>>>>> // GEPSplitter - Split complex GEPs into simple ones
>>>>>
>>>>> in
>>>>>
>>>>> ./include/llvm/Transforms/Scalar.h
>>>>>
>>>>>
>>>>> On 06/12/11 20:53, Ryan Taylor wrote:
>>>>>
>>>>>  Does a transform exist to breakdown the GEP?
>>>>>
>>>>>
>>>>>  _______________________________________________
>>>>> LLVM Developers mailing listLLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.eduhttp://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>>
>
> _______________________________________________
> 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/20111208/626592cf/attachment.html>


More information about the llvm-dev mailing list