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

Ayal Zaks via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 8 01:01:35 PDT 2016


Ayal added inline comments.

================
Comment at: lib/Analysis/LoopAccessAnalysis.cpp:574
@@ -572,3 +573,3 @@
           (!ShouldCheckStride ||
-           isStridedPtr(PSE, Ptr, TheLoop, StridesMap) == 1)) {
+           (isStridedPtr(PSE, Ptr, Lp, StridesMap) == 1 && Lp != nullptr && Lp->contains(TheLoop)))) {
         // The id of the dependence set.
----------------
Ayal wrote:
> "&& Lp != nullptr &&" >> "&& Lp &&"
Can you indeed check if ScalarEvolution::isLoopInvariant on the SCEV of Ptr here wrt TheLoop, as Adam suggested below, instead of checking if Lp->contains(TheLoop)?


http://reviews.llvm.org/D17268





More information about the llvm-commits mailing list