summaryrefslogtreecommitdiff
path: root/gcc/opts.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2011-05-25 11:00:14 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2011-05-25 11:00:14 +0000
commita11e0df4da7c987c9627724748fe727183e9379f (patch)
tree8f263f60484dabe77a13c389e9ce210b121dbc56 /gcc/opts.c
parente7cfe2413fe50e22eb2c013415cec9e154d3c391 (diff)
downloadgcc-a11e0df4da7c987c9627724748fe727183e9379f.tar.gz
common.opt (flag_stack_usage_info): New variable.
* common.opt (flag_stack_usage_info): New variable. (-Wstack-usage): New option. * doc/invoke.texi (Warning options): Document -Wstack-usage. * opts.c (common_handle_option) <OPT_Wstack_usage_>: New case. <OPT_fstack_usage>: Likewise. * toplev.c (output_stack_usage): Handle -Wstack-usage. * calls.c (expand_call): Test flag_stack_usage_info variable instead of flag_stack_usage. (emit_library_call_value_1): Likewise. * explow.c (allocate_dynamic_stack_space): Likewise. * function.c (instantiate_virtual_regs ): Likewise. (prepare_function_start): Likewise. (rest_of_handle_thread_prologue_and_epilogue): Likewise. * config/alpha/alpha.c (alpha_expand_prologue): Likewise. * config/arm/arm.c (arm_expand_prologue): Likewise. (thumb1_expand_prologue): Likewise. * config/avr/avr.c (expand_prologue): Likewise. * config/i386/i386.c (ix86_expand_prologue): Likewise. * config/ia64/ia64.c (ia64_expand_prologue): Likewise. * config/m68k/m68k.c (m68k_expand_prologue): Likewise. * config/mips/mips.c (mips_expand_prologue): Likewise. * config/pa/pa.c (hppa_expand_prologue): Likewise. * config/rs6000/rs6000.c (rs6000_emit_prologue): Likewise. * config/s390/s390.c (s390_emit_prologue): Likewise. * config/sh/sh.c (sh_expand_prologue): Likewise. * config/sparc/sparc.c (sparc_expand_prologue): Likewise. * config/spu/spu.c (spu_expand_prologue): Likewise. From-SVN: r174182
Diffstat (limited to 'gcc/opts.c')
-rw-r--r--gcc/opts.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/opts.c b/gcc/opts.c
index 356f093192f..f7355576928 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -1422,6 +1422,11 @@ common_handle_option (struct gcc_options *opts,
opts->x_warn_frame_larger_than = value != -1;
break;
+ case OPT_Wstack_usage_:
+ opts->x_warn_stack_usage = value;
+ opts->x_flag_stack_usage_info = value != -1;
+ break;
+
case OPT_Wstrict_aliasing:
set_Wstrict_aliasing (opts, value);
break;
@@ -1643,6 +1648,11 @@ common_handle_option (struct gcc_options *opts,
/* Deferred. */
break;
+ case OPT_fstack_usage:
+ opts->x_flag_stack_usage = value;
+ opts->x_flag_stack_usage_info = value != 0;
+ break;
+
case OPT_ftree_vectorizer_verbose_:
vect_set_verbosity_level (opts, value);
break;