diff options
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBasicBlock.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index fca93d82d00..ef9154f6edb 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -325,6 +325,7 @@ void MachineBasicBlock::print(raw_ostream &OS, ModuleSlotTracker &MST, const TargetRegisterInfo *TRI = MF->getSubtarget().getRegisterInfo(); const MachineRegisterInfo &MRI = MF->getRegInfo(); const TargetInstrInfo &TII = *getParent()->getSubtarget().getInstrInfo(); + bool HasLineAttributes = false; // Print the preds of this block according to the CFG. if (!pred_empty()) { @@ -337,6 +338,7 @@ void MachineBasicBlock::print(raw_ostream &OS, ModuleSlotTracker &MST, OS << printMBBReference(**I); } OS << '\n'; + HasLineAttributes = true; } if (!succ_empty()) { @@ -366,8 +368,10 @@ void MachineBasicBlock::print(raw_ostream &OS, ModuleSlotTracker &MST, 100.0) << ')'; } - OS << '\n'; } + + OS << '\n'; + HasLineAttributes = true; } if (!livein_empty() && MRI.tracksLiveness()) { @@ -384,8 +388,12 @@ void MachineBasicBlock::print(raw_ostream &OS, ModuleSlotTracker &MST, OS << ":0x" << PrintLaneMask(LI.LaneMask); } OS << '\n'; + HasLineAttributes = true; } + if (HasLineAttributes) + OS << '\n'; + bool IsInBundle = false; for (const MachineInstr &MI : instrs()) { if (Indexes) { |