1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/unittests/IR
Chandler Carruth 9d65c3131d [PM] Make the the new pass manager support fully generic extra arguments
to run methods, both for transform passes and analysis passes.

This also allows the analysis manager to use a different set of extra
arguments from the pass manager where useful. Consider passes over
analysis produced units of IR like SCCs of the call graph or loops.
Passes of this nature will often want to refer to the analysis result
that was used to compute their IR units (the call graph or LoopInfo).
And for transformations, they may want to communicate special update
information to the outer pass manager. With this change, it becomes
possible to have a run method for a loop pass that looks more like:

  PreservedAnalyses run(Loop &L, AnalysisManager<Loop, LoopInfo> &AM,
                        LoopInfo &LI, LoopUpdateRecord &UR);

And to query the analysis manager like:

    AM.getResult<MyLoopAnalysis>(L, LI);

This makes accessing the known-available analyses convenient and clear,
and it makes passing customized data structures around easy.

My initial use case is going to be in updating the pass manager layers
when the analysis units of IR change. But there are more use cases here
such as having a layer that lets inner passes signal whether certain
additional passes should be run because of particular simplifications
made. Two desires for this have come up in the past: triggering
additional optimization after successfully unrolling loops, and
triggering additional inlining after collapsing indirect calls to direct
calls.

Despite adding this layer of generic extensibility, the *only* change to
existing, simple usage are for places where we forward declare the
AnalysisManager template. We really shouldn't be doing this because of
the fragility exposed here, but currently it makes coping with the
legacy PM code easier.

Differential Revision: http://reviews.llvm.org/D21462

llvm-svn: 279227
2016-08-19 09:45:16 +00:00
..
AsmWriterTest.cpp
AttributesTest.cpp Fix non-determinism in order of LLVM attributes 2016-04-04 23:06:05 +00:00
CMakeLists.txt IR: LLVMContextTest => DebugTypeODRUniquingTest, NFC 2016-04-19 17:11:06 +00:00
ConstantRangeTest.cpp [ConstantRange] Add an getEquivalentICmp helper 2016-05-19 03:53:06 +00:00
ConstantsTest.cpp Fix constant folding of addrspacecast of null 2016-05-21 00:14:04 +00:00
DebugInfoTest.cpp Support the DW_AT_noreturn DWARF flag. 2016-08-17 16:02:43 +00:00
DebugTypeODRUniquingTest.cpp IR: Enable debug info type ODR uniquing for forward decls 2016-04-19 18:00:19 +00:00
DominatorTreeTest.cpp Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
FunctionTest.cpp Fix warnings in FunctionTest.cpp. 2016-07-13 18:17:46 +00:00
InstructionsTest.cpp Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
IntrinsicsTest.cpp Handle more edge cases in intrinsic name binary search 2016-01-26 22:33:19 +00:00
IRBuilderTest.cpp Remove some unused variables 2016-03-13 22:00:18 +00:00
LegacyPassManagerTest.cpp [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
MDBuilderTest.cpp
MetadataTest.cpp IR: Drop uniquing when an MDNode Value operand is deleted 2016-08-03 18:19:43 +00:00
PassManagerTest.cpp [PM] Make the the new pass manager support fully generic extra arguments 2016-08-19 09:45:16 +00:00
PatternMatch.cpp Add support to paternmatch for simple const Value cases. 2016-08-12 22:16:05 +00:00
TypeBuilderTest.cpp [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
TypesTest.cpp
UserTest.cpp Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
UseTest.cpp
ValueHandleTest.cpp Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
ValueMapTest.cpp Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
ValueTest.cpp Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
VerifierTest.cpp Port the strip-invalid-debuginfo logic to the legacy verifier pass, too. 2016-05-25 21:33:20 +00:00
WaymarkTest.cpp Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00