llvm-project/llvm/lib
Chandler Carruth ba90ae969c [PM] Introduce the facilities for registering cross-IR-unit dependencies
that require deferred invalidation.

This handles the other real-world invalidation scenario that we have
cases of: a function analysis which caches references to a module
analysis. We currently do this in the AA aggregation layer and might
well do this in other places as well.

Since this is relative rare, the technique is somewhat more cumbersome.
Analyses need to register themselves when accessing the outer analysis
manager's proxy. This proxy is already necessarily present to allow
access to the outer IR unit's analyses. By registering here we can track
and trigger invalidation when that outer analysis goes away.

To make this work we need to enhance the PreservedAnalyses
infrastructure to support a (slightly) more explicit model for "sets" of
analyses, and allow abandoning a single specific analyses even when
a set covering that analysis is preserved. That allows us to describe
the scenario of preserving all Function analyses *except* for the one
where deferred invalidation has triggered.

We also need to teach the invalidator API to support direct ID calls
instead of always going through a template to dispatch so that we can
just record the ID mapping.

I've introduced testing of all of this both for simple module<->function
cases as well as for more complex cases involving a CGSCC layer.

Much like the previous patch I've not tried to fully update the loop
pass management layer because that layer is due to be heavily reworked
to use similar techniques to the CGSCC to handle updates. As that
happens, we'll have a better testing basis for adding support like this.

Many thanks to both Justin and Sean for the extensive reviews on this to
help bring the API design and documentation into a better state.

Differential Revision: https://reviews.llvm.org/D27198

llvm-svn: 290594
2016-12-27 08:40:39 +00:00
..
Analysis [PM] Introduce the facilities for registering cross-IR-unit dependencies 2016-12-27 08:40:39 +00:00
AsmParser [DebugInfo] Added support for Checksum debug info feature. 2016-12-25 10:12:09 +00:00
Bitcode [DebugInfo] Added support for Checksum debug info feature. 2016-12-25 10:12:09 +00:00
CodeGen [SelectionDAG] Early out from computeKnownBits when we know we will have no common bits. 2016-12-24 12:59:35 +00:00
DebugInfo [ObjectYAML] Support for DWARF debug_info section 2016-12-22 22:44:27 +00:00
Demangle Demangle: remove references to allocator for default allocator 2016-11-20 00:20:27 +00:00
ExecutionEngine [Orc][RPC] Add a ParallelCallGroup utility for dispatching and waiting on 2016-12-25 21:55:05 +00:00
Fuzzer [libfuzzer] dump_coverage command line flag 2016-12-19 22:18:08 +00:00
IR [PM] Introduce the facilities for registering cross-IR-unit dependencies 2016-12-27 08:40:39 +00:00
IRReader Timer: Track name and description. 2016-11-18 19:43:18 +00:00
LTO [ThinLTO] Import composite types as declarations 2016-12-16 21:25:01 +00:00
LibDriver LibDriver: Allow resource files to be archive members. 2016-12-15 19:37:46 +00:00
LineEditor
Linker [ThinLTO] Import only necessary DICompileUnit fields 2016-12-12 16:09:30 +00:00
MC Resubmit "[CodeView] Hook CodeViewRecordIO for reading/writing symbols." 2016-12-16 22:48:14 +00:00
Object Fix a bugs with using some Mach-O command line flags like "-arch armv7m". 2016-12-16 22:54:02 +00:00
ObjectYAML [ObjectYAML] Support for DWARF debug_info section 2016-12-22 22:44:27 +00:00
Option Generalize ArgList::AddAllArgs more 2016-09-29 19:47:58 +00:00
Passes [PM] Try to improve the comments here to make what's going on more 2016-12-24 05:11:17 +00:00
ProfileData Make the Error class constructor protected 2016-11-11 04:28:40 +00:00
Support Add an assertion for cl::opt names: they can't start with '-' 2016-12-23 23:55:26 +00:00
TableGen [TableGen] Centralize/Unify error handling. 2016-12-05 22:58:01 +00:00
Target [AVX-512] Add all forms of VPALIGNR, VALIGND, and VALIGNQ to the load folding tables. 2016-12-27 06:51:09 +00:00
Transforms [PM] Add one of the features left out of the initial inliner patch: 2016-12-27 06:46:20 +00:00
CMakeLists.txt Try to fix a circular dependency in the modules build. 2016-09-06 20:16:19 +00:00
LLVMBuild.txt Add an c++ itanium demangler to llvm. 2016-09-06 19:16:48 +00:00