[llvm] [VPlan] Connect (MemRuntime|SCEV)Check blocks as VPlan transform (NFC). (PR #143879)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 5 12:25:00 PDT 2025


================
@@ -560,6 +564,9 @@ class LoopVectorizationPlanner {
                                   VPRecipeBuilder &RecipeBuilder,
                                   ElementCount MinVF);
 
+  /// Add the runtime checks from \p RTChecks to \p VPlan.
+  void addRuntimeChecks(VPlan &Plan, GeneratedRTChecks &RTChecks) const;
----------------
ayalz wrote:

```suggestion
  /// Attach the runtime checks of \p RTChecks to \p VPlan.
  void attachRuntimeChecks(VPlan &Plan, GeneratedRTChecks &RTChecks) const;
```
?
The runtime checks are conceptually "there", but held detached from VPlan(s) until now for compactness, and detached from IR until VPlan execution.
This method wraps `connectRuntimeChecks()` with asserts and remarks. Suffice to have a single `VPlanTransform::attachRuntimeCheck()` with a unified assert and remark - of a conflict between a runtime check and OptForSize?

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


More information about the llvm-commits mailing list