[PATCH] D118051: [VPlan] Remove dead header-phi recipes.

Ayal Zaks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 21 09:49:42 PST 2022


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

Looks good to me, thanks!



================
Comment at: llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp:303
 
-    // Visit all casts connected to IV and in Casts. Collect them.
-    // remember them for removal.
+    // A sequence of IR Casts has potentially been recorded for IV, which need
+    // to be bypassed when the IV is vectorized, because the vectorized IV will
----------------
Ayal wrote:
> Worth emphasizing "need to be" - unlike other VPlanTransforms/VPlan2VPlan optimizations, this optimization is mandatory.
> Perhaps better call it "removeObsoleteInductionCasts()"? (comment is indep. of this patch)
Continued thoughts: this can be thought of as two separate optimizations - folding adjacent casts into one, and folding a cast into an IV. Can potentially be recognized by analyzing VPlan rather than the underlying IR, if/when done so will turn into a non-mandatory optimization.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118051



More information about the llvm-commits mailing list