From: Jakob Stoklund Olesen Date: Mon, 13 Aug 2012 23:13:23 +0000 (+0000) Subject: Print out MachineBasicBlock successor weights when available. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cb6889b23d7bdac292e0203bcca19e82b2e17875;p=oota-llvm.git Print out MachineBasicBlock successor weights when available. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161804 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/MachineBasicBlock.cpp b/lib/CodeGen/MachineBasicBlock.cpp index fd4cb5fab0b..8bf0cc96565 100644 --- a/lib/CodeGen/MachineBasicBlock.cpp +++ b/lib/CodeGen/MachineBasicBlock.cpp @@ -311,8 +311,11 @@ void MachineBasicBlock::print(raw_ostream &OS, SlotIndexes *Indexes) const { if (!succ_empty()) { if (Indexes) OS << '\t'; 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(); + if (!Weights.empty()) + OS << '(' << *getWeightIterator(SI) << ')'; + } OS << '\n'; } }