[LoopVectorize] Fix rebase glitch in r227751
authorAdam Nemet <anemet@apple.com>
Tue, 3 Feb 2015 17:59:53 +0000 (17:59 +0000)
committerAdam Nemet <anemet@apple.com>
Tue, 3 Feb 2015 17:59:53 +0000 (17:59 +0000)
LoopVectorizationLegality::{getNumLoads,getNumStores} should forward to
LoopAccessAnalysis now.

Thanks to Takumi for noticing this!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227992 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/LoopAccessAnalysis.h
lib/Transforms/Vectorize/LoopVectorize.cpp

index b50aacf2c5e9766c8f86dd63c96043c1e36b5ee5..7e4b9d72e5b83258492276846af81adc0911f0b6 100644 (file)
@@ -159,7 +159,9 @@ public:
   /// Returns true if the value V is uniform within the loop.
   bool isUniform(Value *V);
 
-  unsigned getMaxSafeDepDistBytes() { return MaxSafeDepDistBytes; }
+  unsigned getMaxSafeDepDistBytes() const { return MaxSafeDepDistBytes; }
+  unsigned getNumStores() const { return NumStores; }
+  unsigned getNumLoads() const { return NumLoads;}
 
 private:
   void emitAnalysis(VectorizationReport &Message);
index e6d837134757cbe316602ad0092403037a50b15c..8d0c817e882ea4c619410f5c3ed39fbf858ae2d9 100644 (file)
@@ -555,7 +555,7 @@ public:
                             DominatorTree *DT, TargetLibraryInfo *TLI,
                             AliasAnalysis *AA, Function *F,
                             const TargetTransformInfo *TTI)
-      : NumLoads(0), NumStores(0), NumPredStores(0), TheLoop(L), SE(SE), DL(DL),
+      : NumPredStores(0), TheLoop(L), SE(SE), DL(DL),
         TLI(TLI), TheFunction(F), TTI(TTI), Induction(nullptr),
         WidestIndTy(nullptr),
         LAA(F, L, SE, DL, TLI, AA, DT,
@@ -780,10 +780,10 @@ public:
     return (MaskedOp.count(I) != 0);
   }
   unsigned getNumStores() const {
-    return NumStores;
+    return LAA.getNumStores();
   }
   unsigned getNumLoads() const {
-    return NumLoads;
+    return LAA.getNumLoads();
   }
   unsigned getNumPredStores() const {
     return NumPredStores;
@@ -842,8 +842,6 @@ private:
     VectorizationReport::emitAnalysis(Message, TheFunction, TheLoop);
   }
 
-  unsigned NumLoads;
-  unsigned NumStores;
   unsigned NumPredStores;
 
   /// The loop that we evaluate.