diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-08-13 23:13:23 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-08-13 23:13:23 +0000 |
commit | cb6889b23d7bdac292e0203bcca19e82b2e17875 (patch) | |
tree | a2cd36988912cb3c082cdd58afb347517985d79e /lib/CodeGen | |
parent | 7b6783a03f16376e8e2d0d9791f090ef32727c8f (diff) | |
download | external_llvm-cb6889b23d7bdac292e0203bcca19e82b2e17875.zip external_llvm-cb6889b23d7bdac292e0203bcca19e82b2e17875.tar.gz external_llvm-cb6889b23d7bdac292e0203bcca19e82b2e17875.tar.bz2 |
Print out MachineBasicBlock successor weights when available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161804 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/MachineBasicBlock.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/MachineBasicBlock.cpp b/lib/CodeGen/MachineBasicBlock.cpp index fd4cb5f..8bf0cc9 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'; } } |