projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a53115b
)
print the preds of each MBB
author
Chris Lattner
<sabre@nondot.org>
Tue, 26 Sep 2006 03:41:59 +0000
(
03:41
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Tue, 26 Sep 2006 03:41:59 +0000
(
03:41
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30606
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/MachineBasicBlock.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/MachineBasicBlock.cpp
b/lib/CodeGen/MachineBasicBlock.cpp
index 84d2657891b1dd245936c02882f1666d0e200a7c..de397d385761cb1bfa3922714428dac9a6d2f6b1 100644
(file)
--- a/
lib/CodeGen/MachineBasicBlock.cpp
+++ b/
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());