[PATCH] D135488: [codegen][WIP] Display stack layouts in console

Paul Kirth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 7 14:26:49 PDT 2022


paulkirth created this revision.
Herald added subscribers: mgrang, hiraditya.
Herald added a project: All.
paulkirth requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.

Issue #58168 describes the difficulty diagnosing stack size issues
identified by -Wframe-larger-than. For simple code, its easy to
understand the stack layout, and where space is being allocated, but in
more complex programs, where code may be heavily inlined, unrolled, and
have duplicated code paths it is no longer easy to manually inspect the
source program, and understand where stack space can be attributed.

This patch is a very basic prototype that dumps an ASCI representation
of stack slots, and also prints any available debug information to map
source variables to those slots.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D135488

Files:
  clang/test/Frontend/frame-diags.c
  llvm/include/llvm/CodeGen/MachineFrameInfo.h
  llvm/lib/CodeGen/MachineFrameInfo.cpp
  llvm/lib/CodeGen/PrologEpilogInserter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135488.466180.patch
Type: text/x-patch
Size: 7230 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221007/b5b6bfaf/attachment.bin>


More information about the cfe-commits mailing list