From: Adam Nemet Date: Thu, 16 Jun 2016 08:27:03 +0000 (+0000) Subject: [LAA] Rename Strides to SymblicStrides in analyzeLoop. NFC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2e5ed34ad61ffbda3507ad49381b776bcf1020fb;p=llvm [LAA] Rename Strides to SymblicStrides in analyzeLoop. NFC This is to facilitate to move of SymblicStrides from LV to LAA. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272879 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Analysis/LoopAccessAnalysis.h b/include/llvm/Analysis/LoopAccessAnalysis.h index 21cbdc47fd3..3fd067ef5bb 100644 --- a/include/llvm/Analysis/LoopAccessAnalysis.h +++ b/include/llvm/Analysis/LoopAccessAnalysis.h @@ -599,7 +599,7 @@ public: private: /// \brief Analyze the loop. Substitute symbolic strides using Strides. - void analyzeLoop(const ValueToValueMap &Strides); + void analyzeLoop(const ValueToValueMap &SymbolicStrides); /// \brief Check if the structure of the loop allows it to be analyzed by this /// pass. diff --git a/lib/Analysis/LoopAccessAnalysis.cpp b/lib/Analysis/LoopAccessAnalysis.cpp index 5da6dbb57e8..b16f6093d28 100644 --- a/lib/Analysis/LoopAccessAnalysis.cpp +++ b/lib/Analysis/LoopAccessAnalysis.cpp @@ -1488,7 +1488,7 @@ bool LoopAccessInfo::canAnalyzeLoop() { return true; } -void LoopAccessInfo::analyzeLoop(const ValueToValueMap &Strides) { +void LoopAccessInfo::analyzeLoop(const ValueToValueMap &SymbolicStrides) { typedef SmallPtrSet ValueSet; @@ -1628,7 +1628,8 @@ void LoopAccessInfo::analyzeLoop(const ValueToValueMap &Strides) { // read a few words, modify, and write a few words, and some of the // words may be written to the same address. bool IsReadOnlyPtr = false; - if (Seen.insert(Ptr).second || !getPtrStride(PSE, Ptr, TheLoop, Strides)) { + if (Seen.insert(Ptr).second || + !getPtrStride(PSE, Ptr, TheLoop, SymbolicStrides)) { ++NumReads; IsReadOnlyPtr = true; } @@ -1657,8 +1658,8 @@ void LoopAccessInfo::analyzeLoop(const ValueToValueMap &Strides) { // Find pointers with computable bounds. We are going to use this information // to place a runtime bound check. - bool CanDoRTIfNeeded = - Accesses.canCheckPtrAtRT(PtrRtChecking, PSE.getSE(), TheLoop, Strides); + bool CanDoRTIfNeeded = Accesses.canCheckPtrAtRT(PtrRtChecking, PSE.getSE(), + TheLoop, SymbolicStrides); if (!CanDoRTIfNeeded) { emitAnalysis(LoopAccessReport() << "cannot identify array bounds"); DEBUG(dbgs() << "LAA: We can't vectorize because we can't find " @@ -1673,7 +1674,7 @@ void LoopAccessInfo::analyzeLoop(const ValueToValueMap &Strides) { if (Accesses.isDependencyCheckNeeded()) { DEBUG(dbgs() << "LAA: Checking memory dependencies\n"); CanVecMem = DepChecker.areDepsSafe( - DependentAccesses, Accesses.getDependenciesToCheck(), Strides); + DependentAccesses, Accesses.getDependenciesToCheck(), SymbolicStrides); MaxSafeDepDistBytes = DepChecker.getMaxSafeDepDistBytes(); if (!CanVecMem && DepChecker.shouldRetryWithRuntimeCheck()) { @@ -1686,8 +1687,8 @@ void LoopAccessInfo::analyzeLoop(const ValueToValueMap &Strides) { PtrRtChecking.Need = true; auto *SE = PSE.getSE(); - CanDoRTIfNeeded = - Accesses.canCheckPtrAtRT(PtrRtChecking, SE, TheLoop, Strides, true); + CanDoRTIfNeeded = Accesses.canCheckPtrAtRT(PtrRtChecking, SE, TheLoop, + SymbolicStrides, true); // Check that we found the bounds for the pointer. if (!CanDoRTIfNeeded) {