[PATCH] D84959: [NewPM][LVI] Abandon LVI after CVP

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 30 11:01:13 PDT 2020


nikic created this revision.
nikic added reviewers: asbirlea, aeubanks, ychen, tejohnson.
Herald added subscribers: llvm-commits, dexonsmith, steven_wu, hiraditya.
Herald added a project: LLVM.
nikic requested review of this revision.

As mentioned on D70376 <https://reviews.llvm.org/D70376>, LVI can currently cause performance issues when running under NewPM. The root 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. A `-no-lvi-abandon` option is added to allow suppressing this behavior for pipeline tests, which should preferably not contain any invalidations.

I don't think something like this is done anywhere else, so I'm wondering whether this kind of explicit abandonment of analysis passes under NewPM is acceptable.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D84959

Files:
  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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84959.281986.patch
Type: text/x-patch
Size: 22273 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200730/9f22dc5a/attachment.bin>


More information about the llvm-commits mailing list