[PATCH] D98509: [LV] Calculate max feasible scalable VF.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 16 02:13:17 PDT 2021


fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:1626
+  /// limited to MaxVF. This is a helper function of computeFeasibleMaxVF.
+  ElementCount getMaxVectorElementCount(unsigned ConstTripCount,
+                                        unsigned SmallestType,
----------------
The other related functions refer to VF instead of element count in their name. Is there a reason to use ElementCount instead of VF here? Perhaps the name could be made a bit more descriptive in general, including the fact that the function computes the max VF based on target-specific properties? 


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:1624
 
+  /// \return the maximum vector size based on the target's vector registers,
+  /// limited to MaxVF. This is a helper function of computeFeasibleMaxVF.
----------------
david-arm wrote:
> Should this be `element count`, since that's what the function returns here?
the other function refer to as VF factor as well, even though they return ElementCount. Using VF (or `vectorization factor`) seems more consistent with the rest of the code and also more descriptive I think, as it conveys some information on what the intended use is.


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

https://reviews.llvm.org/D98509



More information about the llvm-commits mailing list