[llvm] [MachineScheduler] Rework dag-maps-huge-region (PR #200945)

Nathan Corbyn via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 15 08:01:50 PDT 2026


cofibrant wrote:

After this change, I observe a small (~2%) progression in compile time. For example, here are the CTMark numbers:
```
Tests: 10
Metric: compile_time

Program                                       compile_time
                                              lhs          rhs    diff  std_lhs std_rhs t-value p-value significant
Bullet/bullet                                  14.07        14.02 -0.4% 0.138   0.031   2.137   0.0995  N
7zip/7zip-benchmark                            21.46        21.23 -1.1% 0.113   0.004   5.000   0.0075  Y
consumer-typeset/consumer-typeset               4.65         4.59 -1.4% 0.050   0.015   3.431   0.0265  Y
kimwitu++/kc                                    7.52         7.41 -1.5% 0.081   0.022   3.274   0.0307  Y
lencod/lencod                                   8.54         8.40 -1.7% 0.057   0.006   6.065   0.0037  Y
ClamAV/clamscan                                 8.15         8.00 -1.9% 0.076   0.018   3.910   0.0174  Y
SPASS/SPASS                                     6.16         5.99 -2.7% 0.099   0.017   3.910   0.0174  Y
sqlite3/sqlite3                                 4.31         4.19 -2.7% 0.022   0.009   9.250   0.0008  Y
mafft/pairlocalalign                            5.06         4.92 -2.8% 0.042   0.010   6.792   0.0025  Y
tramp3d-v4/tramp3d-v4                          10.87        10.56 -2.9% 0.072   0.027   8.249   0.0012  Y
                           Geomean difference                     -1.9%
      compile_time
l/r            lhs        rhs       diff
count  10.000000    10.000000  10.000000
mean   9.079890     8.930430  -0.019005
std    5.292140     5.264734   0.008603
min    4.312900     4.194900  -0.029136
25%    5.333475     5.187225  -0.027292
50%    7.835350     7.701450  -0.017825
75%    10.290925    10.016925 -0.014153
max    21.460700    21.234100 -0.003539
```
However, several benchmarks of interest to me are negatively impacted, recording >2% run-time regressions after this change.

Interestingly, I found that, after effectively disabling the map reduction mechanism (setting `-dag-maps-region-huge=999999`), I obtain essentially the same compile-time improvement:
```
Tests: 10
Metric: compile_time

Program                                       compile_time
                                              lhs          rhs    diff  std_lhs std_rhs t-value p-value significant
Bullet/bullet                                  14.07        14.01 -0.4% 0.138   0.009   2.534   0.0644  N
7zip/7zip-benchmark                            21.46        21.21 -1.2% 0.113   0.034   4.636   0.0098  Y
consumer-typeset/consumer-typeset               4.65         4.59 -1.3% 0.050   0.005   3.870   0.0180  Y
kimwitu++/kc                                    7.52         7.42 -1.4% 0.081   0.102   1.345   0.2498  N
lencod/lencod                                   8.54         8.41 -1.5% 0.057   0.017   5.167   0.0067  Y
ClamAV/clamscan                                 8.15         8.00 -1.7% 0.076   0.015   3.916   0.0173  Y
mafft/pairlocalalign                            5.06         4.96 -2.0% 0.042   0.005   5.515   0.0053  Y
tramp3d-v4/tramp3d-v4                          10.87        10.60 -2.5% 0.072   0.019   7.727   0.0015  Y
SPASS/SPASS                                     6.16         5.99 -2.7% 0.099   0.010   3.940   0.0170  Y
sqlite3/sqlite3                                 4.31         4.18 -3.1% 0.022   0.014   8.802   0.0009  Y
                           Geomean difference                     -1.8%
      compile_time
l/r            lhs        rhs       diff
count  10.000000    10.000000  10.000000
mean   9.079890     8.937940  -0.017869
std    5.292140     5.257061   0.008092
min    4.312900     4.179100  -0.031023
25%    5.333475     5.215100  -0.023891
50%    7.835350     7.713100  -0.016441
75%    10.290925    10.053275 -0.013232
max    21.460700    21.212400 -0.004164
```
Moreover, under these conditions, the benchmarks progress significantly.

As such, it is unclear to me whether the `-dag-maps-region-huge` logic is useful at all. It would be good to open a dialogue on this, especially if you have further changes you are intending to make to the scheduler in this regard.

https://github.com/llvm/llvm-project/pull/200945


More information about the llvm-commits mailing list