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
};
+/// 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