From 92c45eebf77de5d6ee84a3f18f560b83cb68e720 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Tue, 7 Nov 2006 22:03:15 +0000 Subject: Add ModulePassManager_New. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31517 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/PassManager.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'include/llvm/PassManager.h') 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 PassVector; + + // Active Pass Manager + FunctionPassManager_New *activeFunctionPassManager; +}; + } // End llvm namespace #endif -- cgit v1.2.3