llvm/lib
Chandler Carruth 8bf2780092 [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
2016-12-10 06:34:44 +00:00
..
Analysis [PM] Support invalidation of inner analysis managers from a pass over the outer IR unit. 2016-12-10 06:34:44 +00:00
AsmParser
Bitcode
CodeGen Fix LLVM's use of DW_OP_bit_piece in DWARF expressions. 2016-12-09 20:43:40 +00:00
DebugInfo
Demangle
ExecutionEngine
Fuzzer [libFuzzer] test cleanup (3) 2016-12-10 02:48:42 +00:00
IR [PM] Support invalidation of inner analysis managers from a pass over the outer IR unit. 2016-12-10 06:34:44 +00:00
IRReader
LibDriver
LineEditor
Linker
LTO LTO: Hash the parts of the LTO configuration that affect code generation. 2016-12-08 05:28:30 +00:00
MC Add a comment consumer mechanism to MCAsmLexer 2016-12-08 10:31:21 +00:00
Object
ObjectYAML [ObjectYAML] Support for DWARF debug_aranges 2016-12-09 00:26:44 +00:00
Option
Passes [PM] Support invalidation of inner analysis managers from a pass over the outer IR unit. 2016-12-10 06:34:44 +00:00
ProfileData
Support Re-commit r289184, "Support: Use a 64-bit seek in raw_fd_ostream::seek()." with a configure-time check for lseek64. 2016-12-09 05:20:43 +00:00
TableGen
Target [X86] Use X86ISD::CVTTP2SI and X86ISD::CVTTP2UI for lowering 128-bit cvttps2qq and cvttps2uqq intrinsics since there is a mismatch between number of input and output elements. 2016-12-10 06:02:48 +00:00
Transforms [SCCP] Teach the pass about mul %x 0 even if %x is overdefined. 2016-12-09 03:08:42 +00:00
CMakeLists.txt
LLVMBuild.txt