PMT_CallGraphPassManager, ///< CGPassManager
PMT_FunctionPassManager, ///< FPPassManager
PMT_LoopPassManager, ///< LPPassManager
+ PMT_RegionPassManager, ///< RGPassManager
PMT_BasicBlockPassManager, ///< BBPassManager
PMT_Last
};
// Different types of passes.
enum PassKind {
PT_BasicBlock,
+ PT_Region,
PT_Loop,
PT_Function,
PT_CallGraphSCC,
PT_Module,
PT_PassManager
};
-
+
//===----------------------------------------------------------------------===//
/// Pass interface - Implemented by all 'passes'. Subclass this if you are an
/// interprocedural optimization or you do not fit into any of the more
/// Each pass is responsible for assigning a pass manager to itself.
/// PMS is the stack of available pass manager.
virtual void assignPassManager(PMStack &,
- PassManagerType = PMT_Unknown) {}
+ PassManagerType) {}
/// Check if available pass managers are suitable for this pass or not.
virtual void preparePassManager(PMStack &);
virtual bool runOnModule(Module &M) = 0;
virtual void assignPassManager(PMStack &PMS,
- PassManagerType T = PMT_ModulePassManager);
+ PassManagerType T);
/// Return what kind of Pass Manager can manage this pass.
virtual PassManagerType getPotentialPassManagerType() const;
///
virtual bool doFinalization(Module &);
- /// runOnModule - On a module, we run this pass by initializing,
- /// ronOnFunction'ing once for every function in the module, then by
- /// finalizing.
- ///
- virtual bool runOnModule(Module &M);
-
- /// run - On a function, we simply initialize, run the function, then
- /// finalize.
- ///
- bool run(Function &F);
-
virtual void assignPassManager(PMStack &PMS,
- PassManagerType T = PMT_FunctionPassManager);
+ PassManagerType T);
/// Return what kind of Pass Manager can manage this pass.
virtual PassManagerType getPotentialPassManagerType() const;
///
virtual bool doFinalization(Module &);
-
- // To run this pass on a function, we simply call runOnBasicBlock once for
- // each function.
- //
- bool runOnFunction(Function &F);
-
virtual void assignPassManager(PMStack &PMS,
- PassManagerType T = PMT_BasicBlockPassManager);
+ PassManagerType T);
/// Return what kind of Pass Manager can manage this pass.
virtual PassManagerType getPotentialPassManagerType() const;