- virtual void print(std::ostream &O, const Module *M) const;
- void print(std::ostream *O, const Module *M) const { if (O) print(*O, M); }
- void dump() const; // dump - call print(std::cerr, 0);
+ virtual void print(raw_ostream &O, const Module *M) const;
+ void dump() const; // dump - Print to stderr.
+
+ /// createPrinterPass - Get a Pass appropriate to print the IR this
+ /// pass operates on (Module, Function or MachineFunction).
+ virtual Pass *createPrinterPass(raw_ostream &O,
+ const std::string &Banner) const = 0;
+
+ /// Each pass is responsible for assigning a pass manager to itself.
+ /// PMS is the stack of available pass manager.
+ virtual void assignPassManager(PMStack &,
+ PassManagerType) {}
+ /// Check if available pass managers are suitable for this pass or not.
+ virtual void preparePassManager(PMStack &);
+
+ /// Return what kind of Pass Manager can manage this pass.
+ virtual PassManagerType getPotentialPassManagerType() const;