diff options
Diffstat (limited to 'include/llvm/PassManager.h')
-rw-r--r-- | include/llvm/PassManager.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/llvm/PassManager.h b/include/llvm/PassManager.h index 53dfa6bab0..c75bc21a03 100644 --- a/include/llvm/PassManager.h +++ b/include/llvm/PassManager.h @@ -143,6 +143,29 @@ private: BasicBlockPassManager_New *activeBBPassManager; }; +/// FunctionPassManager_New manages FunctionPasses. +/// It batches all Module passes passes and function pass managers together and +/// sequence them to process one module. +class ModulePassManager_New: public Pass { + +public: + ModulePassManager_New() { activeFunctionPassManager = NULL; } + + /// Add a pass into a passmanager queue. + bool addPass(Pass *p); + + /// run - Execute all of the passes scheduled for execution. Keep track of + /// whether any of the passes modifies the module, and if so, return true. + bool runOnModule(Module &M); + +private: + // Collection of pass that are not yet scheduled + std::vector<Pass *> PassVector; + + // Active Pass Manager + FunctionPassManager_New *activeFunctionPassManager; +}; + } // End llvm namespace #endif |