[polly] r292140 - ScopInfo: document base pointers in alias-checks must be invariant [NFC]

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 16 07:49:14 PST 2017


Author: grosser
Date: Mon Jan 16 09:49:14 2017
New Revision: 292140

URL: http://llvm.org/viewvc/llvm-project?rev=292140&view=rev
Log:
ScopInfo: document base pointers in alias-checks must be invariant [NFC]

Before this change, this code has been mixed with a check for non-affine
loops (and when originally introduce was also duplicated). By creating
a separate loop and explicitly documenting this property, the current
behavior becomes a lot more clear.

Modified:
    polly/trunk/lib/Analysis/ScopInfo.cpp

Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=292140&r1=292139&r2=292140&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Mon Jan 16 09:49:14 2017
@@ -3034,6 +3034,11 @@ bool Scop::buildAliasGroup(Scop::AliasGr
       invalidate(ALIASING, MA->getAccessInstruction()->getDebugLoc());
       return false;
     }
+  }
+
+  // Ensure that for all memory accesses for which we generate alias checks,
+  // their base pointers are available.
+  for (MemoryAccess *MA : AliasGroup) {
     if (MemoryAccess *BasePtrMA = lookupBasePtrAccess(MA))
       addRequiredInvariantLoad(
           cast<LoadInst>(BasePtrMA->getAccessInstruction()));




More information about the llvm-commits mailing list