[PATCH] D126236: [CaptureTracking] Increase limit but use it for all visited uses.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 30 09:23:49 PDT 2022


fhahn added a comment.

> Looking at just the NumNotCapturedBefore statistic is only meaningful if NumCapturedBefore+NumNotCapturedBefore is approximately the same in both configurations. Is that the case? It would probably be more meaningful to look for changes in the ratio NumNotCapturedBefore/(NumCapturedBefore+NumNotCapturedBefore), i.e. the percentage of queries that succeed.

Good point. Below I added tables with NumCaptured, NumNotcaptured, the sum and NotCaptured/Sum. I've only included SPEC2006/SPEC2017, as those have the largest number of capture queries.

For both limit=80 and limit=100, the total number of queries is quite similar to the baseline without opaque pointers, with most differing < 10%. The largest percentage increase is 531.deepsjeng_r with +30%. With limit=80, there's still a notable regression in the success percentage for 433.milc.

> The actual value of the limit matters though -- the current capture tracking implementation is intended to be cheap enough that uncached usage is viable, and we can clearly see that compile-time is quite sensitive to changes to this limit. We shouldn't overshoot in the other direction here. If we want to raise this too high, we'll have to start thinking about using different limits for different callers. E.g. visiting many users should be fine in DSE because results are cached for the whole duration of the pass, while visiting many uses in (non-batch) AA is problematic.

It might be worth exploring different limits for different clients, but I think another major client is GVN (via MemDepAnalysis) and I think exploring a sufficient number of uses there can be quite important (the regression I was investigating was due to missed load elimination by GVN)

Base with opaque pointers disabled

| name                                         | NumCaptured | NotCaptured | Sum    | NotCaptured/Sum |
| -------------------------------------------- | ----------- | ----------- | ------ | --------------- |
| CFP2006/433.milc/433.milc                    | 1602        | 11862       | 13464  | 88.10%          |
| CFP2006/444.namd/444.namd                    | 18660       | 51          | 18711  | 0.27%           |
| CFP2006/447.dealII/447.dealII                | 180890      | 21578       | 202468 | 10.66%          |
| CFP2006/450.soplex/450.soplex                | 9934        | 2575        | 12509  | 20.59%          |
| CFP2006/453.povray/453.povray                | 26919       | 9642        | 36561  | 26.37%          |
| CFP2006/470.lbm/470.lbm                      | 54          | 111         | 165    | 67.27%          |
| CFP2006/482.sphinx3/482.sphinx3              | 2525        | 650         | 3175   | 20.47%          |
| CFP2017rate/508.namd_r/508.namd_r            | 28714       | 233         | 28947  | 0.80%           |
| CFP2017rate/510.parest_r/510.parest_r        | 639689      | 66393       | 706082 | 9.40%           |
| CFP2017rate/511.povray_r/511.povray_r        | 26418       | 9659        | 36077  | 26.77%          |
| CFP2017rate/519.lbm_r/519.lbm_r              | 54          | 111         | 165    | 67.27%          |
| CFP2017rate/526.blender_r/526.blender_r      | 566680      | 135184      | 701864 | 19.26%          |
| CFP2017rate/538.imagick_r/538.imagick_r      | 96654       | 7001        | 103655 | 6.75%           |
| CFP2017rate/544.nab_r/544.nab_r              | 6785        | 529         | 7314   | 7.23%           |
| CINT2006/400.perlbench/400.perlbench         | 11693       | 1964        | 13657  | 14.38%          |
| CINT2006/401.bzip2/401.bzip2                 | 434         | 664         | 1098   | 60.47%          |
| CINT2006/403.gcc/403.gcc                     | 21205       | 16149       | 37354  | 43.23%          |
| CINT2006/429.mcf/429.mcf                     | 72          | 0           | 72     | 0.00%           |
| CINT2006/445.gobmk/445.gobmk                 | 10287       | 4322        | 14609  | 29.58%          |
| CINT2006/456.hmmer/456.hmmer                 | 6940        | 819         | 7759   | 10.56%          |
| CINT2006/458.sjeng/458.sjeng                 | 1025        | 2270        | 3295   | 68.89%          |
| CINT2006/462.libquantum/462.libquantum       | 429         | 193         | 622    | 31.03%          |
| CINT2006/464.h264ref/464.h264ref             | 72848       | 15495       | 88343  | 17.54%          |
| CINT2006/471.omnetpp/471.omnetpp             | 3867        | 171         | 4038   | 4.23%           |
| CINT2006/473.astar/473.astar                 | 1279        | 622         | 1901   | 32.72%          |
| CINT2006/483.xalancbmk/483.xalancbmk         | 36738       | 4003        | 40741  | 9.83%           |
| CINT2017rate/500.perlbench_r/500.perlbench_r | 30331       | 8405        | 38736  | 21.70%          |
| CINT2017rate/502.gcc_r/502.gcc_r             | 94839       | 59334       | 154173 | 38.49%          |
| CINT2017rate/505.mcf_r/505.mcf_r             | 160         | 889         | 1049   | 84.75%          |
| CINT2017rate/520.omnetpp_r/520.omnetpp_r     | 35108       | 7762        | 42870  | 18.11%          |
| CINT2017rate/523.xalancbmk_r/523.xalancbmk_r | 74953       | 4255        | 79208  | 5.37%           |
| CINT2017rate/525.x264_r/525.x264_r           | 8574        | 1863        | 10437  | 17.85%          |
| CINT2017rate/531.deepsjeng_r/531.deepsjeng_r | 1034        | 24          | 1058   | 2.27%           |
| CINT2017rate/541.leela_r/541.leela_r         | 3703        | 400         | 4103   | 9.75%           |
| CINT2017rate/557.xz_r/557.xz_r               | 1282        | 792         | 2074   | 38.19%          |
|

Limit 100 (this patch)

| name                                         | NumCaptured | NotCaptured | Sum    | NotCaptured/Sum |
| -------------------------------------------- | ----------- | ----------- | ------ | --------------- |
| CFP2006/433.milc/433.milc                    | 1586        | 11920       | 13506  | 88.26%          |
| CFP2006/444.namd/444.namd                    | 20748       | 51          | 20799  | 0.25%           |
| CFP2006/447.dealII/447.dealII                | 194571      | 21280       | 215851 | 9.86%           |
| CFP2006/450.soplex/450.soplex                | 10602       | 3760        | 14362  | 26.18%          |
| CFP2006/453.povray/453.povray                | 25427       | 12477       | 37904  | 32.92%          |
| CFP2006/470.lbm/470.lbm                      | 54          | 111         | 165    | 67.27%          |
| CFP2006/482.sphinx3/482.sphinx3              | 2472        | 743         | 3215   | 23.11%          |
| CFP2017rate/508.namd_r/508.namd_r            | 28466       | 236         | 28702  | 0.82%           |
| CFP2017rate/510.parest_r/510.parest_r        | 689825      | 69184       | 759009 | 9.12%           |
| CFP2017rate/511.povray_r/511.povray_r        | 24913       | 12493       | 37406  | 33.40%          |
| CFP2017rate/519.lbm_r/519.lbm_r              | 54          | 111         | 165    | 67.27%          |
| CFP2017rate/526.blender_r/526.blender_r      | 516616      | 165454      | 682070 | 24.26%          |
| CFP2017rate/538.imagick_r/538.imagick_r      | 91370       | 10349       | 101719 | 10.17%          |
| CFP2017rate/544.nab_r/544.nab_r              | 7572        | 1072        | 8644   | 12.40%          |
| CINT2006/400.perlbench/400.perlbench         | 11338       | 2495        | 13833  | 18.04%          |
| CINT2006/401.bzip2/401.bzip2                 | 421         | 705         | 1126   | 62.61%          |
| CINT2006/403.gcc/403.gcc                     | 19972       | 23710       | 43682  | 54.28%          |
| CINT2006/429.mcf/429.mcf                     | 72          | 0           | 72     | 0.00%           |
| CINT2006/445.gobmk/445.gobmk                 | 9814        | 7304        | 17118  | 42.67%          |
| CINT2006/456.hmmer/456.hmmer                 | 6693        | 2352        | 9045   | 26.00%          |
| CINT2006/458.sjeng/458.sjeng                 | 978         | 2323        | 3301   | 70.37%          |
| CINT2006/462.libquantum/462.libquantum       | 376         | 269         | 645    | 41.71%          |
| CINT2006/464.h264ref/464.h264ref             | 61720       | 33517       | 95237  | 35.19%          |
| CINT2006/471.omnetpp/471.omnetpp             | 3912        | 248         | 4160   | 5.96%           |
| CINT2006/473.astar/473.astar                 | 1214        | 668         | 1882   | 35.49%          |
| CINT2006/483.xalancbmk/483.xalancbmk         | 38571       | 5959        | 44530  | 13.38%          |
| CINT2017rate/500.perlbench_r/500.perlbench_r | 28819       | 16937       | 45756  | 37.02%          |
| CINT2017rate/502.gcc_r/502.gcc_r             | 96703       | 76523       | 173226 | 44.18%          |
| CINT2017rate/505.mcf_r/505.mcf_r             | 159         | 892         | 1051   | 84.87%          |
| CINT2017rate/520.omnetpp_r/520.omnetpp_r     | 35167       | 9590        | 44757  | 21.43%          |
| CINT2017rate/523.xalancbmk_r/523.xalancbmk_r | 76169       | 5805        | 81974  | 7.08%           |
| CINT2017rate/525.x264_r/525.x264_r           | 8473        | 2166        | 10639  | 20.36%          |
| CINT2017rate/531.deepsjeng_r/531.deepsjeng_r | 978         | 397         | 1375   | 28.87%          |
| CINT2017rate/541.leela_r/541.leela_r         | 4005        | 418         | 4423   | 9.45%           |
| CINT2017rate/557.xz_r/557.xz_r               | 1357        | 780         | 2137   | 36.50%          |
|

Limit 80

| name                                         | NumCaptured | NotCaptured | Sum    | NotCaptured/Sum |
| -------------------------------------------- | ----------- | ----------- | ------ | --------------- |
| CFP2006/433.milc/433.milc                    | 1808        | 6641        | 8449   | 78.60%          |
| CFP2006/444.namd/444.namd                    | 20748       | 51          | 20799  | 0.25%           |
| CFP2006/447.dealII/447.dealII                | 194239      | 21282       | 215521 | 9.87%           |
| CFP2006/450.soplex/450.soplex                | 10639       | 3697        | 14336  | 25.79%          |
| CFP2006/453.povray/453.povray                | 25994       | 11856       | 37850  | 31.32%          |
| CFP2006/470.lbm/470.lbm                      | 54          | 111         | 165    | 67.27%          |
| CFP2006/482.sphinx3/482.sphinx3              | 2471        | 743         | 3214   | 23.12%          |
| CFP2017rate/508.namd_r/508.namd_r            | 28618       | 75          | 28693  | 0.26%           |
| CFP2017rate/510.parest_r/510.parest_r        | 690282      | 69014       | 759296 | 9.09%           |
| CFP2017rate/511.povray_r/511.povray_r        | 25405       | 11872       | 37277  | 31.85%          |
| CFP2017rate/519.lbm_r/519.lbm_r              | 54          | 111         | 165    | 67.27%          |
| CFP2017rate/526.blender_r/526.blender_r      | 517120      | 186397      | 703517 | 26.50%          |
| CFP2017rate/538.imagick_r/538.imagick_r      | 91325       | 8548        | 99873  | 8.56%           |
| CFP2017rate/544.nab_r/544.nab_r              | 7581        | 1063        | 8644   | 12.30%          |
| CINT2006/400.perlbench/400.perlbench         | 11295       | 2493        | 13788  | 18.08%          |
| CINT2006/401.bzip2/401.bzip2                 | 424         | 702         | 1126   | 62.34%          |
| CINT2006/403.gcc/403.gcc                     | 20794       | 21939       | 42733  | 51.34%          |
| CINT2006/429.mcf/429.mcf                     | 72          | 0           | 72     | 0.00%           |
| CINT2006/445.gobmk/445.gobmk                 | 9897        | 7006        | 16903  | 41.45%          |
| CINT2006/456.hmmer/456.hmmer                 | 6672        | 2318        | 8990   | 25.78%          |
| CINT2006/458.sjeng/458.sjeng                 | 1033        | 2234        | 3267   | 68.38%          |
| CINT2006/462.libquantum/462.libquantum       | 400         | 243         | 643    | 37.79%          |
| CINT2006/464.h264ref/464.h264ref             | 62153       | 32641       | 94794  | 34.43%          |
| CINT2006/471.omnetpp/471.omnetpp             | 3977        | 173         | 4150   | 4.17%           |
| CINT2006/473.astar/473.astar                 | 1210        | 668         | 1878   | 35.57%          |
| CINT2006/483.xalancbmk/483.xalancbmk         | 38691       | 5938        | 44629  | 13.31%          |
| CINT2017rate/500.perlbench_r/500.perlbench_r | 29096       | 13075       | 42171  | 31.00%          |
| CINT2017rate/502.gcc_r/502.gcc_r             | 98244       | 74551       | 172795 | 43.14%          |
| CINT2017rate/505.mcf_r/505.mcf_r             | 159         | 892         | 1051   | 84.87%          |
| CINT2017rate/520.omnetpp_r/520.omnetpp_r     | 35174       | 9561        | 44735  | 21.37%          |
| CINT2017rate/523.xalancbmk_r/523.xalancbmk_r | 76246       | 5768        | 82014  | 7.03%           |
| CINT2017rate/525.x264_r/525.x264_r           | 8441        | 2109        | 10550  | 19.99%          |
| CINT2017rate/531.deepsjeng_r/531.deepsjeng_r | 978         | 397         | 1375   | 28.87%          |
| CINT2017rate/541.leela_r/541.leela_r         | 4024        | 417         | 4441   | 9.39%           |
| CINT2017rate/557.xz_r/557.xz_r               | 1357        | 777         | 2134   | 36.41%          |
|

Limit 60

| name                                         | NumCaptured | NotCaptured | Sum    | NotCaptured/Sum |
| -------------------------------------------- | ----------- | ----------- | ------ | --------------- |
| CFP2006/433.milc/433.milc                    | 1981        | 721         | 2702   | 26.68%          |
| CFP2006/444.namd/444.namd                    | 20748       | 51          | 20799  | 0.25%           |
| CFP2006/447.dealII/447.dealII                | 194613      | 21104       | 215717 | 9.78%           |
| CFP2006/450.soplex/450.soplex                | 10689       | 3576        | 14265  | 25.07%          |
| CFP2006/453.povray/453.povray                | 26712       | 10590       | 37302  | 28.39%          |
| CFP2006/470.lbm/470.lbm                      | 54          | 111         | 165    | 67.27%          |
| CFP2006/482.sphinx3/482.sphinx3              | 2472        | 743         | 3215   | 23.11%          |
| CFP2017rate/508.namd_r/508.namd_r            | 28635       | 67          | 28702  | 0.23%           |
| CFP2017rate/510.parest_r/510.parest_r        | 690663      | 68390       | 759053 | 9.01%           |
| CFP2017rate/511.povray_r/511.povray_r        | 26198       | 10606       | 36804  | 28.82%          |
| CFP2017rate/519.lbm_r/519.lbm_r              | 54          | 111         | 165    | 67.27%          |
| CFP2017rate/526.blender_r/526.blender_r      | 520228      | 155902      | 676130 | 23.06%          |
| CFP2017rate/538.imagick_r/538.imagick_r      | 91545       | 8462        | 100007 | 8.46%           |
| CFP2017rate/544.nab_r/544.nab_r              | 7572        | 1072        | 8644   | 12.40%          |
| CINT2006/400.perlbench/400.perlbench         | 11344       | 2491        | 13835  | 18.01%          |
| CINT2006/401.bzip2/401.bzip2                 | 428         | 698         | 1126   | 61.99%          |
| CINT2006/403.gcc/403.gcc                     | 20978       | 20914       | 41892  | 49.92%          |
| CINT2006/429.mcf/429.mcf                     | 72          | 0           | 72     | 0.00%           |
| CINT2006/445.gobmk/445.gobmk                 | 10367       | 6275        | 16642  | 37.71%          |
| CINT2006/456.hmmer/456.hmmer                 | 6881        | 784         | 7665   | 10.23%          |
| CINT2006/458.sjeng/458.sjeng                 | 1033        | 2322        | 3355   | 69.21%          |
| CINT2006/462.libquantum/462.libquantum       | 448         | 195         | 643    | 30.33%          |
| CINT2006/464.h264ref/464.h264ref             | 67363       | 21229       | 88592  | 23.96%          |
| CINT2006/471.omnetpp/471.omnetpp             | 3989        | 171         | 4160   | 4.11%           |
| CINT2006/473.astar/473.astar                 | 1280        | 602         | 1882   | 31.99%          |
| CINT2006/483.xalancbmk/483.xalancbmk         | 38589       | 5941        | 44530  | 13.34%          |
| CINT2017rate/500.perlbench_r/500.perlbench_r | 29667       | 10605       | 40272  | 26.33%          |
| CINT2017rate/502.gcc_r/502.gcc_r             | 99548       | 70774       | 170322 | 41.55%          |
| CINT2017rate/505.mcf_r/505.mcf_r             | 159         | 892         | 1051   | 84.87%          |
| CINT2017rate/520.omnetpp_r/520.omnetpp_r     | 35207       | 9520        | 44727  | 21.28%          |
| CINT2017rate/523.xalancbmk_r/523.xalancbmk_r | 76187       | 5787        | 81974  | 7.06%           |
| CINT2017rate/525.x264_r/525.x264_r           | 8636        | 2007        | 10643  | 18.86%          |
| CINT2017rate/531.deepsjeng_r/531.deepsjeng_r | 978         | 397         | 1375   | 28.87%          |
| CINT2017rate/541.leela_r/541.leela_r         | 4005        | 418         | 4423   | 9.45%           |
| CINT2017rate/557.xz_r/557.xz_r               | 1357        | 780         | 2137   | 36.50%          |


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126236/new/

https://reviews.llvm.org/D126236



More information about the llvm-commits mailing list