[PATCH] D150027: [VPlan] Use VPOpWithIRFlags for VPReplicateRecipe, retire poison map.

Ayal Zaks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 8 05:01:03 PDT 2023


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

LGTM with a couple of minor nits.



================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:1074
       // either drop them directly if the recipe already models the flags or
       // collect them in a set.
       // TODO: Migrate all relevant recipes to hold their own flags.
----------------
Update above comment and remove TODO below?


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:1076-1078
+      if (auto *OpWithFlags = dyn_cast<VPRecipeWithIRFlags>(CurRec)) {
+        OpWithFlags->dropPoisonGeneratingFlags();
+      } else {
----------------



================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:2849
   // load/store.
-  if (State.MayGeneratePoisonRecipes.contains(RepRecipe))
-    Cloned->dropPoisonGeneratingFlags();
+  Cloned->dropPoisonGeneratingFlags();
+	RepRecipe->setFlags(Cloned);
----------------
Above is redundant and should be dropped?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150027



More information about the llvm-commits mailing list