[all-commits] [llvm/llvm-project] 43aa72: [DSE, MemorySSA] Check if Current is valid for elim...
Florian Hahn via All-commits
all-commits at lists.llvm.org
Fri Aug 28 03:20:10 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 43aa7227dfab8f847a346ce6da7318584182ddf1
https://github.com/llvm/llvm-project/commit/43aa7227dfab8f847a346ce6da7318584182ddf1
Author: Florian Hahn <flo at fhahn.com>
Date: 2020-08-28 (Fri, 28 Aug 2020)
Changed paths:
M llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
M llvm/test/Transforms/DeadStoreElimination/MSSA/combined-partial-overwrites.ll
M llvm/test/Transforms/DeadStoreElimination/MSSA/debug-counter.ll
M llvm/test/Transforms/DeadStoreElimination/MSSA/memoryssa-scan-limit.ll
M llvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-overlap.ll
M llvm/test/Transforms/DeadStoreElimination/MSSA/simple.ll
Log Message:
-----------
[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
More information about the All-commits
mailing list