[all-commits] [llvm/llvm-project] 2e1e2f: [CodeGen] Improve large stack frame diagnostic

Paul Kirth via All-commits all-commits at lists.llvm.org
Wed Oct 26 17:52:01 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2e1e2f52f357768186ecfcc5ac53d5fa53d1b094
      https://github.com/llvm/llvm-project/commit/2e1e2f52f357768186ecfcc5ac53d5fa53d1b094
  Author: Paul Kirth <paulkirth at google.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M llvm/lib/CodeGen/PrologEpilogInserter.cpp
    M llvm/test/CodeGen/ARM/warn-stack.ll
    M llvm/test/CodeGen/X86/warn-stack.ll

  Log Message:
  -----------
  [CodeGen] Improve large stack frame diagnostic

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 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 can
provide them with a more comprehensive set of diagnostics.

Reviewed By: nickdesaulniers

Differential Revision: https://reviews.llvm.org/D136484




More information about the All-commits mailing list