[MemorySSA] Always perform MemoryUses liveOnEntry optimization on MSSA construction
authorArthur Eubanks <aeubanks@google.com>
Tue, 13 Jun 2023 21:06:16 +0000 (14:06 -0700)
committerArthur Eubanks <aeubanks@google.com>
Thu, 6 Jul 2023 21:09:47 +0000 (14:09 -0700)
commit72e7e5851f4aa1d7aef62d85338493ac34df5837
tree471855090ccb2063bdcf1f8665a109398a1f72a7
parent897e69dd83dee3e41da6edc30354cc95d3042700
[MemorySSA] Always perform MemoryUses liveOnEntry optimization on MSSA construction

Fixes invariant memory regressions in future DSE patches.

Also add a flag to print<memoryssa> to not ensure optimized uses to test this.

Noticeable compile time regression [1], but a future DSE change that depends on this more than makes up for it.

[1] https://llvm-compile-time-tracker.com/compare.php?from=9d5466849a770eeab222d5a5890376d3596e8ad6&to=95682dbe11d76a3342870437377216e96b167504&stat=instructions:u

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D152859
llvm/include/llvm/Analysis/MemorySSA.h
llvm/lib/Analysis/MemorySSA.cpp
llvm/lib/Passes/PassBuilder.cpp
llvm/lib/Passes/PassRegistry.def
llvm/test/Analysis/MemorySSA/tbaa.ll [new file with mode: 0644]