[llvm-commits] [llvm] r161804 - /llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Mon Aug 13 16:13:23 PDT 2012
Author: stoklund
Date: Mon Aug 13 18:13:23 2012
New Revision: 161804
URL: http://llvm.org/viewvc/llvm-project?rev=161804&view=rev
Log:
Print out MachineBasicBlock successor weights when available.
Modified:
llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp
Modified: llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp?rev=161804&r1=161803&r2=161804&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp Mon Aug 13 18:13:23 2012
@@ -311,8 +311,11 @@
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';
}
}
More information about the llvm-commits
mailing list