print the machine CFG in the -print-machineinstrs dump

llvm-svn: 20976
This commit is contained in:
Chris Lattner 2005-04-01 06:48:38 +00:00
parent 2095f3b06b
commit 329c14a8bc
1 changed files with 8 additions and 0 deletions

View File

@ -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) {