diff options
author | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2018-01-09 16:11:51 +0000 |
---|---|---|
committer | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2018-01-09 16:11:51 +0000 |
commit | 72cc21eefed96c8b15d7ca53a889a76ca9670731 (patch) | |
tree | 5b1a19f9ef59ce36dfb5b2b9776dbe1697de1870 /llvm/lib/CodeGen/MachineInstr.cpp | |
parent | 37e28e40cbec436532bd60e7d00c4d1caea9edca (diff) | |
download | bcm5719-llvm-72cc21eefed96c8b15d7ca53a889a76ca9670731.tar.gz bcm5719-llvm-72cc21eefed96c8b15d7ca53a889a76ca9670731.zip |
[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
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineInstr.cpp | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index 6929c16b52d..9e410b28dcb 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 << ";"; |