HomePhabricator

Support GCC's -fstack-usage flag

Authored by pzheng on Apr 14 2021, 1:54 PM.

Description

Support GCC's -fstack-usage flag

This patch adds support for GCC's -fstack-usage flag. With this flag, a stack
usage file (i.e., .su file) is generated for each input source file. The format
of the stack usage file is also similar to what is used by GCC. For each
function defined in the source file, a line with the following information is
produced in the .su file.

<source_file>:<line_number>:<function_name> <size_in_byte> <static/dynamic>

"Static" means that the function's frame size is static and the size info is an
accurate reflection of the frame size. While "dynamic" means the function's
frame size can only be determined at run-time because the function manipulates
the stack dynamically (e.g., due to variable size objects). The size info only
reflects the size of the fixed size frame objects in this case and therefore is
not a reliable measure of the total frame size.

Reviewed By: MaskRay

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

Details

Committed
pzhengMay 15 2021, 10:22 AM
Reviewer
MaskRay
Differential Revision
D100509: Support GCC's -fstack-usage flag
Parents
rGc012a388a15b: Revert "[X86][SSE] Pull out combineToHorizontalAddSub helper from inside…
Branches
Unknown
Tags
Unknown