[llvm] [LV] Provide utility routine to find uncounted exit recipes (PR #152530)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 26 02:46:54 PDT 2025


================
@@ -138,3 +138,110 @@ VPBasicBlock *vputils::getFirstLoopHeader(VPlan &Plan, VPDominatorTree &VPDT) {
   });
   return I == DepthFirst.end() ? nullptr : cast<VPBasicBlock>(*I);
 }
+
+std::optional<VPValue *>
+vputils::getRecipesForUncountedExit(VPlan &Plan,
+                                    SmallVectorImpl<VPRecipeBase *> &Recipes,
+                                    SmallVectorImpl<VPRecipeBase *> &GEPs) {
+  using namespace llvm::VPlanPatternMatch;
+  // Given a vplan like the following (just including the recipes contributing
----------------
fhahn wrote:

```suggestion
  // Given a VPlan like the following (just including the recipes contributing
```

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


More information about the llvm-commits mailing list