This is an archive of the discontinued LLVM Phabricator instance.

llvm-reduce: run the set of passes more times, by default
ClosedPublic

Authored by regehr on Jun 21 2022, 8:38 AM.

Details

Summary

calling llvm-reduce with -max-pass-iterations=N for some N>1 often makes a real difference in the quality of its output. I often forget to add this cumbersome option and get suboptimal results, and the other day I was talking to a heavy user of llvm-reduce who didn't even realize it could do certain transformations because they often get suppressed by the default pass ordering.

this patch sets the default max-pass-iterations to 5 instead of 1. I believe that nearly all users will benefit from this. this only drawback is increased execution time, this patch causes "ninja check" of the llvm-reduce subdir take about 1.7 seconds on my machine instead of 1.2 seconds, previously. my strong belief is that most llvm-reduce users are not bottlenecked by this sort of minor increase in execution time, and that they'll appreciate the improved outputs.

Diff Detail

Event Timeline

regehr created this revision.Jun 21 2022, 8:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 21 2022, 8:38 AM
regehr requested review of this revision.Jun 21 2022, 8:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 21 2022, 8:38 AM
aeubanks accepted this revision.Jun 21 2022, 9:23 AM
This revision is now accepted and ready to land.Jun 21 2022, 9:23 AM
This revision was landed with ongoing or failed builds.Jun 21 2022, 9:48 AM
This revision was automatically updated to reflect the committed changes.