[PATCH] D22867: [LV] Untangle the concepts of uniform and scalar

Matthew Simpson via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 1 07:34:05 PDT 2016


mssimpso added inline comments.

================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:1539
@@ +1538,3 @@
+  /// during vectorization. Non-uniform scalarized instructions will be
+  /// represted by VF values in the vectorized loop, each corresponding to an
+  /// iteration of the original scalar loop.
----------------
mkuper wrote:
> represted -> represented.
Thanks.

================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:4955
@@ -4863,4 +4954,3 @@
 
-  // Also add all consecutive pointer values; these values will be uniform
-  // after vectorization (and subsequent cleanup).
-  for (auto *BB : TheLoop->blocks()) {
+  // Also add all uniform pointer values.
+  for (auto *BB : TheLoop->blocks())
----------------
mkuper wrote:
> This is still not quite right.
> getUniformPtr() doesn't actually return a pointer if I has a uniform pointer argument. It does for the consecutive and interleaved case, but not for "real" scalar loop-invariant uniform pointers (e.g. a load from a global) - that is, uniform in the Legal->isUniform() sense.
> 
> Have I already thanked you for untangling this? :-)
Good point. Actually, given the smallness of the change here (just adding the interleaved case), I'm thinking it might make sense to move getUniformPtr back inside collectLoopUniforms, with the appropriate updates to the comments. There's probably value in avoiding creating additional uses of the term "uniform".


https://reviews.llvm.org/D22867





More information about the llvm-commits mailing list