mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 19:12:56 +02:00
[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
This commit is contained in:
parent
e515369ba1
commit
5b1cb469f1
@ -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 << ";";
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user