[llvm] [LV] Return best VPlan together with VF from computeBestVF (NFC). (PR #190385)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 6 02:44:25 PDT 2026
fhahn wrote:
> > I wonder if we can also just set the plan's VF in `computeBestVF`. That way we could just return the plan itself and we wouldn't need to plumb the best VF through to `LoopVectorizationPlanner::executePlan`.
>
> +1, either as an alternative or as a follow-up to this patch: instead of `computeBestVF()` have `computeBestPlan()` which returns the best plan alone, which holds only the BestVF in its vectorFactors - possibly cloning this plan if it represents multiple VF's (as done in narrowInterleaveGroups()). And have plan provide its single VF via `getConcreteVF()` or `getSingleVF()`.
Let me do this in a folllow-up. The reason I did not pull this in here is that we would need to clone the plan and return a clone, due to epilogue vectorization using the same list of plans.
https://github.com/llvm/llvm-project/pull/190385
More information about the llvm-commits
mailing list