This is an archive of the discontinued LLVM Phabricator instance.

[VPlan] Remove dead recipes before sinking.
ClosedPublic

Authored by fhahn on Sep 13 2022, 1:27 AM.

Details

Summary

optimizeInductions may leave dead recipes which can prevent sinking.
Sinking on the other hand should not introduce new dead recipes, so
clean up dead recipes before sinking.

Depends on D133760.

Diff Detail

Event Timeline

fhahn created this revision.Sep 13 2022, 1:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 13 2022, 1:27 AM
fhahn requested review of this revision.Sep 13 2022, 1:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 13 2022, 1:27 AM
Ayal accepted this revision.Sep 20 2022, 12:24 AM

LGTM! Adding a minor nit.

llvm/test/Transforms/LoopVectorize/pointer-induction.ll
39–40

Is this GEP replicated sinking intentional/helpful/harmful?

This revision is now accepted and ready to land.Sep 20 2022, 12:24 AM
fhahn updated this revision to Diff 467082.Oct 12 2022, 4:11 AM

Rebase so this can be applied directly on current main. I am planning to land this soon.

fhahn marked an inline comment as done.Oct 12 2022, 4:47 AM
fhahn added inline comments.
llvm/test/Transforms/LoopVectorize/pointer-induction.ll
39–40

This is intentional and a consequence of VPlan-based sinking. We will keep a uniform GEP in the header and create a new replicate recipe that is sunk to the users in the replicate region. This comes at the cost of not reusing the uniform GEP in the first pred.store.block, but this should be cleaned up by different passes.

This revision was landed with ongoing or failed builds.Oct 12 2022, 4:50 AM
This revision was automatically updated to reflect the committed changes.
fhahn marked an inline comment as done.