[llvm] [VPlan] Update getBestPlan to return VF, use also for epilogue vec. (PR #98821)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 24 10:21:19 PDT 2024


================
@@ -365,8 +365,9 @@ class LoopVectorizationPlanner {
   /// Return the best VPlan for \p VF.
   VPlan &getBestPlanFor(ElementCount VF) const;
 
-  /// Return the most profitable plan and fix its VF to the most profitable one.
-  VPlan &getBestPlan() const;
+  /// Return the most profitable vectorization factor together with the most
+  /// profitable plan containing that vectorization factor.
+  std::pair<ElementCount, VPlan &> getBestPlan() const;
----------------
fhahn wrote:

Updated to introduce `getBestVF` and use it in combination with `getBestPlanFor`, without a map yet.

https://github.com/llvm/llvm-project/pull/98821


More information about the llvm-commits mailing list