Print out MachineBasicBlock successor weights when available.

llvm-svn: 161804
This commit is contained in:
Jakob Stoklund Olesen 2012-08-13 23:13:23 +00:00
parent 8d80452076
commit 1dc107a84e
1 changed files with 4 additions and 1 deletions

View File

@ -311,8 +311,11 @@ void MachineBasicBlock::print(raw_ostream &OS, SlotIndexes *Indexes) const {
if (!succ_empty()) { if (!succ_empty()) {
if (Indexes) OS << '\t'; if (Indexes) OS << '\t';
OS << " Successors according to CFG:"; OS << " Successors according to CFG:";
for (const_succ_iterator SI = succ_begin(), E = succ_end(); SI != E; ++SI) for (const_succ_iterator SI = succ_begin(), E = succ_end(); SI != E; ++SI) {
OS << " BB#" << (*SI)->getNumber(); OS << " BB#" << (*SI)->getNumber();
if (!Weights.empty())
OS << '(' << *getWeightIterator(SI) << ')';
}
OS << '\n'; OS << '\n';
} }
} }