forked from OSchip/llvm-project
fb109c42d9
The tests have been updated and I plan to move them from the MSSA directory up. Some end-to-end tests needed small adjustments. One difference to the legacy DSE is that legacy DSE also deletes trivially dead instructions that are unrelated to memory operations. Because MemorySSA-backed DSE just walks the MemorySSA, we only visit/check memory instructions. But removing unrelated dead instructions is not really DSE's job and other passes will clean up. One noteworthy change is in llvm/test/Transforms/Coroutines/ArgAddr.ll, but I think this comes down to legacy DSE not handling instructions that may throw correctly in that case. To cover this with MemorySSA-backed DSE, we need an update to llvm.coro.begin to treat it's return value to belong to the same underlying object as the passed pointer. There are some minor cases MemorySSA-backed DSE currently misses, e.g. related to atomic operations, but I think those can be implemented after the switch. This has been discussed on llvm-dev: http://lists.llvm.org/pipermail/llvm-dev/2020-August/144417.html For the MultiSource/SPEC2000/SPEC2006 the number of eliminated stores goes from ~17500 (legayc DSE) to ~26300 (MemorySSA-backed). More numbers and details in the thread on llvm-dev. Impact on CTMark: ``` Legacy Pass Manager exec instrs size-text O3 + 0.60% - 0.27% ReleaseThinLTO + 1.00% - 0.42% ReleaseLTO-g. + 0.77% - 0.33% RelThinLTO (link only) + 0.87% - 0.42% RelLO-g (link only) + 0.78% - 0.33% ``` http://llvm-compile-time-tracker.com/compare.php?from=3f22e96d95c71ded906c67067d75278efb0a2525&to=ae8be4642533ff03803967ee9d7017c0d73b0ee0&stat=instructions ``` New Pass Manager exec instrs. size-text O3 + 0.95% - 0.25% ReleaseThinLTO + 1.34% - 0.41% ReleaseLTO-g. + 1.71% - 0.35% RelThinLTO (link only) + 0.96% - 0.41% RelLO-g (link only) + 2.21% - 0.35% ``` http://195.201.131.214:8000/compare.php?from=3f22e96d95c71ded906c67067d75278efb0a2525&to=ae8be4642533ff03803967ee9d7017c0d73b0ee0&stat=instructions Reviewed By: asbirlea, xbolva00, nikic Differential Revision: https://reviews.llvm.org/D87163 |
||
---|---|---|
.. | ||
2008-02-24-MultipleUseofSRet.ll | ||
2008-03-13-ReturnSlotBitcast.ll | ||
2011-06-02-CallSlotOverwritten.ll | ||
aggregate-type-crash.ll | ||
align.ll | ||
atomic.ll | ||
callslot_aa.ll | ||
callslot_deref.ll | ||
callslot_throw.ll | ||
capturing-func.ll | ||
crash.ll | ||
fca2memcpy.ll | ||
form-memset.ll | ||
invariant.start.ll | ||
lifetime.ll | ||
load-store-to-memcpy.ll | ||
loadstore-sret.ll | ||
memcpy-to-memset-with-lifetimes.ll | ||
memcpy-to-memset.ll | ||
memcpy-undef.ll | ||
memcpy.ll | ||
memmove.ll | ||
memset-memcpy-oversized.ll | ||
memset-memcpy-redundant-memset.ll | ||
memset-memcpy-to-2x-memset.ll | ||
nontemporal.ll | ||
pr29105.ll | ||
pr37967.ll | ||
preserve-memssa.ll | ||
process_store.ll | ||
profitable-memset.ll | ||
smaller.ll | ||
sret.ll | ||
stackrestore.ll | ||
store-to-memset-is-nonzero-type.ll | ||
store-to-memset.ll | ||
vscale-memset.ll |