[PATCH] D128831: [VPlan] Remove dead recipes before merging regions.

Ayal Zaks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 30 13:33:27 PDT 2022


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

This minimal improvement is fine, thanks! Adding some optional nits:

Would "[VPlan] Move remove dead recipes before merging regions." be a clearer title?

> This can enable additional region merging.

while OTOH not losing opportunities as region merging does not produce dead recipes?

Note that it may be useful for VPlan2VPlan transforms to return an indication if they made any changes.



================
Comment at: llvm/test/Transforms/LoopVectorize/vplan-sink-scalars-and-merge.ll:1106
 ; CHECK-NEXT:     pred.store.continue:
+; CHECK-NEXT:       PHI-PREDICATED-INSTRUCTION vp<[[P_LOAD:%.+]]> = ir<%l>
 ; CHECK-NEXT:     No successors
----------------
Should removeDeadRecipes also run after mergeReplicateRegions, to clean-up such phi recipes it leaves behind?


================
Comment at: llvm/test/Transforms/LoopVectorize/vplan-sink-scalars-and-merge.ll:1143
   %l = load i32, i32* %gep.src, align 16
   %dead_gep = getelementptr inbounds i32, i32* %dst, i64 1
   %gep.dst = getelementptr inbounds i32, i32* %dst, i32 %iv
----------------
Hmm, this dead_gep may indeed prevent regions to merge, but is it visible in VPlan?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128831



More information about the llvm-commits mailing list