[PATCH] D150028: [VPlan] Clear reduction flags directly as VPlanTransform.

Ayal Zaks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 8 04:38:32 PDT 2023


Ayal accepted this revision.
Ayal added a comment.
This revision is now accepted and ready to land.

Looks good to me!



================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8846
                              RecipeBuilder, Range.Start);
+  VPlanTransforms::clearReductionWrapFlags(*Plan);
 
----------------
nit: should it be part of adjustRecipesForReductions() - which adjusts not only inloop reductions contrary to comment?


================
Comment at: llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp:770
+    SmallVector<VPValue *, 8> Worklist;
+    SmallPtrSet<VPValue *, 8> Visited;
+    Worklist.push_back(PhiR);
----------------
nit (independent of this patch): use a single SmallSetVector Worklist?


================
Comment at: llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp:776-779
+      if (auto *OpWithFlags =
+              dyn_cast<VPRecipeWithIRFlags>(Cur->getDefiningRecipe())) {
+        OpWithFlags->dropPoisonGeneratingFlags();
+      }
----------------



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150028/new/

https://reviews.llvm.org/D150028



More information about the llvm-commits mailing list