diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2012-04-08 14:37:01 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2012-04-08 14:37:01 +0000 |
commit | 49158908dceeccda0f37254b48ff5711695911c8 (patch) | |
tree | e3dfbba8b5ac7bf9ba9ae9909a2f900b1b3e192d /llvm/lib/CodeGen/MachineBlockPlacement.cpp | |
parent | f82b0e2d293e5521d154e54ebb7face21e5c367a (diff) | |
download | bcm5719-llvm-49158908dceeccda0f37254b48ff5711695911c8.tar.gz bcm5719-llvm-49158908dceeccda0f37254b48ff5711695911c8.zip |
Add a debug-only 'dump' method to the BlockChain structure to ease
debugging.
llvm-svn: 154286
Diffstat (limited to 'llvm/lib/CodeGen/MachineBlockPlacement.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBlockPlacement.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineBlockPlacement.cpp b/llvm/lib/CodeGen/MachineBlockPlacement.cpp index 63892af890a..07b7318ef2e 100644 --- a/llvm/lib/CodeGen/MachineBlockPlacement.cpp +++ b/llvm/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 |