[PATCH] D130991: llvm-reduce -- make it faster by running function passes first

John Regehr via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 2 08:47:20 PDT 2022


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

this changes llvm-reduce's phase ordering to run the delta passes that remove function bodies first. on a collection of real 77 IR modules that I'm using to test reduction speed/power, this reduces llvm-reduce's execution time by 20%.

the rationale for this change is simple: a delta debugger wins when it eliminates as much junk as possible very early. the passes that this patch puts at the front of the phase ordering are the ones that accomplish this.


https://reviews.llvm.org/D130991

Files:
  llvm/tools/llvm-reduce/DeltaManager.cpp


Index: llvm/tools/llvm-reduce/DeltaManager.cpp
===================================================================
--- llvm/tools/llvm-reduce/DeltaManager.cpp
+++ llvm/tools/llvm-reduce/DeltaManager.cpp
@@ -54,10 +54,10 @@
 
 #define DELTA_PASSES                                                           \
   do {                                                                         \
+    DELTA_PASS("functions", reduceFunctionsDeltaPass)                          \
+    DELTA_PASS("function-bodies", reduceFunctionBodiesDeltaPass)               \
     DELTA_PASS("special-globals", reduceSpecialGlobalsDeltaPass)               \
     DELTA_PASS("aliases", reduceAliasesDeltaPass)                              \
-    DELTA_PASS("function-bodies", reduceFunctionBodiesDeltaPass)               \
-    DELTA_PASS("functions", reduceFunctionsDeltaPass)                          \
     DELTA_PASS("basic-blocks", reduceBasicBlocksDeltaPass)                     \
     DELTA_PASS("global-values", reduceGlobalValuesDeltaPass)                   \
     DELTA_PASS("global-objects", reduceGlobalObjectsDeltaPass)                 \


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130991.449300.patch
Type: text/x-patch
Size: 1127 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220802/11b5cd1b/attachment.bin>


More information about the llvm-commits mailing list