[PATCH] D82713: Improve stack object printing.

Evandro Menezes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 30 16:18:41 PDT 2020


evandro added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineFrameInfo.cpp:213
 void MachineFrameInfo::print(const MachineFunction &MF, raw_ostream &OS) const{
-  if (Objects.empty()) return;
-
+  OS << "MF name: " << MF.getName() << "\n";
+  if (Objects.empty()) {
----------------
arsenm wrote:
> I think this should be removed
I agree.  It's redundant.


================
Comment at: llvm/lib/CodeGen/MachineFrameInfo.cpp:221
 
+  OS << "NumFixedObjects=" << static_cast<unsigned>(NumFixedObjects) << "\n";
+
----------------
s/NumFixedObjects=/Fixed objects: /


================
Comment at: llvm/lib/CodeGen/MachineFrameInfo.cpp:230
     if (SO.StackID != 0)
-      OS << "id=" << static_cast<unsigned>(SO.StackID) << ' ';
+      OS << "stackid=" << static_cast<unsigned>(SO.StackID) << ", ";
 
----------------
s/stackid=/stack id: /


================
Comment at: llvm/lib/CodeGen/MachineFrameInfo.cpp:243
     if (i < NumFixedObjects)
-      OS << ", fixed";
+      OS << ", fixed objects:";
     if (i < NumFixedObjects || SO.SPOffset != -1) {
----------------
arsenm wrote:
> Don't see how this is an improvement
Agree.


================
Comment at: llvm/lib/CodeGen/MachineFrameInfo.cpp:253
     }
+    OS << "isSplitSplot=" << static_cast<bool>(SO.isSpillSlot) << ", ";
     OS << "\n";
----------------
arsenm wrote:
> [spill] present or not maybe?
s/isSplitSplot/Spill slot: / then yes or no.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82713/new/

https://reviews.llvm.org/D82713





More information about the llvm-commits mailing list