[llvm-dev] [RFC] Function stack size section.
Roman Lebedev via llvm-dev
llvm-dev at lists.llvm.org
Fri Sep 1 02:07:39 PDT 2017
I'm sorry if this mail is unhelpful, feel free to ignore it :)
> On 31 August 2017 at 15:09, Sean Eveson via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
>> Hi All,
>>
>>
>>
>> We have a local change in the X86AsmPrinter that outputs a section
>> containing metadata on function stack sizes. We use this to measure changes
>> to stack size between versions of the compiler and it also allows our
>> licensees to do the same for their code.
GCC has three seemingly-related diagnostics:
-Wlarger-than=len
Warn whenever an object of larger than len bytes is defined.
-Wframe-larger-than=len
Warn if the size of a function frame is larger than len bytes.
-Wstack-usage=len
Warn if the stack usage of a function might be larger than len bytes.
I *believe*, clang only implements the
-Wframe-larger-than=len
Warn if the size of a function frame is larger than len bytes.
So while possibly not directly related to the subject, it may still be
relevant...
>> The section simply contains pairs of function symbol references (8 byte) and
>> stack sizes (unsigned LEB128).
>>
>>
>>
>> We would like to upstream this change as a PS4 only modification, or as a
>> more general cross platform one.
>>
>>
>>
>> Would people be interested in (or happy with) such a patch, target specific
>> or otherwise?
>>
>>
>>
>> Thanks,
>>
>>
>> Sean Eveson
>> SN Systems - Sony Interactive Entertainment
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> llvm-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Roman.
More information about the llvm-dev
mailing list