Adds support for "following" memory through MSSA PHI arguments. This will help catch more noop stores that exist between blocks.
Originally part of D79391.
Differential D82588
[DSE] Look through memory PHI arguments when removing noop stores in MSSA. zoecarver on Jun 25 2020, 11:09 AM. Authored by
Details Adds support for "following" memory through MSSA PHI arguments. This will help catch more noop stores that exist between blocks. Originally part of D79391.
Diff Detail
Event Timeline
Comment Actions After running this on the LLVM test suite here are the stats: dse.NumRemainingStores Program stats_opt stats_master diff test-suite...lications/sqlite3/sqlite3.test 13683.00 13723.00 0.3% test-suite...decode/alacconvert-decode.test 547.00 547.00 0.0% test-suite...nia/pathfinder/pathfinder.test 16.00 16.00 0.0% test-suite...s-C/unix-smail/unix-smail.test 218.00 218.00 0.0% test-suite...langs-C/unix-tbl/unix-tbl.test 227.00 227.00 0.0% test-suite...s/Ptrdist/anagram/anagram.test 124.00 124.00 0.0% test-suite.../Benchmarks/Ptrdist/bc/bc.test 983.00 983.00 0.0% test-suite.../Benchmarks/Ptrdist/ft/ft.test 154.00 154.00 0.0% test-suite.../Benchmarks/Ptrdist/ks/ks.test 88.00 88.00 0.0% test-suite...marks/Ptrdist/yacr2/yacr2.test 307.00 307.00 0.0% test-suite...Rodinia/backprop/backprop.test 76.00 76.00 0.0% test-suite...s/Rodinia/hotspot/hotspot.test 22.00 22.00 0.0% test-suite...chmarks/Rodinia/srad/srad.test 50.00 50.00 0.0% test-suite.../Prolangs-C/loader/loader.test 93.00 93.00 0.0% test-suite...marks/SciMark2-C/scimark2.test 91.00 91.00 0.0% Geomean difference nan% dse.NumNoopStores Program stats_opt stats_master diff test-suite...lications/ClamAV/clamscan.test 2.00 2.00 0.0% test-suite...pplications/oggenc/oggenc.test 2.00 2.00 0.0% test-suite...TimberWolfMC/timberwolfmc.test 1.00 1.00 0.0% test-suite.../Prolangs-C/loader/loader.test 1.00 1.00 0.0% test-suite...decode/alacconvert-decode.test NaN NaN nan% test-suite...encode/alacconvert-encode.test NaN NaN nan% test-suite...ce/Applications/Burg/burg.test NaN NaN nan% test-suite...ications/JM/ldecod/ldecod.test NaN NaN nan% test-suite...ications/JM/lencod/lencod.test NaN NaN nan% test-suite...lications/SIBsim4/SIBsim4.test NaN NaN nan% test-suite.../Applications/SPASS/SPASS.test NaN 1.00 nan% test-suite...urce/Applications/aha/aha.test NaN NaN nan% test-suite...plications/d/make_dparser.test NaN NaN nan% test-suite...urce/Applications/hbd/hbd.test NaN NaN nan% test-suite...cations/hexxagon/hexxagon.test NaN NaN nan% Geomean difference nan% Comment Actions Also, MultiSource/Applications/SPASS/SPASS.test is failing for some reason. The error it's giving me is: /Users/zoe/Developer/llvm-source/stats-build/tools/fpcmp-target: files differ without tolerance allowance It looks like this may be an issue with the time it took to execute the test? That may be because I'm running these tests on a laptop (so both compile time and execution time aren't going to be accurate metrics). Comment Actions Does it pass without the patch? If it only fails with the patch, the patch is likely introducing a mis-compile. Comment Actions
Yes, you're right. Investigating now. Comment Actions
Comment Actions Sorry for the long delay, this review dropped off my radar somehow.
Comment Actions @fhahn Thanks for the review. Sorry for letting this sit for so long. All the tests in the llvm-test-suite are now passing. Comment Actions Thanks for updating the patch! Some more comments inline, but I think it is almost there.
Comment Actions From the comments it seems like you updated the patch, but is it possible that something went wrong with uploading it to reviews.llvm.org? It seems like the patch has not been updated here.
Comment Actions
Just an issue with arc. Sorry for the confusion. I also applied you're other suggested edits (using %c and moving test47). Thanks for the review!
Comment Actions @zoecarver just FYI, there's another missing optimization that might be related to your earlier patches, in case you are interested https://bugs.llvm.org/show_bug.cgi?id=16520 Comment Actions
@fhahn thanks! I've got a lot on my plate this week and next but I'll put up a patch as soon as I have the time. |
I think it would be easier to get rid of the IsDead variable and just have