[PATCH] Internal option to warn on a given stack size.

Quentin Colombet qcolombet at apple.com
Mon Jun 3 17:23:38 PDT 2013


Hi,

Here is a patch that adds a llvm option to warn on a given stack size limit.
Option: -mllvm -warn-stack-size=<limit>
Output (if limit is exceeded): warning: Stack size limit exceeded (<actual size>) in <functionName>.

The motivation is that on some critical applications it is important to keep track of the size of the stack. Using that option one can ensure the stack is not growing beyond his expectation and if it does it gives some information on where to look.

The patch includes two target specific test cases, one for ARM and one for X86, but it should work for all targets.

Thanks for the review,

-Quentin


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130603/2768b6ec/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: warnStackSize.svndiff
Type: application/octet-stream
Size: 3337 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130603/2768b6ec/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130603/2768b6ec/attachment-0001.html>


More information about the llvm-commits mailing list