================
@@ -5521,9 +5523,9 @@ void LoopVectorizationPlanner::plan(
   // for later use by the cost model.
   Config.computeMinimalBitwidths();
 
-  SmallVector<LoopVectorizationCostModel *, 2> EnabledCMs;
-  EnabledCMs.push_back(&CM);
-
+  SmallVector<std::pair<LoopVectorizationCostModel *, VPlanPtr>, 2> EnabledCMs;
----------------
sdesmalen-arm wrote:

I don't like the idea of keeping track of two duplicate CostModels/Plans here 
in this function. It would actually be a lot simpler to call `plan()` twice, 
once with the default cost model, and once with the tail-folding cost-model (if 
present). Then this function hardly needs any changes.

The only change it would need would be for the function to take a `bool 
ForceTailFoldedPlans` flag that simply returns if `computeMaxVF()` disabled 
tail folding.

https://github.com/llvm/llvm-project/pull/207815
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to