[PATCH] D156113: [CodeGen] Store call frame size in MachineBasicBlock

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 24 05:50:44 PDT 2023


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineVerifier.cpp:3405
+             MBB);
+      errs() << "Call frame size on entry " << MBB->getCallFrameSize()
+             << " does not match value computed from predecessor "
----------------
Separate err from the report seems weird but it seems that's what all this code is already doing


================
Comment at: llvm/lib/CodeGen/MachineVerifier.cpp:3407
+             << " does not match value computed from predecessor "
+             << -BBState.EntryValue << "\n";
+    }
----------------
single quotes


================
Comment at: llvm/lib/CodeGen/PrologEpilogInserter.cpp:391-394
+    // We can't track the call frame size after call frame pseudos have been
+    // eliminated. Set it to zero everywhere to keep MachineVerifier happy.
+    for (MachineBasicBlock &MBB : MF)
+      MBB.setCallFrameSize(0);
----------------
Should the pseudo elimination itself take care of this?


================
Comment at: llvm/lib/CodeGen/TargetInstrInfo.cpp:1467
+  // block.
+  return MBB->getCallFrameSize();
+}
----------------
I'd assume this would be a compute this to set this situation, not a try to compute and fallback to precomputed?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D156113



More information about the llvm-commits mailing list