class LoopPass : public Pass {
public:
+ LoopPass(intptr_t pid) : Pass(pid) {}
+
// runOnLoop - THis method should be implemented by the subclass to perform
// whatever action is necessary for the specfied Loop.
virtual bool runOnLoop (Loop *L, LPPassManager &LPM) = 0;
virtual void assignPassManager(PMStack &PMS,
PassManagerType PMT = PMT_LoopPassManager);
+ /// Return what kind of Pass Manager can manage this pass.
+ virtual PassManagerType getPotentialPassManagerType() const {
+ return PMT_LoopPassManager;
+ }
};
class LPPassManager : public FunctionPass, public PMDataManager {
public:
+ static char ID;
LPPassManager(int Depth);
/// run - Execute all of the passes scheduled for execution. Keep track of
// queue. This allows LoopPass to change loop nest for the loop. This
// utility may send LPPassManager into infinite loops so use caution.
void redoLoop(Loop *L);
+
+private:
+ /// verifyLoopInfo - Verify loop nest.
+ void verifyLoopInfo();
+
private:
std::deque<Loop *> LQ;
bool skipThisLoop;