mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-21 20:12:56 +02:00
d8a5b5b32e
convert one test to use this. This is a particularly significant milestone because it required a working per-function AA framework which can be queried over each function from within a CGSCC transform pass (and additionally a module analysis to be accessible). This is essentially *the* point of the entire pass manager rewrite. A CGSCC transform is able to query for multiple different function's analysis results. It works. The whole thing appears to actually work and accomplish the original goal. While we were able to hack function attrs and basic-aa to "work" in the old pass manager, this port doesn't use any of that, it directly leverages the new fundamental functionality. For this to work, the CGSCC framework also has to support SCC-based behavior analysis, etc. The only part of the CGSCC pass infrastructure not sorted out at this point are the updates in the face of inlining and running function passes that mutate the call graph. The changes are pretty boring and boiler-plate. Most of the work was factored into more focused preperatory patches. But this is what wires it all together. llvm-svn: 261203
94 lines
3.5 KiB
C++
94 lines
3.5 KiB
C++
//===- PassRegistry.def - Registry of passes --------------------*- C++ -*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file is used as the registry of passes that are part of the core LLVM
|
|
// libraries. This file describes both transformation passes and analyses
|
|
// Analyses are registered while transformation passes have names registered
|
|
// that can be used when providing a textual pass pipeline.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// NOTE: NO INCLUDE GUARD DESIRED!
|
|
|
|
#ifndef MODULE_ANALYSIS
|
|
#define MODULE_ANALYSIS(NAME, CREATE_PASS)
|
|
#endif
|
|
MODULE_ANALYSIS("lcg", LazyCallGraphAnalysis())
|
|
MODULE_ANALYSIS("no-op-module", NoOpModuleAnalysis())
|
|
MODULE_ANALYSIS("targetlibinfo", TargetLibraryAnalysis())
|
|
#undef MODULE_ANALYSIS
|
|
|
|
#ifndef MODULE_PASS
|
|
#define MODULE_PASS(NAME, CREATE_PASS)
|
|
#endif
|
|
MODULE_PASS("forceattrs", ForceFunctionAttrsPass())
|
|
MODULE_PASS("inferattrs", InferFunctionAttrsPass())
|
|
MODULE_PASS("invalidate<all>", InvalidateAllAnalysesPass())
|
|
MODULE_PASS("no-op-module", NoOpModulePass())
|
|
MODULE_PASS("print", PrintModulePass(dbgs()))
|
|
MODULE_PASS("print-cg", LazyCallGraphPrinterPass(dbgs()))
|
|
MODULE_PASS("strip-dead-prototypes", StripDeadPrototypesPass())
|
|
MODULE_PASS("verify", VerifierPass())
|
|
#undef MODULE_PASS
|
|
|
|
#ifndef CGSCC_ANALYSIS
|
|
#define CGSCC_ANALYSIS(NAME, CREATE_PASS)
|
|
#endif
|
|
CGSCC_ANALYSIS("no-op-cgscc", NoOpCGSCCAnalysis())
|
|
#undef CGSCC_ANALYSIS
|
|
|
|
#ifndef CGSCC_PASS
|
|
#define CGSCC_PASS(NAME, CREATE_PASS)
|
|
#endif
|
|
CGSCC_PASS("invalidate<all>", InvalidateAllAnalysesPass())
|
|
CGSCC_PASS("function-attrs", PostOrderFunctionAttrsPass())
|
|
CGSCC_PASS("no-op-cgscc", NoOpCGSCCPass())
|
|
#undef CGSCC_PASS
|
|
|
|
#ifndef FUNCTION_ANALYSIS
|
|
#define FUNCTION_ANALYSIS(NAME, CREATE_PASS)
|
|
#endif
|
|
FUNCTION_ANALYSIS("aa", AAManager())
|
|
FUNCTION_ANALYSIS("assumptions", AssumptionAnalysis())
|
|
FUNCTION_ANALYSIS("domtree", DominatorTreeAnalysis())
|
|
FUNCTION_ANALYSIS("loops", LoopAnalysis())
|
|
FUNCTION_ANALYSIS("no-op-function", NoOpFunctionAnalysis())
|
|
FUNCTION_ANALYSIS("scalar-evolution", ScalarEvolutionAnalysis())
|
|
FUNCTION_ANALYSIS("targetlibinfo", TargetLibraryAnalysis())
|
|
FUNCTION_ANALYSIS("targetir",
|
|
TM ? TM->getTargetIRAnalysis() : TargetIRAnalysis())
|
|
|
|
#ifndef FUNCTION_ALIAS_ANALYSIS
|
|
#define FUNCTION_ALIAS_ANALYSIS(NAME, CREATE_PASS) \
|
|
FUNCTION_ANALYSIS(NAME, CREATE_PASS)
|
|
#endif
|
|
FUNCTION_ALIAS_ANALYSIS("basic-aa", BasicAA())
|
|
#undef FUNCTION_ALIAS_ANALYSIS
|
|
#undef FUNCTION_ANALYSIS
|
|
|
|
#ifndef FUNCTION_PASS
|
|
#define FUNCTION_PASS(NAME, CREATE_PASS)
|
|
#endif
|
|
FUNCTION_PASS("adce", ADCEPass())
|
|
FUNCTION_PASS("early-cse", EarlyCSEPass())
|
|
FUNCTION_PASS("instcombine", InstCombinePass())
|
|
FUNCTION_PASS("invalidate<all>", InvalidateAllAnalysesPass())
|
|
FUNCTION_PASS("no-op-function", NoOpFunctionPass())
|
|
FUNCTION_PASS("lower-expect", LowerExpectIntrinsicPass())
|
|
FUNCTION_PASS("print", PrintFunctionPass(dbgs()))
|
|
FUNCTION_PASS("print<assumptions>", AssumptionPrinterPass(dbgs()))
|
|
FUNCTION_PASS("print<domtree>", DominatorTreePrinterPass(dbgs()))
|
|
FUNCTION_PASS("print<loops>", LoopPrinterPass(dbgs()))
|
|
FUNCTION_PASS("print<scalar-evolution>", ScalarEvolutionPrinterPass(dbgs()))
|
|
FUNCTION_PASS("simplify-cfg", SimplifyCFGPass())
|
|
FUNCTION_PASS("sroa", SROA())
|
|
FUNCTION_PASS("verify", VerifierPass())
|
|
FUNCTION_PASS("verify<domtree>", DominatorTreeVerifierPass())
|
|
#undef FUNCTION_PASS
|