This is an archive of the discontinued LLVM Phabricator instance.

llvm-reduce: Fix producing invalid reductions with landingpads
ClosedPublic

Authored by arsenm on Oct 19 2022, 5:12 PM.

Details

Summary

It's not valid to simply branch to a landingpad block, so it
needs to be removed.

Also stop trying to scan forward to find a block that can be merged.
The predecessor merge rules are more complex than this. This also
would need to have considered landingpads. Just do the minimum
to delete the block, and let the simplify-cfg reduction handle
the branch chain cleanups.

Diff Detail

Event Timeline

arsenm created this revision.Oct 19 2022, 5:12 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 19 2022, 5:12 PM
arsenm requested review of this revision.Oct 19 2022, 5:12 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 19 2022, 5:12 PM
Herald added a subscriber: wdng. · View Herald Transcript
arsenm updated this revision to Diff 469643.Oct 21 2022, 9:04 AM

Rebase. Between this and D136461, I'm able to reduce a 56k line testcase without generating invalid reductions

aeubanks accepted this revision.Oct 21 2022, 4:16 PM
This revision is now accepted and ready to land.Oct 21 2022, 4:16 PM