[llvm] [VPlan] Move IV predicate handling to VPlan. (PR #192876)
Mel Chen via llvm-commits
llvm-commits at lists.llvm.org
Mon May 4 02:49:13 PDT 2026
================
@@ -145,6 +145,16 @@ struct VPlanTransforms {
const SmallPtrSetImpl<const PHINode *> &FixedOrderRecurrences,
const SmallPtrSetImpl<PHINode *> &InLoopReductions, bool AllowReordering);
+ /// Finalize SCEV predicates by adding induction predicates from \p Plan to
+ /// \p PSE and checking constraints. Returns false if predicated IVs have
+ /// outside-loop uses via ExitingIVValue, if SCEV predicate complexity exceeds
+ /// \p SCEVCheckThreshold, or if predicates are needed but \p OptForSize is
+ /// true.
----------------
Mel-Chen wrote:
I'm not sure if my understanding is correct.
```suggestion
/// Finalize SCEV predicates by adding induction predicates from \p Plan to
/// \p PSE and checking constraints.
/// \returns false if:
/// - Predicated IVs have outside-loop uses via ExitingIVValue
/// - SCEV predicate complexity exceeds \p SCEVCheckThreshold
/// - Predicates are needed but \p OptForSize is true.
```
https://github.com/llvm/llvm-project/pull/192876
More information about the llvm-commits
mailing list