diff options
author | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2018-02-15 16:23:59 +0000 |
---|---|---|
committer | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2018-02-15 16:23:59 +0000 |
commit | 3fbbdf3144b9bd202564dcab5c96ca6b5c91e296 (patch) | |
tree | aa83d1e0a547d721b30809e0dcaa2ad5cb0ae020 /llvm/lib/CodeGen/MachineBasicBlock.cpp | |
parent | bf472fde57b5086c11aa49eaf4fc47ce37c5eb66 (diff) | |
download | bcm5719-llvm-3fbbdf3144b9bd202564dcab5c96ca6b5c91e296.tar.gz bcm5719-llvm-3fbbdf3144b9bd202564dcab5c96ca6b5c91e296.zip |
[CodeGen] Separate MBB metadata from instructions in -debug printing
Add an empty line after 'liveins:', 'successors:', or '; predecessors:',
the one that ends up to be the last one.
llvm-svn: 325258
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) { |