diff options
author | madhur13490 <Madhur.Amilkanthwar@amd.com> | 2020-06-27 18:36:25 +0000 |
---|---|---|
committer | madhur13490 <Madhur.Amilkanthwar@amd.com> | 2020-06-28 11:43:33 +0000 |
commit | c73966c2f79290e4eefe6e481f7bc94dd6ca4437 (patch) | |
tree | ef67c67b991d4968787d787ff76c633382edd3d4 /llvm/lib/CodeGen/MachineFrameInfo.cpp | |
parent | c7bcd431d9c4bfeb631a3599f1d628603e6351d6 (diff) | |
download | llvm-c73966c2f79290e4eefe6e481f7bc94dd6ca4437.zip llvm-c73966c2f79290e4eefe6e481f7bc94dd6ca4437.tar.gz llvm-c73966c2f79290e4eefe6e481f7bc94dd6ca4437.tar.bz2 |
Improve stack object printing. NFC.
Reviewers: madhur13490
Reviewed By: madhur13490
Subscribers: qcolombet, arsenm, jvesely, nhaehnle, hiraditya, kerbowa, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82712
Diffstat (limited to 'llvm/lib/CodeGen/MachineFrameInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineFrameInfo.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/MachineFrameInfo.cpp b/llvm/lib/CodeGen/MachineFrameInfo.cpp index 7ba27ff..a0e706b 100644 --- a/llvm/lib/CodeGen/MachineFrameInfo.cpp +++ b/llvm/lib/CodeGen/MachineFrameInfo.cpp @@ -210,11 +210,16 @@ void MachineFrameInfo::computeMaxCallFrameSize(const MachineFunction &MF) { } void MachineFrameInfo::print(const MachineFunction &MF, raw_ostream &OS) const{ - if (Objects.empty()) return; - + OS << "MF name: " << MF.getName() << "\n"; + if (Objects.empty()) { + OS << "No stack objects.\n"; + return; + } const TargetFrameLowering *FI = MF.getSubtarget().getFrameLowering(); int ValOffset = (FI ? FI->getOffsetOfLocalArea() : 0); + OS << "NumFixedObjects=" << static_cast<unsigned>(NumFixedObjects) << "\n"; + OS << "Frame Objects:\n"; for (unsigned i = 0, e = Objects.size(); i != e; ++i) { @@ -222,12 +227,13 @@ void MachineFrameInfo::print(const MachineFunction &MF, raw_ostream &OS) const{ OS << " fi#" << (int)(i-NumFixedObjects) << ": "; if (SO.StackID != 0) - OS << "id=" << static_cast<unsigned>(SO.StackID) << ' '; + OS << "stackid=" << static_cast<unsigned>(SO.StackID) << ", "; if (SO.Size == ~0ULL) { OS << "dead\n"; continue; } + OS << "isSplitSplot=" << static_cast<bool>(SO.isSpillSlot) << ", "; if (SO.Size == 0) OS << "variable sized"; else @@ -235,7 +241,7 @@ void MachineFrameInfo::print(const MachineFunction &MF, raw_ostream &OS) const{ OS << ", align=" << SO.Alignment.value(); if (i < NumFixedObjects) - OS << ", fixed"; + OS << ", fixed objects:"; if (i < NumFixedObjects || SO.SPOffset != -1) { int64_t Off = SO.SPOffset - ValOffset; OS << ", at location [SP"; |