[llvm] VPlan: use worklist in simplifyRecipes (PR #93998)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 20 01:25:40 PDT 2024


================
@@ -986,83 +986,140 @@ void VPlanTransforms::clearReductionWrapFlags(VPlan &Plan) {
   }
 }
 
-/// Try to simplify recipe \p R.
-static void simplifyRecipe(VPRecipeBase &R, VPTypeAnalysis &TypeInfo) {
+/// Try to simplify recipe \p R. Returns candidates for further simplification.
+static SmallVector<VPRecipeBase *>
+simplifyRecipe(VPRecipeBase *R, VPTypeAnalysis &TypeInfo, LLVMContext &Ctx) {
----------------
fhahn wrote:

```suggestion
simplifyRecipe(VPRecipeBase &R, VPTypeAnalysis &TypeInfo, LLVMContext &Ctx) {
```

keep as &R to avoid unrelated changes?

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


More information about the llvm-commits mailing list