mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-13 06:39:12 +00:00
Use PassManagerBase, to give clients the option of using either
FunctionPassManager or regular PassManager. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103773 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
89938ce0ad
commit
8090e214f7
@ -31,7 +31,7 @@ namespace llvm {
|
||||
///
|
||||
/// \arg OptimizationLevel - The optimization level, corresponding to -O0,
|
||||
/// -O1, etc.
|
||||
static inline void createStandardFunctionPasses(FunctionPassManager *PM,
|
||||
static inline void createStandardFunctionPasses(PassManagerBase *PM,
|
||||
unsigned OptimizationLevel);
|
||||
|
||||
/// createStandardModulePasses - Add the standard list of module passes to the
|
||||
@ -46,7 +46,7 @@ namespace llvm {
|
||||
/// \arg HaveExceptions - Whether the module may have code using exceptions.
|
||||
/// \arg InliningPass - The inlining pass to use, if any, or null. This will
|
||||
/// always be added, even at -O0.a
|
||||
static inline void createStandardModulePasses(PassManager *PM,
|
||||
static inline void createStandardModulePasses(PassManagerBase *PM,
|
||||
unsigned OptimizationLevel,
|
||||
bool OptimizeSize,
|
||||
bool UnitAtATime,
|
||||
@ -61,14 +61,14 @@ namespace llvm {
|
||||
/// Internalize - Run the internalize pass.
|
||||
/// RunInliner - Use a function inlining pass.
|
||||
/// VerifyEach - Run the verifier after each pass.
|
||||
static inline void createStandardLTOPasses(PassManager *PM,
|
||||
static inline void createStandardLTOPasses(PassManagerBase *PM,
|
||||
bool Internalize,
|
||||
bool RunInliner,
|
||||
bool VerifyEach);
|
||||
|
||||
// Implementations
|
||||
|
||||
static inline void createStandardFunctionPasses(FunctionPassManager *PM,
|
||||
static inline void createStandardFunctionPasses(PassManagerBase *PM,
|
||||
unsigned OptimizationLevel) {
|
||||
if (OptimizationLevel > 0) {
|
||||
PM->add(createCFGSimplificationPass());
|
||||
@ -82,7 +82,7 @@ namespace llvm {
|
||||
|
||||
/// createStandardModulePasses - Add the standard module passes. This is
|
||||
/// expected to be run after the standard function passes.
|
||||
static inline void createStandardModulePasses(PassManager *PM,
|
||||
static inline void createStandardModulePasses(PassManagerBase *PM,
|
||||
unsigned OptimizationLevel,
|
||||
bool OptimizeSize,
|
||||
bool UnitAtATime,
|
||||
@ -164,14 +164,14 @@ namespace llvm {
|
||||
}
|
||||
}
|
||||
|
||||
static inline void addOnePass(PassManager *PM, Pass *P, bool AndVerify) {
|
||||
static inline void addOnePass(PassManagerBase *PM, Pass *P, bool AndVerify) {
|
||||
PM->add(P);
|
||||
|
||||
if (AndVerify)
|
||||
PM->add(createVerifierPass());
|
||||
}
|
||||
|
||||
static inline void createStandardLTOPasses(PassManager *PM,
|
||||
static inline void createStandardLTOPasses(PassManagerBase *PM,
|
||||
bool Internalize,
|
||||
bool RunInliner,
|
||||
bool VerifyEach) {
|
||||
|
Loading…
Reference in New Issue
Block a user