summaryrefslogtreecommitdiff
path: root/lib/Passes/PassRegistry.def
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2016-12-10 06:34:44 +0000
committerChandler Carruth <chandlerc@gmail.com>2016-12-10 06:34:44 +0000
commit8bf2780092fed6508efe8c97534a41273fe39a19 (patch)
tree58e941adead34a8507d0dc31fb9b252901c4b4d8 /lib/Passes/PassRegistry.def
parent2c5ce04e48508496b095106faccff7426518664c (diff)
[PM] Support invalidation of inner analysis managers from a pass over the outer IR unit.
Summary: This never really got implemented, and was very hard to test before a lot of the refactoring changes to make things more robust. But now we can test it thoroughly and cleanly, especially at the CGSCC level. The core idea is that when an inner analysis manager proxy receives the invalidation event for the outer IR unit, it needs to walk the inner IR units and propagate it to the inner analysis manager for each of those units. For example, each function in the SCC needs to get an invalidation event when the SCC gets one. The function / module interaction is somewhat boring here. This really becomes interesting in the face of analysis-backed IR units. This patch effectively handles all of the CGSCC layer's needs -- both invalidating SCC analysis and invalidating function analysis when an SCC gets invalidated. However, this second aspect doesn't really handle the LoopAnalysisManager well at this point. That one will need some change of design in order to fully integrate, because unlike the call graph, the entire function behind a LoopAnalysis's results can vanish out from under us, and we won't even have a cached API to access. I'd like to try to separate solving the loop problems into a subsequent patch though in order to keep this more focused so I've adapted them to the API and updated the tests that immediately fail, but I've not added the level of testing and validation at that layer that I have at the CGSCC layer. An important aspect of this change is that the proxy for the FunctionAnalysisManager at the SCC pass layer doesn't work like the other proxies for an inner IR unit as it doesn't directly manage the FunctionAnalysisManager and invalidation or clearing of it. This would create an ever worsening problem of dual ownership of this responsibility, split between the module-level FAM proxy and this SCC-level FAM proxy. Instead, this patch changes the SCC-level FAM proxy to work in terms of the module-level proxy and defer to it to handle much of the updates. It only does SCC-specific invalidation. This will become more important in subsequent patches that support more complex invalidaiton scenarios. Reviewers: jlebar Subscribers: mehdi_amini, mcrosier, mzolotukhin, llvm-commits Differential Revision: https://reviews.llvm.org/D27197 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289317 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Passes/PassRegistry.def')
-rw-r--r--lib/Passes/PassRegistry.def1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Passes/PassRegistry.def b/lib/Passes/PassRegistry.def
index d3a6be871ad..a35e7e8caf1 100644
--- a/lib/Passes/PassRegistry.def
+++ b/lib/Passes/PassRegistry.def
@@ -79,6 +79,7 @@ MODULE_PASS("verify", VerifierPass())
#define CGSCC_ANALYSIS(NAME, CREATE_PASS)
#endif
CGSCC_ANALYSIS("no-op-cgscc", NoOpCGSCCAnalysis())
+CGSCC_ANALYSIS("fam-proxy", FunctionAnalysisManagerCGSCCProxy())
#undef CGSCC_ANALYSIS
#ifndef CGSCC_PASS