[PATCH] D61314: [SCCP] Remove forcedconstant, go to overdefined instead

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 24 08:31:08 PST 2020


fhahn added a comment.

I've added another patch that implements AND overdefined, constant range -> constant range (D75054 <https://reviews.llvm.org/D75054>). With that, I checked compared the impact of

1. making ValueLatticeElement::mergeIn go to overdefined, if a constant range is merged with an undefined value
2. Using overdefined for undef constant when we create the ValueLatticeElement.

Comparing 1. and 2. for MultiSource, SPEC2000, SPEC2006 with -O3 & LTO below (sorry for the weird formatting, not sure how to post the output of compare.py better on phab).  It seems like the impact of 1. is lower, presumably because we skip incoming values from unreachable blocks in PHIs. I've also added some stats for the impact on CorrelatedValuePropagation in the description of D75054 <https://reviews.llvm.org/D75054>.

it would be great if you could take another look and let me know which direction you prefer.

Sum of all SCCP stats (using `cat  report.json | grep sccp | cut -d" " -f 10 | cut -d',' -f 1 | awk '{s+=$1} END {print s}'`)

Base:  220147

1. : 220062
2. : 218205

Program                                                                   1.                     2.    
 test-suite...T2000/300.twolf/300.twolf.test   179.00              64.00                 -64.2%
 test-suite...stones-3.1/fhourstones3.1.test     8.00               3.00                 -62.5%
 test-suite...lications/minisat/minisat.test     7.00               3.00                 -57.1%
 test-suite...abench/jpeg/jpeg-6a/cjpeg.test    39.00              19.00                 -51.3%
 test-suite...ocBench/espresso/espresso.test   131.00              64.00                 -51.1%
 test-suite...nsumer-jpeg/consumer-jpeg.test    42.00              22.00                 -47.6%
 test-suite...nchmarks/McCat/09-vor/vor.test    39.00              21.00                 -46.2%
 test-suite...cations/hexxagon/hexxagon.test    28.00              16.00                 -42.9%
 test-suite...ve-susan/automotive-susan.test    67.00              43.00                 -35.8%
 test-suite...Source/Benchmarks/sim/sim.test    24.00              16.00                 -33.3%
 test-suite...129.compress/129.compress.test    90.00              64.00                 -28.9%
 test-suite...urce/Applications/hbd/hbd.test    30.00              23.00                 -23.3%
 test-suite.../Benchmarks/Bullet/bullet.test   233.00             186.00                 -20.2%
 test-suite...langs-C/unix-tbl/unix-tbl.test    12.00              10.00                 -16.7%
 test-suite...INT95/132.ijpeg/132.ijpeg.test   100.00              84.00                 -16.0%
 test-suite...lications/ClamAV/clamscan.test   854.00             722.00                 -15.5%
 test-suite.../CINT2000/252.eon/252.eon.test   349.00             297.00                 -14.9%
 test-suite...lications/SIBsim4/SIBsim4.test    16.00              14.00                 -12.5%
 test-suite...CFP2000/177.mesa/177.mesa.test   256.00             227.00                 -11.3%
 test-suite...lications/sqlite3/sqlite3.test   473.00             422.00                 -10.8%
 test-suite...oxyApps-C++/miniFE/miniFE.test    28.00              25.00                 -10.7%
 test-suite.../CINT2000/176.gcc/176.gcc.test   1015.00            920.00                 -9.4%
 test-suite...TimberWolfMC/timberwolfmc.test    43.00              39.00                 -9.3%
 test-suite.../CINT95/134.perl/134.perl.test    86.00              78.00                 -9.3%
 test-suite...T2006/445.gobmk/445.gobmk.test   1563.00            1422.00                -9.0%
 test-suite...SPEC/CINT95/130.li/130.li.test   103.00              94.00                 -8.7%
 test-suite...006/447.dealII/447.dealII.test   449.00             411.00                 -8.5%
 test-suite...ce/Applications/Burg/burg.test    26.00              24.00                 -7.7%
 test-suite...marks/SciMark2-C/scimark2.test    26.00              24.00                 -7.7%
 test-suite.../CINT2006/403.gcc/403.gcc.test   3684.00            3438.00                -6.7%
 test-suite...pplications/oggenc/oggenc.test   222.00             208.00                 -6.3%
 test-suite...urce/Applications/lua/lua.test   263.00             247.00                 -6.1%
 test-suite...plications/d/make_dparser.test    51.00              48.00                 -5.9%
 test-suite...3.xalancbmk/483.xalancbmk.test   3807.00            3604.00                -5.3%
 test-suite...nsumer-lame/consumer-lame.test   192.00             182.00                 -5.2%
 test-suite...CFP2006/444.namd/444.namd.test   195.00             186.00                 -4.6%
 test-suite...yApps-C++/PENNANT/PENNANT.test   204.00             195.00                 -4.4%
 test-suite...encode/alacconvert-encode.test    52.00              50.00                 -3.8%
 test-suite...decode/alacconvert-decode.test    52.00              50.00                 -3.8%
 test-suite...Applications/kimwitu++/kc.test   646.00             626.00                 -3.1%
 test-suite...0.perlbench/400.perlbench.test   1580.00            1538.00                -2.7%
 test-suite...ProxyApps-C++/CLAMR/CLAMR.test   312.00             304.00                 -2.6%
 test-suite...marks/7zip/7zip-benchmark.test   4790.00            4670.00                -2.5%
 test-suite...CFP2006/433.milc/433.milc.test   201.00             196.00                 -2.5%
 test-suite...ce/Benchmarks/PAQ8p/paq8p.test    87.00              85.00                 -2.3%
 test-suite...chmarks/MallocBench/gs/gs.test   397.00             388.00                 -2.3%
 test-suite...006/450.soplex/450.soplex.test   426.00             418.00                 -1.9%
 test-suite...ications/JM/ldecod/ldecod.test   152.00             150.00                 -1.3%
 test-suite.../Applications/SPASS/SPASS.test   2019.00            1996.00                -1.1%
 test-suite...0/253.perlbmk/253.perlbmk.test   944.00             935.00                 -1.0%
 test-suite...rks/tramp3d-v4/tramp3d-v4.test   342.00             339.00                 -0.9%
 test-suite...6/471.omnetpp/471.omnetpp.test   418.00             415.00                 -0.7%
 test-suite...:: External/Povray/povray.test   1438.00            1436.00                -0.1%
 test-suite...-typeset/consumer-typeset.test   3172.00            3169.00                -0.1%
 test-suite...ications/JM/lencod/lencod.test   8296.00            8291.00                -0.1%
 test-suite...lFlow-dbl/ControlFlow-dbl.test   520.00             520.00                  0.0%

Metric: sccp.NumInstRemoved

Program                                                                   1.                     2.    
 test-suite...:: External/Povray/povray.test   191.00             179.00                 -6.3%
 test-suite...marks/7zip/7zip-benchmark.test   1154.00            1109.00                -3.9%
 test-suite...chmarks/MallocBench/gs/gs.test   159.00             154.00                 -3.1%
 test-suite...006/453.povray/453.povray.test   608.00             590.00                 -3.0%
 test-suite.../Benchmarks/Bullet/bullet.test   585.00             576.00                 -1.5%
 test-suite...urce/Applications/lua/lua.test   431.00             427.00                 -0.9%
 test-suite.../CINT2000/252.eon/252.eon.test   235.00             233.00                 -0.9%
 test-suite...lications/ClamAV/clamscan.test   1116.00            1111.00                -0.4%
 test-suite...0.perlbench/400.perlbench.test   1143.00            1141.00                -0.2%
 test-suite...rks/tramp3d-v4/tramp3d-v4.test   6745.00            6737.00                -0.1%
 test-suite...CFP2000/177.mesa/177.mesa.test   1641.00            1640.00                -0.1%
 test-suite...006/447.dealII/447.dealII.test   12050.00           12043.00               -0.1%
 test-suite.../CINT2006/403.gcc/403.gcc.test   7210.00            7211.00                 0.0%


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D61314





More information about the llvm-commits mailing list