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 | 380ae495996c84f348d12224ea9f4514f6471f59 (patch) | |
tree | 492cc211de8c97fcbed85a9646b4efb5fae42d78 /lib/CodeGen/MachineBasicBlock.cpp | |
parent | a7e11a4bb5a432ba94421655f7ebc63d2acebd1a (diff) |
print the machine CFG in the -print-machineinstrs dump
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20976 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r-- | lib/CodeGen/MachineBasicBlock.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineBasicBlock.cpp b/lib/CodeGen/MachineBasicBlock.cpp index 6774dde9ab..695ba13a49 100644 --- a/lib/CodeGen/MachineBasicBlock.cpp +++ b/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) { |