[PATCH] [LoopVectorize] Split out LoopAccessAnalysis from LoopVectorizationLegality

Adam Nemet anemet at apple.com
Fri Jan 30 10:16:00 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
hfinkel wrote:
> This class does not do anything "at run-time" ;)
Sure, I'll reword it.

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));
hfinkel wrote:
> 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.
Sure.  I just kept the original order so that it's immediately apparent what changed in the diff.  Sometime these things show up as code movement with modifications which are harder to figure out. 

What do you think about adjusting the order in an additional step in the patchset?



More information about the llvm-commits mailing list