- virtual void assignPassManager(PMStack &PMS,
- PassManagerType T = PMT_Unknown) {}
+ /// 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) {}
+ /// 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 {
+ return PMT_Unknown;
+ }
+