llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
26.78k stars 10.97k forks source link

[gvnhoist] evaluate impact of gvnhoist optimization #95045

Open hiraditya opened 3 weeks ago

hiraditya commented 3 weeks ago
hiraditya commented 3 weeks ago

At -Os. Steps to repro, in the cmake file:

set(OPTFLAGS "${OPTFLAGS} -Os -mllvm -enable-gvn-hoist")

Results

utils/compare.py --filter-short -m gvn-hoist.NumCallsHoisted -m gvn-hoist.NumCallsRemoved -m gvn-hoist.NumHoisted -m gvn-hoist.NumLoadsHoisted -m gvn-hoist.NumLoadsRemoved -m gvn-hoist.NumRemoved -m gvn-hoist.NumStoresHoisted -m gvn-hoist.NumStoresRemoved test-suite-Os-gvnhoist.cmake/results.json
Program                                       CallsHoisted CallsRemoved  LoadsHoisted LoadsRemoved ScalarsHoisted ScalarsRemoved StoresHoist
                                              results       results      results        results         results        results    results   
MultiSourc.../Applications/JM/lencod/lencod    10.00         10.00       1217.00        1275.00         2121.00         2203.00   16.00    
MultiSource/Applications/oggenc/oggenc          4.00          4.00        119.00         119.00          277.00          282.00    1.00    
MultiSourc.../Applications/JM/ldecod/ldecod     3.00          3.00        608.00         614.00         1046.00         1059.00   13.00    
MultiSourc...Benchmarks/7zip/7zip-benchmark     3.00          3.00        287.00         290.00          521.00          524.00    2.00    
MultiSource/Benchmarks/Bullet/bullet            3.00          3.00        322.00         322.00          489.00          489.00    
MultiSourc...OE-ProxyApps-C/miniAMR/miniAMR     2.00          2.00         67.00          67.00          155.00          155.00    
MultiSourc...e/Applications/ClamAV/clamscan     1.00          1.00        196.00         196.00          459.00          459.00   24.00    
MultiSourc...ALAC/encode/alacconvert-encode     1.00          1.00         12.00          12.00           44.00           44.00    
MultiSourc...ALAC/decode/alacconvert-decode     1.00          1.00         12.00          12.00           44.00           44.00    
MultiSourc...rks/McCat/03-testtrie/testtrie     1.00          1.00          1.00           1.00            6.00            6.00    
MultiSource/Benchmarks/PAQ8p/paq8p              1.00          1.00         45.00          51.00           81.00           91.00    2.00    
MultiSourc...olangs-C/unix-smail/unix-smail     1.00          1.00          9.00           9.00           26.00           26.00    1.00    
MultiSourc.../mediabench/jpeg/jpeg-6a/cjpeg     1.00          1.00         73.00          77.00          134.00          138.00    
SingleSour...Benchmarks/CoyoteBench/lpbench     1.00          1.00          2.00           2.00            4.00            4.00    
SingleSour.../Benchmarks/Linpack/linpack-pc     1.00          1.00          1.00           1.00            5.00            5.00    
hiraditya commented 1 week ago

Also for firefox, chromium