[PATCH] D128284: llvm-reduce: run the set of passes more times, by default

John Regehr via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 21 08:38:18 PDT 2022


regehr created this revision.
regehr added reviewers: fhahn, aeubanks.
Herald added a project: All.
regehr requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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.


https://reviews.llvm.org/D128284

Files:
  llvm/test/tools/llvm-reduce/mir/generic-vreg.mir
  llvm/test/tools/llvm-reduce/mir/reduce-instruction-unreachable-block.mir
  llvm/test/tools/llvm-reduce/mir/subreg-def0.mir
  llvm/test/tools/llvm-reduce/mir/subreg-def1.mir
  llvm/test/tools/llvm-reduce/remove-invoked-functions.ll
  llvm/test/tools/llvm-reduce/remove-operand-bundles.ll
  llvm/tools/llvm-reduce/llvm-reduce.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128284.438716.patch
Type: text/x-patch
Size: 5313 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220621/46c31b0e/attachment.bin>


More information about the llvm-commits mailing list