This can enable additional region merging, while not losing
opportunities as region merging does not produce dead recipes.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
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.
llvm/test/Transforms/LoopVectorize/vplan-sink-scalars-and-merge.ll | ||
---|---|---|
1106 | Should removeDeadRecipes also run after mergeReplicateRegions, to clean-up such phi recipes it leaves behind? | |
1143 | Hmm, this dead_gep may indeed prevent regions to merge, but is it visible in VPlan? |
llvm/test/Transforms/LoopVectorize/vplan-sink-scalars-and-merge.ll | ||
---|---|---|
1106 | Yes, those should also be removed, what is missing is handling in mayHaveSideeffects, which I am also planning on adding as follow-up. | |
1143 | Yes it should be, but we only print the plans once, after all transforms have been applied, so it is not shown in the dump |
Should removeDeadRecipes also run after mergeReplicateRegions, to clean-up such phi recipes it leaves behind?