This is an archive of the discontinued LLVM Phabricator instance.

llvm-reduce: Add conditional reduction passes
ClosedPublic

Authored by arsenm on Oct 17 2022, 1:46 PM.

Details

Summary

Copy this technique from bugpoint. Before trying to blindly
delete blocks, try to fold branch conditions. This intuitively
makes more sense for a faster reduction, since you can find
dead paths in the function to prune out before trying to bisect
blocks in source order.

Seems to provide some speedup on my multi-hour reduction samples.

This does have the potential to produce testcases with unreachable
blocks. This is already a problem with the existing block
reduction pass. I'm struggling dealing with invalid reductions
in these cases, so in the future this should probably start
deleting those. However, I do sometimes try to reduce failures
in code that becomes unreachable, so I'm not totally sure
what to do here.

Diff Detail

Event Timeline

arsenm created this revision.Oct 17 2022, 1:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 17 2022, 1:46 PM
arsenm requested review of this revision.Oct 17 2022, 1:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 17 2022, 1:46 PM
Herald added a subscriber: wdng. · View Herald Transcript
aeubanks accepted this revision.Oct 17 2022, 7:11 PM
This revision is now accepted and ready to land.Oct 17 2022, 7:11 PM