[llvm-commits] CVS: llvm/lib/CodeGen/MachineBasicBlock.cpp

Chris Lattner sabre at nondot.org
Mon Sep 25 20:42:14 PDT 2006



Changes in directory llvm/lib/CodeGen:

MachineBasicBlock.cpp updated: 1.28 -> 1.29
---
Log message:

print the preds of each MBB


---
Diffs of the changes:  (+8 -0)

 MachineBasicBlock.cpp |    8 ++++++++
 1 files changed, 8 insertions(+)


Index: llvm/lib/CodeGen/MachineBasicBlock.cpp
diff -u llvm/lib/CodeGen/MachineBasicBlock.cpp:1.28 llvm/lib/CodeGen/MachineBasicBlock.cpp:1.29
--- llvm/lib/CodeGen/MachineBasicBlock.cpp:1.28	Fri May 12 01:33:48 2006
+++ llvm/lib/CodeGen/MachineBasicBlock.cpp	Mon Sep 25 22:41:59 2006
@@ -97,6 +97,14 @@
   if (LBB)
     OS << "\n" << LBB->getName() << " (" << (const void*)this
        << ", LLVM BB @" << (const void*) LBB << "):\n";
+  // Print the preds of this block according to the CFG.
+  if (!pred_empty()) {
+    OS << "    Predecessors according to CFG:";
+    for (const_pred_iterator PI = pred_begin(), E = pred_end(); PI != E; ++PI)
+      OS << " " << *PI;
+    OS << "\n";
+  }
+  
   for (const_iterator I = begin(); I != end(); ++I) {
     OS << "\t";
     I->print(OS, &getParent()->getTarget());






More information about the llvm-commits mailing list