[llvm] r322088 - [CodeGen] Print frame-setup/destroy flags in -debug output like we do in MIR
Francis Visoiu Mistrih via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 9 08:11:52 PST 2018
Author: thegameg
Date: Tue Jan 9 08:11:51 2018
New Revision: 322088
URL: http://llvm.org/viewvc/llvm-project?rev=322088&view=rev
Log:
[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
Modified:
llvm/trunk/lib/CodeGen/MachineInstr.cpp
llvm/trunk/test/CodeGen/AArch64/arm64-csldst-mmo.ll
Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=322088&r1=322087&r2=322088&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Tue Jan 9 08:11:51 2018
@@ -1265,6 +1265,11 @@ void MachineInstr::print(raw_ostream &OS
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
}
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 << ";";
Modified: llvm/trunk/test/CodeGen/AArch64/arm64-csldst-mmo.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AArch64/arm64-csldst-mmo.ll?rev=322088&r1=322087&r2=322088&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/AArch64/arm64-csldst-mmo.ll (original)
+++ llvm/trunk/test/CodeGen/AArch64/arm64-csldst-mmo.ll Tue Jan 9 08:11:51 2018
@@ -11,7 +11,7 @@
; CHECK: Before post-MI-sched:
; CHECK-LABEL: # Machine code for function test1:
; CHECK: SU(2): STRWui %wzr
-; CHECK: SU(3): %x21, %x20 = LDPXi %sp, 2; flags: FrameDestroy
+; CHECK: SU(3): %x21, %x20 = frame-destroy LDPXi %sp, 2
; CHECK: Predecessors:
; CHECK-NEXT: SU(0): Out
; CHECK-NEXT: SU(0): Out
More information about the llvm-commits
mailing list