1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/lib
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
..
Analysis [PM] Rework the new PM support for building the ModuleSummaryIndex to 2016-08-19 07:49:19 +00:00
AsmParser [LLVM] Fix some Clang-tidy modernize-use-using and Include What You Use warnings 2016-08-18 17:56:27 +00:00
Bitcode Constify some path in the bitcode writer (NFC) 2016-08-19 06:06:18 +00:00
CodeGen [CodeGen] Fix a trivial type conversion bug dating back to pre-2008 2016-08-19 08:38:50 +00:00
DebugInfo [LLVM] Fix some Clang-tidy modernize-use-using and Include What You Use warnings 2016-08-18 17:56:27 +00:00
ExecutionEngine [RuntimeDyld] Add support for ELF R_ARM_REL32 and R_ARM_GOT_PREL. 2016-08-19 01:15:39 +00:00
Fuzzer [libFuzzer] add more __attribute__((visibility("default"))) 2016-08-18 20:52:52 +00:00
IR Add a version of Intrinsic::getName which is more efficient when there are no overloads. 2016-08-18 18:30:54 +00:00
IRReader
LibDriver
LineEditor
Linker Linker: Avoid some ridiculous indentation by using a temporary. NFC 2016-08-15 22:41:42 +00:00
LTO [PM] Rework the new PM support for building the ModuleSummaryIndex to 2016-08-19 07:49:19 +00:00
MC Replace a few more "fall through" comments with LLVM_FALLTHROUGH 2016-08-17 20:30:52 +00:00
Object Replace "fallthrough" comments with LLVM_FALLTHROUGH 2016-08-17 05:10:15 +00:00
ObjectYAML [macho2yaml] Don't write empty linkedit data 2016-08-17 21:46:04 +00:00
Option Replace "fallthrough" comments with LLVM_FALLTHROUGH 2016-08-17 05:10:15 +00:00
Passes [PM] Make the the new pass manager support fully generic extra arguments 2016-08-19 09:45:16 +00:00
ProfileData Use range algorithms instead of unpacking begin/end 2016-08-11 21:15:00 +00:00
Support Replace a few more "fall through" comments with LLVM_FALLTHROUGH 2016-08-17 20:30:52 +00:00
TableGen Replace a few more "fall through" comments with LLVM_FALLTHROUGH 2016-08-17 20:30:52 +00:00
Target [XRay] Synthesize a reference to the xray_instr_map 2016-08-19 04:44:30 +00:00
Transforms [asan] Fix size of shadow incorrectly calculated in r279178 2016-08-19 08:33:53 +00:00
CMakeLists.txt
LLVMBuild.txt