[PATCH] D82712: Improve stack object printing. NFC.
Madhur Amilkanthwar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 28 04:57:13 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGc73966c2f792: Improve stack object printing. NFC. (authored by madhur13490).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82712/new/
https://reviews.llvm.org/D82712
Files:
llvm/include/llvm/CodeGen/MachineFrameInfo.h
llvm/lib/CodeGen/MachineFrameInfo.cpp
Index: llvm/lib/CodeGen/MachineFrameInfo.cpp
===================================================================
--- llvm/lib/CodeGen/MachineFrameInfo.cpp
+++ llvm/lib/CodeGen/MachineFrameInfo.cpp
@@ -210,11 +210,16 @@
}
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 @@
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 @@
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";
Index: llvm/include/llvm/CodeGen/MachineFrameInfo.h
===================================================================
--- llvm/include/llvm/CodeGen/MachineFrameInfo.h
+++ llvm/include/llvm/CodeGen/MachineFrameInfo.h
@@ -821,7 +821,7 @@
BitVector getPristineRegs(const MachineFunction &MF) const;
/// Used by the MachineFunction printer to print information about
- /// stack objects. Implemented in MachineFunction.cpp.
+ /// stack objects.
void print(const MachineFunction &MF, raw_ostream &OS) const;
/// dump - Print the function to stderr.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82712.273923.patch
Type: text/x-patch
Size: 2075 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200628/2409c0bc/attachment-0001.bin>
More information about the llvm-commits
mailing list