diff options
author | Chris Lattner <sabre@nondot.org> | 2006-09-26 03:41:59 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-09-26 03:41:59 +0000 |
commit | 9a1e91b107323a82b07737d9ef2f562cd966dedb (patch) | |
tree | 83fa2a44e5a4c71b361763587c3055c726908454 /llvm/lib/CodeGen/MachineBasicBlock.cpp | |
parent | ad4e7eb59e5fa85345b2cc7d12ddd769c5c0c14b (diff) | |
download | llvm-9a1e91b107323a82b07737d9ef2f562cd966dedb.zip llvm-9a1e91b107323a82b07737d9ef2f562cd966dedb.tar.gz llvm-9a1e91b107323a82b07737d9ef2f562cd966dedb.tar.bz2 |
print the preds of each MBB
llvm-svn: 30606
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBasicBlock.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index 84d2657..de397d3 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -97,6 +97,14 @@ void MachineBasicBlock::print(std::ostream &OS) const { 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()); |