Re: [PATCH] D17268: [LAA] Function 'isStridedPtr' returns additional result “Loop *Lp” via function argument and add appropriate checks out of the 'isStridedPtr'.

Roman Shirokiy via llvm-commits llvm-commits at lists.llvm.org
Tue May 10 11:56:21 PDT 2016


roman.shirokiy added a comment.

In http://reviews.llvm.org/D17268#421675, @anemet wrote:

> Ah, thanks for writing this up.  For some reason, I thought that we were failing somewhere else during the second phase (when we prove independence with RT checks only).
>
> I still don't think that tweaking isStridedPtr to prove non-wrapping for more cases is the right approach.  If the address is not a recurrence (e.g. just a global address) that is also trivially non-wrapping but would fail early in getPtrStride.
>
> How about leaving isStridedPtr/getPtrStride unchanged and creating a new helper isNoWrap (similar to isNoWrapAddRec).  isNoWrap would essentially be isLoopInvariant(...) || getPtrStride(...) == 1.
>
> That would also satisfy Hal's request to hide this behind a call.
>
> What do you think?


Hi Adam!
Sorry for late response, I've been distracted due to Russian holidays. 
Thanks for the suggestion! I really try grasping LAA-stuff, but my understanding of it is quite superficial. I've almost prepared updated diff, but I wonder why originally there was no check for negative unit stride?

In http://reviews.llvm.org/D17268#421675, @anemet wrote:

> No need to.  You can just commit that part right away and then rebase this patch on top of that.


This was commited in r269020.


http://reviews.llvm.org/D17268





More information about the llvm-commits mailing list