[llvm] r227992 - [LoopVectorize] Fix rebase glitch in r227751

Adam Nemet anemet at apple.com
Tue Feb 3 09:59:54 PST 2015


Author: anemet
Date: Tue Feb  3 11:59:53 2015
New Revision: 227992

URL: http://llvm.org/viewvc/llvm-project?rev=227992&view=rev
Log:
[LoopVectorize] Fix rebase glitch in r227751

LoopVectorizationLegality::{getNumLoads,getNumStores} should forward to
LoopAccessAnalysis now.

Thanks to Takumi for noticing this!

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

Modified: llvm/trunk/include/llvm/Analysis/LoopAccessAnalysis.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/LoopAccessAnalysis.h?rev=227992&r1=227991&r2=227992&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/LoopAccessAnalysis.h (original)
+++ llvm/trunk/include/llvm/Analysis/LoopAccessAnalysis.h Tue Feb  3 11:59:53 2015
@@ -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);

Modified: llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp?rev=227992&r1=227991&r2=227992&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp Tue Feb  3 11:59:53 2015
@@ -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.





More information about the llvm-commits mailing list