[llvm] [VPlan] Unify inner and outer loop paths (NFCI). (PR #192868)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 30 03:36:13 PDT 2026
================
@@ -2972,8 +2972,60 @@ void LoopVectorizationCostModel::collectLoopUniforms(ElementCount VF) {
Uniforms[VF].insert_range(Worklist);
}
+// This function will select a scalable VF if the target supports scalable
+// vectors and a fixed one otherwise.
+// TODO: we could return a pair of values that specify the max VF and
+// min VF, to be used in `buildVPlans(MinVF, MaxVF)` instead of
+// `buildVPlans(VF, VF)`. We cannot do it because VPLAN at the moment
+// doesn't have a cost model that can choose which plan to execute if
+// more than one is generated.
+static ElementCount determineVPlanVF(const TargetTransformInfo &TTI,
----------------
fhahn wrote:
Updated the name. Will check if we can re-use this for inner loop as well, but the logic there is quite a bit more involved
https://github.com/llvm/llvm-project/pull/192868
More information about the llvm-commits
mailing list