xtensa: report stack usage
authorMax Filippov <jcmvbkbc@gmail.com>
Fri, 26 Aug 2016 17:23:37 +0000 (17:23 +0000)
committerMax Filippov <jcmvbkbc@gcc.gnu.org>
Fri, 26 Aug 2016 17:23:37 +0000 (17:23 +0000)
This enables options -fstack-usage and -Wstack-usage.

2016-08-26  Max Filippov  <jcmvbkbc@gmail.com>
gcc/
* config/xtensa/xtensa.c (xtensa_expand_prologue): Update
current_function_static_stack_size variable with the static
stack frame size of the current function when
flag_stack_usage_info is enabled.

From-SVN: r239785

gcc/ChangeLog
gcc/config/xtensa/xtensa.c

index 72dc183738dbe5b78b4c0f5b18113be380d5eae1..b229c4a129d4b60d2f432805d88417b7376e3ed8 100644 (file)
@@ -1,3 +1,10 @@
+2016-08-26  Max Filippov  <jcmvbkbc@gmail.com>
+
+       * config/xtensa/xtensa.c (xtensa_expand_prologue): Update
+       current_function_static_stack_size variable with the static
+       stack frame size of the current function when
+       flag_stack_usage_info is enabled.
+
 2016-08-26  Nathan Sidwell  <nathan@acm.org>
 
        * ipa-inline-analysis.c (inline_write_summary): Remove unnecessary
index 64d089bdfb0d2623393ec2b889327206794073c4..917ea94840f702c1cb2d3b180c949b15278f716a 100644 (file)
@@ -2678,6 +2678,9 @@ xtensa_expand_prologue (void)
 
   total_size = compute_frame_size (get_frame_size ());
 
+  if (flag_stack_usage_info)
+    current_function_static_stack_size = total_size;
+
   if (TARGET_WINDOWED_ABI)
     {
       if (total_size < (1 << (12+3)))