aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>2018-02-26 15:23:42 +0000
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>2018-02-26 15:23:42 +0000
commite4fae4d5b6ca4a10d060d9a0df14dcfdf4b8b63e (patch)
tree160d72c59934215ab3eb098ffa914e4853e97406 /llvm/lib/CodeGen/MachineBasicBlock.cpp
parent98fcd2eb27f82638ad1c2da0b50b6be107990bbc (diff)
downloadllvm-e4fae4d5b6ca4a10d060d9a0df14dcfdf4b8b63e.zip
llvm-e4fae4d5b6ca4a10d060d9a0df14dcfdf4b8b63e.tar.gz
llvm-e4fae4d5b6ca4a10d060d9a0df14dcfdf4b8b63e.tar.bz2
[CodeGen] Don't omit any redundant information in -debug output
In r322867, we introduced IsStandalone when printing MIR in -debug output. The default behaviour for that was: 1) If any of MBB, MI, or MO are -debug-printed separately, don't omit any redundant information. 2) When -debug-printing a MF entirely, don't print any redundant information. 3) When printing MIR, don't print any redundant information. I'd like to change 2) to: 2) When -debug-printing a MF entirely, don't omit any redundant information. Differential Revision: https://reviews.llvm.org/D43337 llvm-svn: 326094
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineBasicBlock.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp
index cf58c33..8fef85f 100644
--- a/llvm/lib/CodeGen/MachineBasicBlock.cpp
+++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp
@@ -328,7 +328,7 @@ void MachineBasicBlock::print(raw_ostream &OS, ModuleSlotTracker &MST,
bool HasLineAttributes = false;
// Print the preds of this block according to the CFG.
- if (!pred_empty()) {
+ if (!pred_empty() && IsStandalone) {
if (Indexes) OS << '\t';
// Don't indent(2), align with previous line attributes.
OS << "; predecessors: ";
@@ -354,7 +354,7 @@ void MachineBasicBlock::print(raw_ostream &OS, ModuleSlotTracker &MST,
<< format("0x%08" PRIx32, getSuccProbability(I).getNumerator())
<< ')';
}
- if (!Probs.empty()) {
+ if (!Probs.empty() && IsStandalone) {
// Print human readable probabilities as comments.
OS << "; ";
for (auto I = succ_begin(), E = succ_end(); I != E; ++I) {
@@ -419,7 +419,7 @@ void MachineBasicBlock::print(raw_ostream &OS, ModuleSlotTracker &MST,
if (IsInBundle)
OS.indent(2) << "}\n";
- if (IrrLoopHeaderWeight) {
+ if (IrrLoopHeaderWeight && IsStandalone) {
if (Indexes) OS << '\t';
OS.indent(2) << "; Irreducible loop header weight: "
<< IrrLoopHeaderWeight.getValue() << '\n';