aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-04-08 14:37:01 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-04-08 14:37:01 +0000
commit6313d941d29d77f62662c4bd13f12314e6b4b86e (patch)
treeb6d2756a8d51698e32642b1babace873e04d9f3f /lib/CodeGen
parent2450eca96061ddb1d9a62f42669184684476448a (diff)
Add a debug-only 'dump' method to the BlockChain structure to ease
debugging. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154286 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/MachineBlockPlacement.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineBlockPlacement.cpp b/lib/CodeGen/MachineBlockPlacement.cpp
index 63892af890..07b7318ef2 100644
--- a/lib/CodeGen/MachineBlockPlacement.cpp
+++ b/lib/CodeGen/MachineBlockPlacement.cpp
@@ -141,6 +141,14 @@ public:
}
}
+#ifndef NDEBUG
+ /// \brief Dump the blocks in this chain.
+ void dump() LLVM_ATTRIBUTE_USED {
+ for (iterator I = begin(), E = end(); I != E; ++I)
+ (*I)->dump();
+ }
+#endif // NDEBUG
+
/// \brief Count of predecessors within the loop currently being processed.
///
/// This count is updated at each loop we process to represent the number of