[PATCH] D11051: Extend LICM to hoist loop invariant GEP out

hfinkel at anl.gov hfinkel at anl.gov
Sat Jul 25 16:30:25 PDT 2015


hfinkel added a comment.

In http://reviews.llvm.org/D11051#212087, @hulx2000 wrote:

> Thanks Hal.
>
> For you comments about stripAndAccumulateInBoundsConstantOffsets and getObjectSize.., I didn't understand it 100%, please let me know if that is what you are thinking.


I mean that you can call stripAndAccumulateInBoundsConstantOffsets on the first GEP you form (the one with the constant index), which will give you a new base and an offset. You can then call getObjectSize on that new base, and that might give you the object size. If the Offset <= ObjectSize, then you can mark the first GEP as inbounds.

> Regards



Repository:
  rL LLVM

http://reviews.llvm.org/D11051







More information about the llvm-commits mailing list