Aggressively prune the DFS when inserting phi-defs.
[oota-llvm.git] / include / llvm / Pass.h
index e5c073cd9412e692739f71b5af5530adedac6434..9f4e963343c43ee10893489148bfab595ec7e1e2 100644 (file)
 #ifndef LLVM_PASS_H
 #define LLVM_PASS_H
 
-#include "llvm/System/DataTypes.h"
-
 #include <string>
-#include <utility>
-#include <vector>
 
 namespace llvm {
 
@@ -123,7 +119,7 @@ public:
   /// Each pass is responsible for assigning a pass manager to itself.
   /// PMS is the stack of available pass manager. 
   virtual void assignPassManager(PMStack &, 
-                                 PassManagerType = PMT_Unknown) {}
+                                 PassManagerType) {}
   /// Check if available pass managers are suitable for this pass or not.
   virtual void preparePassManager(PMStack &);
   
@@ -167,7 +163,7 @@ public:
   virtual void verifyAnalysis() const;
 
   // dumpPassStructure - Implement the -debug-passes=PassStructure option
-  virtual void dumpPassStructure(unsigned Offset = 0);
+  void dumpPass(unsigned Offset = 0);
 
   // lookupPassInfo - Return the pass info object for the specified pass class,
   // or null if it is not known.
@@ -229,7 +225,7 @@ public:
   virtual bool runOnModule(Module &M) = 0;
 
   virtual void assignPassManager(PMStack &PMS, 
-                                 PassManagerType T = PMT_ModulePassManager);
+                                 PassManagerType T);
 
   ///  Return what kind of Pass Manager can manage this pass.
   virtual PassManagerType getPotentialPassManagerType() const;
@@ -299,19 +295,8 @@ public:
   ///
   virtual bool doFinalization(Module &);
 
-  /// runOnModule - On a module, we run this pass by initializing,
-  /// ronOnFunction'ing once for every function in the module, then by
-  /// finalizing.
-  ///
-  virtual bool runOnModule(Module &M);
-
-  /// run - On a function, we simply initialize, run the function, then
-  /// finalize.
-  ///
-  bool run(Function &F);
-
   virtual void assignPassManager(PMStack &PMS, 
-                                 PassManagerType T = PMT_FunctionPassManager);
+                                 PassManagerType T);
 
   ///  Return what kind of Pass Manager can manage this pass.
   virtual PassManagerType getPotentialPassManagerType() const;
@@ -361,14 +346,8 @@ public:
   ///
   virtual bool doFinalization(Module &);
 
-
-  // To run this pass on a function, we simply call runOnBasicBlock once for
-  // each function.
-  //
-  bool runOnFunction(Function &F);
-
   virtual void assignPassManager(PMStack &PMS, 
-                                 PassManagerType T = PMT_BasicBlockPassManager);
+                                 PassManagerType T);
 
   ///  Return what kind of Pass Manager can manage this pass.
   virtual PassManagerType getPotentialPassManagerType() const;