diff options
author | Chris Lattner <sabre@nondot.org> | 2005-04-01 06:48:38 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-04-01 06:48:38 +0000 |
commit | 329c14a8bce9249b2da6d5203d4762cf343834bf (patch) | |
tree | efe388e185aabb52335b9038db2eb868e542daf0 /llvm/lib/CodeGen/MachineBasicBlock.cpp | |
parent | 2095f3b06bc44dc38998a406b984566fc0fcf3af (diff) | |
download | bcm5719-llvm-329c14a8bce9249b2da6d5203d4762cf343834bf.tar.gz bcm5719-llvm-329c14a8bce9249b2da6d5203d4762cf343834bf.zip |
print the machine CFG in the -print-machineinstrs dump
llvm-svn: 20976
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 6774dde9ab3..695ba13a49d 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -100,6 +100,14 @@ void MachineBasicBlock::print(std::ostream &OS) const { OS << "\t"; I->print(OS, &getParent()->getTarget()); } + + // Print the successors of this block according to the CFG. + if (!succ_empty()) { + OS << " Successors according to CFG:"; + for (const_succ_iterator SI = succ_begin(), E = succ_end(); SI != E; ++SI) + OS << " " << *SI; + OS << "\n"; + } } void MachineBasicBlock::addSuccessor(MachineBasicBlock *succ) { |