llvm-project/llvm/test/Transforms/DeadStoreElimination/MSSA
Florian Hahn 43aa7227df [DSE,MemorySSA] Check if Current is valid for elimination first.
This changes getDomMemoryDef to check if a Current is a valid
candidate for elimination before checking for reads. Before the change,
we were spending a lot of compile-time in checking for read accesses for
Current that might not even be removable.

This patch flips the logic, so we skip Current if they cannot be
removed before checking all their uses. This is much more efficient in
practice.

It also adds a more aggressive limit for checking partially overlapping
stores. The main problem with overlapping stores is that we do not know
if they will lead to elimination until seeing all of them. This patch
limits adds a new limit for overlapping store candidates, which keeps
the number of modified overlapping stores roughly the same.

This is another substantial compile-time improvement (while also
increasing the number of stores eliminated). Geomean -O3 -0.67%,
ReleaseThinLTO -0.97%.

http://llvm-compile-time-tracker.com/compare.php?from=0a929b6978a068af8ddb02d0d4714a2843dd8ba9&to=2e630629b43f64b60b282e90f0d96082fde2dacc&stat=instructions

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D86487
2020-08-28 11:19:04 +01:00
..
X86
2011-03-25-DSEMiscompile.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination 2020-06-26 20:13:37 -07:00
2011-09-06-EndOfFunction.ll [DSE] Eliminate stores at the end of the function. 2020-06-24 12:58:20 +01:00
2011-09-06-MemCpy.ll
2016-07-17-UseAfterFree.ll [DSE,MSSA] Eliminate stores by terminators (free,lifetime.end). 2020-07-08 08:59:46 +01:00
OverwriteStoreBegin.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination 2020-06-26 20:13:37 -07:00
OverwriteStoreEnd.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination 2020-06-26 20:13:37 -07:00
PartialStore.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination 2020-06-26 20:13:37 -07:00
PartialStore2.ll
atomic-overlapping.ll [DSE,MSSA] Do not attempt to remove un-removable memdefs. 2020-02-25 13:31:46 +00:00
atomic-todo.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination 2020-06-26 20:13:37 -07:00
atomic.ll [DSE,MemorySSA] Handle atomicrmw/cmpxchg conservatively. 2020-08-21 10:42:42 +01:00
calloc-store.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination 2020-06-26 20:13:37 -07:00
combined-partial-overwrites.ll [DSE,MemorySSA] Check if Current is valid for elimination first. 2020-08-28 11:19:04 +01:00
const-pointers.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination 2020-06-26 20:13:37 -07:00
crash.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination 2020-06-26 20:13:37 -07:00
cs-cs-aliasing.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination 2020-06-26 20:13:37 -07:00
debug-counter.ll [DSE,MemorySSA] Check if Current is valid for elimination first. 2020-08-28 11:19:04 +01:00
debuginfo.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination 2020-06-26 20:13:37 -07:00
dominate.ll
fence-todo.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination 2020-06-26 20:13:37 -07:00
fence.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination 2020-06-26 20:13:37 -07:00
free.ll [DSE,MSSA] Eliminate stores by terminators (free,lifetime.end). 2020-07-08 08:59:46 +01:00
inst-limits.ll Recommit "[DSE] Add first version of MemorySSA-backed DSE (Bottom up walk)." 2020-02-12 14:17:50 +00:00
int_sideeffect.ll
invariant.start.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination 2020-06-26 20:13:37 -07:00
launder.invariant.group.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination 2020-06-26 20:13:37 -07:00
libcalls.ll [MemLoc] Support memcmp in MemoryLocation::getForArgument. 2020-08-28 10:19:54 +01:00
lifetime.ll [DSE,MSSA] Eliminate stores by terminators (free,lifetime.end). 2020-07-08 08:59:46 +01:00
mda-with-dbg-values.ll [DSE] Eliminate stores at the end of the function. 2020-06-24 12:58:20 +01:00
memcpy-complete-overwrite.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination 2020-06-26 20:13:37 -07:00
memcpy-lifetimes.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination 2020-06-26 20:13:37 -07:00
memintrinsics.ll [DSE] Eliminate stores at the end of the function. 2020-06-24 12:58:20 +01:00
memoryssa-scan-limit.ll [DSE,MemorySSA] Check if Current is valid for elimination first. 2020-08-28 11:19:04 +01:00
memset-and-memcpy.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination 2020-06-26 20:13:37 -07:00
memset-missing-debugloc.ll [DSE,MSSA] Eliminate stores by terminators (free,lifetime.end). 2020-07-08 08:59:46 +01:00
memset-unknown-sizes.ll [DSE] Lift post-dominance for objs not accessible in caller. 2020-04-15 11:37:14 +01:00
merge-stores-big-endian.ll [DSE,MSSA] Port partial store merging. 2020-06-15 18:41:46 +01:00
merge-stores.ll [DSE,MSSA] Enable XFAIL'd merge-stores.ll test (NFC). 2020-06-19 12:10:47 +01:00
multiblock-captures.ll [DSE,MemorySSA] Delay PointerMayBeCaptured calls until actually needed. 2020-08-24 14:05:44 +01:00
multiblock-exceptions.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination 2020-06-26 20:13:37 -07:00
multiblock-loops.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination 2020-06-26 20:13:37 -07:00
multiblock-malloc-free.ll [DSE,MSSA] Eliminate stores by terminators (free,lifetime.end). 2020-07-08 08:59:46 +01:00
multiblock-memintrinsics.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination 2020-06-26 20:13:37 -07:00
multiblock-memoryphis.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination 2020-06-26 20:13:37 -07:00
multiblock-multipath-throwing.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination 2020-06-26 20:13:37 -07:00
multiblock-multipath.ll [DSE,MemorySSA] Traverse use-def chain without MemSSA Walker. 2020-08-27 10:02:02 +01:00
multiblock-overlap.ll [DSE,MemorySSA] Check if Current is valid for elimination first. 2020-08-28 11:19:04 +01:00
multiblock-partial.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination 2020-06-26 20:13:37 -07:00
multiblock-simple.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination 2020-06-26 20:13:37 -07:00
multiblock-throwing.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination 2020-06-26 20:13:37 -07:00
multiblock-unreachable.ll [DSE,MSSA] Move reachability check to main loop. 2020-06-21 16:38:10 +01:00
no-targetdata.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination 2020-06-26 20:13:37 -07:00
noop-stores.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination 2020-06-26 20:13:37 -07:00
operand-bundles.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination 2020-06-26 20:13:37 -07:00
overlap.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination 2020-06-26 20:13:37 -07:00
pr11390.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination 2020-06-26 20:13:37 -07:00
pr47285-not-overwritten-on-all-exit-paths.ll [DSE,MemorySSA] Remove short-cut to check if all paths are covered. 2020-08-27 12:42:40 +01:00
simple-preservation.ll StoreInst should store Align, not MaybeAlign 2020-05-15 12:26:58 -07:00
simple-todo.ll [DSE,MSSA] Recognise init_trampoline in getLocForWriteEx 2020-07-15 12:18:58 +01:00
simple.ll [DSE,MemorySSA] Check if Current is valid for elimination first. 2020-08-28 11:19:04 +01:00
stats.ll [NewPM][BasicAA] basicaa -> basic-aa in Transforms/DeadStoreElimination 2020-06-26 20:13:37 -07:00
tail-byval.ll