[PATCH] D136484: [CodeGen] Improve large stack frame diagnostic

Paul Kirth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 21 12:49:35 PDT 2022


paulkirth created this revision.
paulkirth added reviewers: nickdesaulniers, phosek, probinson.
Herald added subscribers: pengfei, hiraditya.
Herald added a project: All.
paulkirth requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Add statistics about how much memory is used, in variables, spills, and
unsafestack.

Issue #58168 describes some of the difficulty diagnosing stack size issues
identified by -Wframe-larger-than. D135488 <https://reviews.llvm.org/D135488> addresses some of those issues by
giving developers a method to view the stack layout and thereby understand
where and how stack memory is used.

However, that solution requires an additional pass, when a short summary about
how the compiler has allocated stack memory can inform developers about where
they should investigate. When they need the complete context, D135488 <https://reviews.llvm.org/D135488> can
provide them with a more comprehensive set of diagnostics.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D136484

Files:
  llvm/lib/CodeGen/PrologEpilogInserter.cpp
  llvm/test/CodeGen/ARM/warn-stack.ll
  llvm/test/CodeGen/X86/warn-stack.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136484.469722.patch
Type: text/x-patch
Size: 5250 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221021/1a7eb43a/attachment.bin>


More information about the llvm-commits mailing list