[PATCH] D39788: [MC] Function stack size section.

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 15 10:51:18 PST 2017


MatzeB added a comment.

In https://reviews.llvm.org/D39788#926398, @MatzeB wrote:

> I'd defer to others to comment on the highlevel whether this is a good or helpful idea. Some comments though:
>
> - The format of the new section ought to be documented properly in the llvm docs and not just in the commit message and sourcecode.
> - I think this should report a special "unknown" value for functions with dynamic stack allocations.
> - I'm not 100% sure that MachineFrameInfo::getStackSize() captures all possible allocations; it probably corresponds to what is allocated in the prologue), however I wonder if we can have cases where callframes are not allocated as part of the prologue. Probably need a stronger wording on what "StackSize" in MachineFrameInfo means if you want to output it to the user in this form.


To spin this more positively: There seems to be interest for the feature, the code changes appear minimal so maintenance shouldn't be too bad. So I wouldn't object going ahead with this.

However we have to be very careful in managing expectations here! I would expect this to need several iterations, bugfixes and testing/fuzzing until I would trust this information in all cases. Nothing is stopping targets from emitting stack pointer modifying code without recording information in MachineFrameInfo.


https://reviews.llvm.org/D39788





More information about the llvm-commits mailing list