[llvm] VPlan: prepare to recursively simplify recipes (PR #105699)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 26 03:55:55 PDT 2024


================
@@ -1009,8 +1015,16 @@ static void simplifyRecipes(VPlan &Plan, LLVMContext &Ctx) {
       Plan.getEntry());
   VPTypeAnalysis TypeInfo(Plan.getCanonicalIV()->getScalarType(), Ctx);
   for (VPBasicBlock *VPBB : VPBlockUtils::blocksOnly<VPBasicBlock>(RPOT)) {
-    for (VPRecipeBase &R : make_early_inc_range(*VPBB)) {
-      simplifyRecipe(R, TypeInfo);
+    // Populate a Worklist, as simplifyRecipe might return a new recipe that we
----------------
artagnon wrote:

> append_range(NewRecipes, simplifyRecipe(*NewR, TypeInfo))

Also, didn't we decide to add it to the front of the worklist, and not the back?

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


More information about the llvm-commits mailing list