1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/unittests/IR
Chandler Carruth 99ebb6e7dc [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
..
AsmWriterTest.cpp
AttributesTest.cpp
CMakeLists.txt
ConstantRangeTest.cpp Introduce ConstantRange.addWithNoSignedWrap 2016-10-19 14:44:23 +00:00
ConstantsTest.cpp
DebugInfoTest.cpp
DebugTypeODRUniquingTest.cpp
DominatorTreeTest.cpp
FunctionTest.cpp
InstructionsTest.cpp
IntrinsicsTest.cpp
IRBuilderTest.cpp [DebugInfo] Changed DIBuilder::createCompileUnit() to take DIFile instead of FileName and Directory. 2016-12-14 20:24:54 +00:00
LegacyPassManagerTest.cpp
MDBuilderTest.cpp
MetadataTest.cpp [DebugInfo] Added support for Checksum debug info feature. 2016-12-25 10:12:09 +00:00
ModuleTest.cpp Avoid unnecessary constexpr to appease MSVC 2013 2016-10-11 18:35:13 +00:00
PassManagerTest.cpp [PM] Introduce the facilities for registering cross-IR-unit dependencies 2016-12-27 08:40:39 +00:00
PatternMatch.cpp
TypeBuilderTest.cpp
TypesTest.cpp
UserTest.cpp
UseTest.cpp
ValueHandleTest.cpp
ValueMapTest.cpp
ValueTest.cpp
VerifierTest.cpp [DebugInfo] Changed DIBuilder::createCompileUnit() to take DIFile instead of FileName and Directory. 2016-12-14 20:24:54 +00:00
WaymarkTest.cpp