Add loop info verification mechanism.
[oota-llvm.git] / include / llvm / Analysis / LoopPass.h
index 4163a09d333cb8b399e9ff8e6fd3d94ec8eaefe8..7a820ccc5dac0015d3a9e650ffd1e9f614f79f47 100644 (file)
@@ -29,6 +29,8 @@ class Function;
 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;
@@ -66,6 +68,7 @@ class LoopPass : public Pass {
 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
@@ -111,6 +114,11 @@ public:
   // 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;