[PATCH] D39788: [MC] Function stack size section.
Sean Eveson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 8 03:27:16 PST 2017
seaneveson created this revision.
Original RFC: http://lists.llvm.org/pipermail/llvm-dev/2017-August/117028.html
I wasn't sure who to put as reviewers, so please add/remove people as appropriate.
This change adds a '.stack-size' section containing metadata on function stack sizes to output ELF files behind the new -stack-size-section flag. The section contains pairs of function symbol references (8 byte) and stack sizes (unsigned LEB128).
The contents of this section can be used to measure changes to stack sizes between different versions of the compiler or a source base. The advantage of having a section is that we can extract this information when examining binaries that we didn't build, and it allows users and tools easy access to that information just by referencing the binary.
There is a follow up change to add an option to clang.
Thanks.
https://reviews.llvm.org/D39788
Files:
include/llvm/CodeGen/AsmPrinter.h
include/llvm/CodeGen/CommandFlags.h
include/llvm/MC/MCObjectFileInfo.h
include/llvm/Target/TargetOptions.h
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/MC/MCObjectFileInfo.cpp
test/CodeGen/X86/stack-size-section.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39788.122048.patch
Type: text/x-patch
Size: 6116 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171108/7c190c01/attachment.bin>
More information about the llvm-commits
mailing list