[llvm] [LV] Adjust exit recipe detection to run on early vplan (PR #183318)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 5 05:58:10 PST 2026
================
@@ -245,6 +245,13 @@ struct HistogramInfo {
: Load(Load), Update(Update), Store(Store) {}
};
+/// Indicates the characteristics of a loop with an uncountable early exit.
+/// * None -- No uncountable exit present.
+/// * ReadOnly -- At least one uncountable exit in a readonly loop.
+/// * ReadWrite -- At least one uncountable exit in a loop with side effects
+/// that may require masking.
+enum class UncountableEarlyExitDetail { None, ReadOnly, ReadWrite };
----------------
david-arm wrote:
This is just a suggestion, but in theory you could actually pull these legality changes out into a separate NFC PR that also changes VPlanTransforms::handleEarlyExits so that it takes the detail as an argument? Since the legality code bails out for read-write you can just assert in VPlanTransforms::handleEarlyExits that the detail is read-only and handle early exits the same as before.
https://github.com/llvm/llvm-project/pull/183318
More information about the llvm-commits
mailing list