]> granicus.if.org Git - llvm/commitdiff
[LAA] Rename Strides to SymblicStrides in analyzeLoop. NFC
authorAdam Nemet <anemet@apple.com>
Thu, 16 Jun 2016 08:27:03 +0000 (08:27 +0000)
committerAdam Nemet <anemet@apple.com>
Thu, 16 Jun 2016 08:27:03 +0000 (08:27 +0000)
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

include/llvm/Analysis/LoopAccessAnalysis.h
lib/Analysis/LoopAccessAnalysis.cpp

index 21cbdc47fd3a02e84c689bbca4395ecceeac2b51..3fd067ef5bb35283c7334204d2edacc17b79732e 100644 (file)
@@ -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.
index 5da6dbb57e833e08e81547d449d56bf89b134cc4..b16f6093d285b8b985cb85975b8aa87218e5a7df 100644 (file)
@@ -1488,7 +1488,7 @@ bool LoopAccessInfo::canAnalyzeLoop() {
   return true;
 }
 
-void LoopAccessInfo::analyzeLoop(const ValueToValueMap &Strides) {
+void LoopAccessInfo::analyzeLoop(const ValueToValueMap &SymbolicStrides) {
 
   typedef SmallPtrSet<Value*, 16> 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) {