[NewPM] Make eager analysis invalidation per-adaptor
authorArthur Eubanks <aeubanks@google.com>
Wed, 3 Nov 2021 22:45:30 +0000 (15:45 -0700)
committerArthur Eubanks <aeubanks@google.com>
Fri, 5 Nov 2021 00:16:11 +0000 (17:16 -0700)
commit7175886a0f612aded1430ae240ca7ffd53d260dd
tree0b22dfdce98dc25ed2bfebc7f5a4bdf61dc79484
parent41860e602aaa94556ba996fae7b8baa268e25096
[NewPM] Make eager analysis invalidation per-adaptor

Follow-up change to D111575.
We don't need eager invalidation on every adaptor. Most notably,
adaptors running passes that use very few analyses, or passes that
purely invalidate specific analyses.

Also allow testing of this via a pipeline string
"function<eager-inv>()".

The compile time/memory impact of this is very comparable to D111575.
https://llvm-compile-time-tracker.com/compare.php?from=9a2eec512a29df45c90c2fcb741e9d5c693b1383&to=b9f20bcdea138060967d95a98eab87ce725b22bb&stat=instructions

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D113196
llvm/include/llvm/Analysis/CGSCCPassManager.h
llvm/include/llvm/IR/PassManager.h
llvm/include/llvm/Passes/PassBuilder.h
llvm/lib/Analysis/CGSCCPassManager.cpp
llvm/lib/IR/PassManager.cpp
llvm/lib/Passes/PassBuilder.cpp
llvm/lib/Passes/PassBuilderPipelines.cpp
llvm/test/Other/new-pm-eager-invalidate.ll
llvm/test/Other/new-pm-print-pipeline.ll