diff options
author | Devang Patel <dpatel@apple.com> | 2006-11-07 21:49:50 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2006-11-07 21:49:50 +0000 |
commit | 448d27cd795dc273249f123444509403f4fa4fac (patch) | |
tree | 1c5e13b933d0d8e232c1abb23f0e3eea49b6aade /include/llvm/PassManager.h | |
parent | 5e213ea69796f695d5c33f18c25c82dad4c87a24 (diff) |
Add FunctionPassManager_New.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31515 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/PassManager.h')
-rw-r--r-- | include/llvm/PassManager.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/include/llvm/PassManager.h b/include/llvm/PassManager.h index 2769a4dbf2..53dfa6bab0 100644 --- a/include/llvm/PassManager.h +++ b/include/llvm/PassManager.h @@ -108,6 +108,41 @@ private: std::vector<Pass *> PassVector; }; +/// FunctionPassManager_New manages FunctionPasses and BasicBlockPassManagers. +/// It batches all function passes and basic block pass managers together and +/// sequence them to process one function at a time before processing next +/// function. +class FunctionPassManager_New:public Pass { +public: + FunctionPassManager_New(ModuleProvider *P) { /* TODO */ } + FunctionPassManager_New() { + activeBBPassManager = NULL; + } + ~FunctionPassManager_New() { /* TODO */ }; + + /// add - Add a pass to the queue of passes to run. This passes + /// ownership of the Pass to the PassManager. When the + /// PassManager_X is destroyed, the pass will be destroyed as well, so + /// there is no need to delete the pass. (TODO delete passes.) + /// This implies that all passes MUST be allocated with 'new'. + void add(Pass *P) { /* TODO*/ } + + /// Add pass into the pass manager queue. + bool addPass(Pass *P); + + /// Execute all of the passes scheduled for execution. Keep + /// track of whether any of the passes modifies the function, and if + /// so, return true. + bool runOnModule(Module &M); + +private: + // Collection of pass that are not yet scheduled + std::vector<Pass *> PassVector; + + // Active Pass Managers + BasicBlockPassManager_New *activeBBPassManager; +}; + } // End llvm namespace #endif |