[llvm] [RISCV] Add a pass to remove ADDI by reassociating to fold into load/store address. (PR #127151)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 15 07:06:28 PST 2025
dtcxzyw wrote:
Compile-time and size measurements on llvm-test-suite (rv64gc):
```
dtcxzyw at dtcxzyw:~/WorkSpace/Projects/compilers/tmp/llvm-test-suite$ python3 utils/compare.py -m size..text ../baseline.json ../new.json
Tests: 320
Metric: size..text
Program size..text
baseline new diff
MultiSourc...ity-rijndael/security-rijndael 12414.00 12726.00 2.5%
MultiSourc...marks/VersaBench/ecbdes/ecbdes 6158.00 6212.00 0.9%
SingleSour...ce/Benchmarks/Misc/ReedSolomon 4684.00 4696.00 0.3%
MultiSourc...reeBench/pcompress2/pcompress2 4240.00 4242.00 0.0%
MultiSource/Benchmarks/McCat/18-imp/imp 9302.00 9304.00 0.0%
MultiSourc...VC/Searching-flt/Searching-flt 22700.00 22700.00 0.0%
SingleSour...enchmarks/Misc-C++/oopack_v1p8 2746.00 2746.00 0.0%
SingleSource/Benchmarks/Misc/evalloop 652.00 652.00 0.0%
SingleSource/Benchmarks/Misc/dt 422.00 422.00 0.0%
SingleSour...chmarks/Misc-C++/stepanov_v1p2 4252.00 4252.00 0.0%
SingleSour...ks/Misc-C++/stepanov_container 12930.00 12930.00 0.0%
SingleSource/Benchmarks/Misc-C++/bigfib 5750.00 5750.00 0.0%
SingleSour...enchmarks/Misc-C++/mandel-text 500.00 500.00 0.0%
SingleSource/Benchmarks/Misc/ffbench 1752.00 1752.00 0.0%
SingleSour...rks/Misc-C++/Large/sphereflake 4082.00 4082.00 0.0%
Geomean difference -0.1%
size..text
run baseline new diff
count 320.000000 320.000000 320.000000
mean 40075.862500 39984.812500 -0.001049
std 93336.449929 93034.162808 0.005909
min 188.000000 188.000000 -0.078735
25% 1236.500000 1236.500000 -0.000236
50% 3788.000000 3788.000000 0.000000
75% 25440.000000 25440.000000 0.000000
max 639140.000000 638774.000000 0.025133
dtcxzyw at dtcxzyw:~/WorkSpace/Projects/compilers/tmp/llvm-test-suite$ python3 utils/compare.py -m compile_time ../baseline.json ../new.json
Tests: 320
Metric: compile_time
Program compile_time
baseline new diff
MultiSourc...hmarks/Rodinia/hotspot/hotspot 0.30 0.38 28.8%
SingleSour...h/stencils/seidel-2d/seidel-2d 0.18 0.23 25.1%
SingleSour...h/stencils/jacobi-2d/jacobi-2d 0.21 0.25 23.8%
MultiSourc...nch/mpeg2/mpeg2dec/mpeg2decode 2.80 3.45 23.3%
MultiSourc...e/Applications/obsequi/Obsequi 2.46 3.03 23.1%
MultiSourc.../Rodinia/pathfinder/pathfinder 0.30 0.37 21.4%
MultiSourc...arks/DOE-ProxyApps-C/CoMD/CoMD 2.28 2.74 20.6%
MultiSourc...roxyApps-C/SimpleMOC/SimpleMOC 2.02 2.43 20.5%
MultiSourc...OE-ProxyApps-C/miniGMG/miniGMG 2.44 2.93 20.1%
MultiSourc...e/Benchmarks/MallocBench/gs/gs 10.12 12.07 19.3%
MultiSource/Applications/lua/lua 7.23 8.61 19.1%
MultiSourc...basicmath/automotive-basicmath 0.47 0.56 18.6%
MultiSourc...hmarks/MallocBench/cfrac/cfrac 2.80 3.28 17.4%
MultiSourc...enchmarks/mafft/pairlocalalign 14.23 16.60 16.7%
MultiSource/Benchmarks/nbench/nbench 1.97 2.30 16.7%
Geomean difference -4.0%
compile_time
run baseline new diff
count 320.000000 320.000000 284.000000
mean 2.955303 2.945959 -0.034530
std 9.903914 9.888480 0.107569
min 0.000000 0.000000 -0.232461
25% 0.160575 0.148825 -0.113482
50% 0.412650 0.393900 -0.030871
75% 1.508075 1.325575 0.022703
max 136.916200 136.221800 0.287965
```
https://github.com/llvm/llvm-project/pull/127151
More information about the llvm-commits
mailing list