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

Hideki Saito via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 1 12:39:37 PST 2019


hsaito added a comment.

While we are at this, let's talk about downstream dependency, if any, for allowing more than one candidate VF along the native path. At least we can write down a list of TODOs so that we'll be aware of the things we need to improve at a time in the future.

This may be a bit more than what you anticipated for this patch, but I think this will help everyone.



================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:7098
 
+unsigned guessVPlanVF(Loop &L, unsigned WidestVectorRegBits) {
+  unsigned Max = 1;
----------------
This is in some sense reinventing the wheel, and I kind of imagine this can quickly get out of control if different people start trying to add different constraints of their interest.

Let's start talking about how we can get to the point of being able to use unified computeMaxVF(). For this patch, however, I'd be happy if we get to the point of being able to use unified getSmallestAndWidestTypes().


================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:7138
 
+  // If the user doesn't provide a vectorization factor, determine a
+  // reasonable one.
----------------
Let's try not do this here. Please do this kind of thing inside planInVPlanNativePath().


Repository:
  rL LLVM

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

https://reviews.llvm.org/D57598





More information about the llvm-commits mailing list