[PATCH] D57598: [VPLAN] Determine Vector Width programmatically.

Francesco Petrogalli via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 27 12:33:52 PDT 2019


fpetrogalli added inline comments.


================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:6103
+      // We set VF to 4 for stress testing.
+      if (VPlanBuildStressTest)
+        VF = 4;
----------------
fhahn wrote:
> I think as a follow up, we can drop VPlanBuildStressTest, now that we do not require a UserVF to build VPlans.
Should I address this in a separate patch or this one?


================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:7157
+  // Also, do not attempt to vectorize if no vector code will be produced.
+  if (VPlanBuildStressTest || EnableVPlanPredication || VF.Width == 1)
     return false;
----------------
fhahn wrote:
> There is VectorizationFactor::Disabled(), which is used in other places. Could you use this here instead of VF.Widht == 1?
 `struct VectorizationFactor` did not have a "==" operator.  I have added it, and adapted this condition.


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

https://reviews.llvm.org/D57598





More information about the llvm-commits mailing list