From 72cc21eefed96c8b15d7ca53a889a76ca9670731 Mon Sep 17 00:00:00 2001 From: Francis Visoiu Mistrih Date: Tue, 9 Jan 2018 16:11:51 +0000 Subject: [CodeGen] Print frame-setup/destroy flags in -debug output like we do in MIR Currently the MachineInstr::print function prints the frame-setup/frame-destroy differently than it does in MIR. Instead of: %x21 = LDR %sp, -16; flags: FrameDestroy print: %x21 = frame-destroy LDR %sp, -16 llvm-svn: 322088 --- llvm/lib/CodeGen/MachineInstr.cpp | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'llvm/lib/CodeGen/MachineInstr.cpp') diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index 6929c16b5..9e410b2 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/lib/CodeGen/MachineInstr.cpp @@ -1265,6 +1265,11 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST, if (StartOp != 0) OS << " = "; + if (getFlag(MachineInstr::FrameSetup)) + OS << "frame-setup "; + else if (getFlag(MachineInstr::FrameDestroy)) + OS << "frame-destroy "; + // Print the opcode name. if (TII) OS << TII->getName(getOpcode()); @@ -1406,21 +1411,6 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST, } bool HaveSemi = false; - const unsigned PrintableFlags = FrameSetup | FrameDestroy; - if (Flags & PrintableFlags) { - if (!HaveSemi) { - OS << ";"; - HaveSemi = true; - } - OS << " flags: "; - - if (Flags & FrameSetup) - OS << "FrameSetup"; - - if (Flags & FrameDestroy) - OS << "FrameDestroy"; - } - if (!memoperands_empty()) { if (!HaveSemi) { OS << ";"; -- cgit v1.1