[llvm-commits] CVS: llvm/include/llvm/PassManager.h

Devang Patel dpatel at apple.com
Wed Nov 8 02:44:58 PST 2006



Changes in directory llvm/include/llvm:

PassManager.h updated: 1.25 -> 1.26
---
Log message:

Split FunctionPassManager_New into FunctionPassManager_New and FunctionPassManagerImpl_New.
FunctionPassManagerImpl_New implements the pass manager. 
FunctionPassManager_New is the public interface.



---
Diffs of the changes:  (+28 -0)

 PassManager.h |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+)


Index: llvm/include/llvm/PassManager.h
diff -u llvm/include/llvm/PassManager.h:1.25 llvm/include/llvm/PassManager.h:1.26
--- llvm/include/llvm/PassManager.h:1.25	Wed Nov  8 04:29:57 2006
+++ llvm/include/llvm/PassManager.h	Wed Nov  8 04:44:40 2006
@@ -90,6 +90,7 @@
 
 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 @@
 
 };
 
+/// 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






More information about the llvm-commits mailing list