[DSE,MemorySSA] Account for ScanLimit == 0 on entry.
authorFlorian Hahn <flo@fhahn.com>
Fri, 14 Aug 2020 20:08:16 +0000 (21:08 +0100)
committerFlorian Hahn <flo@fhahn.com>
Mon, 17 Aug 2020 16:55:14 +0000 (17:55 +0100)
commit139810449ba4c2203dbd9021b7ec4153bbfab269
tree3ca4cef2a5628464e976f7163d7f04317fad2b29
parent95b77f2eac8f3498fc20299f2515b3ce3440b82e
[DSE,MemorySSA] Account for ScanLimit == 0 on entry.

Currently the code does not account for the fact that getDomMemoryDef
can be called with ScanLimit == 0, if we reached the limit while
processing an earlier access. Also tighten the check a bit more and bump
the scan limit now that it is handled properly.

In some cases, this brings a 2x speedup in terms of compile-time.
llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
llvm/test/Transforms/DeadStoreElimination/MSSA/memoryssa-scan-limit.ll