diff options
author | Devang Patel <dpatel@apple.com> | 2006-11-08 10:44:40 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2006-11-08 10:44:40 +0000 |
commit | c63592b19ecd54a1318a19d87b5c0bd85f172a4f (patch) | |
tree | 132f6966493ae23269e6d0def8665d328d614638 /include/llvm/PassManager.h | |
parent | 5a39b2e8067450839a1a041a26e2f9d8dd07f40a (diff) |
Split FunctionPassManager_New into FunctionPassManager_New and FunctionPassManagerImpl_New.
FunctionPassManagerImpl_New implements the pass manager.
FunctionPassManager_New is the public interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31547 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/PassManager.h')
-rw-r--r-- | include/llvm/PassManager.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/llvm/PassManager.h b/include/llvm/PassManager.h index 927ea9f785..f71d94a1df 100644 --- a/include/llvm/PassManager.h +++ b/include/llvm/PassManager.h @@ -90,6 +90,7 @@ public: class ModulePassManager_New; class PassManagerImpl_New; +class FunctionPassManagerImpl_New; /// PassManagerAnalysisHelper helps pass manager analysis required by /// the managed passes. It provides methods to add/remove analysis @@ -148,6 +149,33 @@ private: }; +/// FunctionPassManager_New manages FunctionPasses and BasicBlockPassManagers. +class FunctionPassManager_New : public Pass, + public PassManagerAnalysisHelper { +public: + FunctionPassManager_New(ModuleProvider *P) { /* TODO */ } + FunctionPassManager_New(); + ~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); + + /// 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: + + FunctionPassManagerImpl_New *FPM; + +}; + + } // End llvm namespace #endif |