[PATCH] D57837: [LV] Prevent interleaving if computeMaxVF returned None.

Renato Golin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 6 14:02:14 PST 2019


rengolin added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:6101
     if (VPlanBuildStressTest)
-      return NoVectorization;
+      return VectorizationFactor::NoVectorization();
 
----------------
Nit: To avoid redundancy in the name, I'd just call it something like "Disabled"...




================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7323
+
+  VectorizationFactor VF = VectorizationFactor::NoVectorization();
+  unsigned IC = 1;
----------------
This pattern feels like it could be an utility function of `VectorizationFactor`...


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7330
+    // Select the interleave count.
+    IC = CM.selectInterleaveCount(OptForSize, VF.Width, VF.Cost);
 
----------------
None of the parameters depend on IC and this call will override the value, why initialise with 1 above?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57837/new/

https://reviews.llvm.org/D57837





More information about the llvm-commits mailing list