[llvm] [LV]Initial support for safe distance in predicated DataWithEVL vectorization mode. (PR #102897)

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 10 16:08:24 PDT 2024


================
@@ -1490,13 +1486,29 @@ class LoopVectorizationCostModel {
     }
   }
 
+  /// Disables previously chosen tail folding policy, sets it to None. Expects,
+  /// that the tail policy was selected.
+  void disableTailFolding() {
+    assert(ChosenTailFoldingStyle && "Tail folding must be selected.");
+    ChosenTailFoldingStyle =
+        std::make_pair(TailFoldingStyle::None, TailFoldingStyle::None);
+  }
+
----------------
ayalz wrote:

In general, it would be better to avoid undoing recorded decisions, as it is difficult to track and update related decisions. VPlan was designed to address this by materializing decisions.

Could max feasible VF's be recomputed once no tail is left to fold, rather than re-selecting tail style?

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


More information about the llvm-commits mailing list