1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
llvm-mirror/unittests
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
..
ADT [ADT] Add the worlds simplest STL extra. Or at least close to it. 2016-08-19 02:07:51 +00:00
Analysis Consistently use LoopAnalysisManager 2016-08-09 00:28:52 +00:00
AsmParser Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
Bitcode Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
CodeGen GlobalISel: support loads and stores of strange types. 2016-08-15 21:13:17 +00:00
DebugInfo [msf] Resubmit "Rename Msf -> MSF". 2016-07-29 20:56:36 +00:00
ExecutionEngine Revert r279016 -- it breaks win32-elf JIT tests. 2016-08-18 01:33:28 +00:00
IR [PM] Make the the new pass manager support fully generic extra arguments 2016-08-19 09:45:16 +00:00
LineEditor
Linker Remangle intrinsics names when types are renamed 2016-06-24 15:10:29 +00:00
MC
MI MIRParser: Use dot instead of colon to mark subregisters 2016-07-26 21:49:34 +00:00
ObjectYAML
Option Option parser: class for consuming a joined arg in addition to all remaining args 2016-04-15 00:23:30 +00:00
ProfileData Use the range variant of find_if instead of unpacking begin/end 2016-08-12 00:18:03 +00:00
Support [ADT] Add filter_iterator for filtering elements 2016-08-12 22:03:28 +00:00
Transforms [asan] Add support of lifetime poisoning into ComputeASanStackFrameLayout 2016-08-18 00:56:58 +00:00
CMakeLists.txt