Restore dump() methods to Loop and MachineLoop.
authorDan Gohman <gohman@apple.com>
Tue, 5 Jan 2010 21:08:02 +0000 (21:08 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 5 Jan 2010 21:08:02 +0000 (21:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92772 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/LoopInfo.h
include/llvm/CodeGen/MachineLoopInfo.h
lib/Analysis/LoopInfo.cpp
lib/CodeGen/MachineLoopInfo.cpp

index 060286fc5e238e7e00d0f134bdba3ebfaba1dede..33bf0b0374886dbe24c7d665e25701f29c9ab736 100644 (file)
@@ -478,7 +478,7 @@ public:
     for (iterator I = begin(), E = end(); I != E; ++I)
       (*I)->print(OS, Depth+2);
   }
-  
+
 protected:
   friend class LoopInfoBase<BlockT, LoopT>;
   explicit LoopBase(BlockT *BB) : ParentLoop(0) {
@@ -588,6 +588,8 @@ public:
   /// block, return that block. Otherwise return null.
   BasicBlock *getUniqueExitBlock() const;
 
+  void dump() const;
+  
 private:
   friend class LoopInfoBase<BasicBlock, Loop>;
   explicit Loop(BasicBlock *BB) : LoopBase<BasicBlock, Loop>(BB) {}
index d3df805f642b31e6a83319ef479defee6b36d00e..8459a8db9a306068d8e080e5839697d3b5776094 100644 (file)
@@ -49,6 +49,8 @@ public:
   /// contiguous with the part the contains the header.
   MachineBasicBlock *getBottomBlock();
 
+  void dump() const;
+
 private:
   friend class LoopInfoBase<MachineBasicBlock, MachineLoop>;
   explicit MachineLoop(MachineBasicBlock *MBB)
index 5d31c1157e112c492ed8bac7c33ce16253311bb4..453af5a5555af83c8b3ea58eb8bd8d78f296a27d 100644 (file)
@@ -21,6 +21,7 @@
 #include "llvm/Assembly/Writer.h"
 #include "llvm/Support/CFG.h"
 #include "llvm/Support/CommandLine.h"
+#include "llvm/Support/Debug.h"
 #include "llvm/ADT/DepthFirstIterator.h"
 #include "llvm/ADT/SmallPtrSet.h"
 #include <algorithm>
@@ -385,6 +386,10 @@ BasicBlock *Loop::getUniqueExitBlock() const {
   return 0;
 }
 
+void Loop::dump() const {
+  print(dbgs());
+}
+
 //===----------------------------------------------------------------------===//
 // LoopInfo implementation
 //
index d561a5bb8c998cc14e454bb2edeec48a725f3340..269538b31d0b9442c64ee33b7a367d55430a7ec0 100644 (file)
@@ -17,6 +17,7 @@
 #include "llvm/CodeGen/MachineLoopInfo.h"
 #include "llvm/CodeGen/MachineDominators.h"
 #include "llvm/CodeGen/Passes.h"
+#include "llvm/Support/Debug.h"
 using namespace llvm;
 
 namespace llvm {
@@ -73,3 +74,7 @@ MachineBasicBlock *MachineLoop::getBottomBlock() {
   }
   return BotMBB;
 }
+
+void MachineLoop::dump() const {
+  print(dbgs());
+}