[PATCH] [LoopVectorize] Split out LoopAccessAnalysis from LoopVectorizationLegality

hfinkel at anl.gov hfinkel at anl.gov
Fri Jan 30 05:06:18 PST 2015

Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:613
@@ +612,3 @@
+/// This class is responsible for analyzing the memory accesses of a loop either
+/// at compile or at run-time.  It collects the accesses and then its main
+/// helper the AccessAnalysis class finds and categorizes the dependences in
This class does not do anything "at run-time" ;)

Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:1800
@@ -1744,3 +1799,3 @@
-bool LoopVectorizationLegality::isUniform(Value *V) {
+bool LoopAccessAnalysis::isUniform(Value *V) {
   return (SE->isLoopInvariant(SE->getSCEV(V), TheLoop));
Can you please group together the implementations of the functions for each class? I can see some advantage to having these two near each other, but in the end, I think having the implementation spread out over different parts of the file is confusing.

Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:5072
@@ -5011,1 +5071,3 @@
+bool LoopVectorizationLegality::canVectorizeMemory() {
+  return LAA.canVectorizeMemory(Strides);
(here too, please group these with the others)



More information about the llvm-commits mailing list