Add reg_nodbg_iterator
[oota-llvm.git] / include / llvm / CodeGen / MachineFunctionPass.h
index 6f7c216382a075a6788849862efde85f637ca64f..1a2b12972aba6efeb52155a17cba709788bb7b64 100644 (file)
 #define LLVM_CODEGEN_MACHINE_FUNCTION_PASS_H
 
 #include "llvm/Pass.h"
-#include "llvm/CodeGen/MachineFunction.h"
 
 namespace llvm {
 
+class MachineFunction;
+
 /// MachineFunctionPass - This class adapts the FunctionPass interface to
 /// allow convenient creation of passes that operate on the MachineFunction
 /// representation. Instead of overriding runOnFunction, subclasses
@@ -33,6 +34,9 @@ protected:
   explicit MachineFunctionPass(intptr_t ID) : FunctionPass(ID) {}
   explicit MachineFunctionPass(void *ID) : FunctionPass(ID) {}
 
+  /// createPrinterPass - Get a machine function printer pass.
+  Pass *createPrinterPass(raw_ostream &O, const std::string &Banner) const;
+
   /// runOnMachineFunction - This method must be overloaded to perform the
   /// desired machine code transformation or analysis.
   ///
@@ -40,6 +44,10 @@ protected:
 
   /// getAnalysisUsage - Subclasses that override getAnalysisUsage
   /// must call this.
+  ///
+  /// For MachineFunctionPasses, calling AU.preservesCFG() indicates that
+  /// the pass does not modify the MachineBasicBlock CFG.
+  ///
   virtual void getAnalysisUsage(AnalysisUsage &AU) const;
 
 private: