[NewPM][LVI] Abandon LVI after CVP
authorNikita Popov <nikita.ppv@gmail.com>
Thu, 30 Jul 2020 17:14:02 +0000 (19:14 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Sat, 1 Aug 2020 21:47:46 +0000 (23:47 +0200)
commit25af353b0e74907d5d50c8616b885bd1f73a68b3
tree49c5c561eddf04c5966690e36eee5061a6964b43
parente297d928dcde31ac92eff72532095f4f657f2ebd
[NewPM][LVI] Abandon LVI after CVP

As mentioned on D70376, LVI can currently cause performance issues
when running under NewPM. The problem is that, unlike the legacy
pass manager, NewPM will not immediately discard the LVI analysis
if the following pass does not need it. This is a problem, because
LVI has a high memory requirement, and mass invalidation of LVI
values is very inefficient. LVI should only be alive during passes
that actively interact with it.

This patch addresses the issue by explicitly abandoning LVI after CVP,
which gets us back to the LegacyPM behavior.

Differential Revision: https://reviews.llvm.org/D84959
clang/test/CodeGen/thinlto-distributed-newpm.ll
llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
llvm/test/Other/new-pm-defaults.ll
llvm/test/Other/new-pm-thinlto-defaults.ll
llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll
llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll
llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll
llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll