diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-24 00:54:26 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-24 00:54:26 +0000 |
commit | 9faf44d607eac99a28edbec0beea479c3417ffe4 (patch) | |
tree | 083c8faf230cd5683309b75bc0500baa489ad7cc /gcc/opts-global.c | |
parent | 7939616918aae0c21c6b6e415cbae13f7db1a1ae (diff) | |
download | gcc-9faf44d607eac99a28edbec0beea479c3417ffe4.tar.gz |
* common.opt (initial_max_fld_align, flag_debug_asm,
flag_dump_rtl_in_asm, flag_dump_all_passed, rtl_dump_and_exit,
flag_print_asm_name, graph_dump_format, help_printed,
help_columns, flag_opts_finished): New Variable entries.
(fdbg-cnt-list, fdbg-cnt=, fdebug-prefix-map=, frandom-seed,
frandom-seed=): Mark deferred.
(fsched-verbose=): Use UInteger and Var.
* flags.h (set_struct_debug_option, flag_print_asm_name,
rtl_dump_and_exit, flag_debug_asm, flag_dump_rtl_in_asm,
graph_dump_format): Don't declare here.
* haifa-sched.c (sched_verbose_param, fix_sched_param): Remove.
* opts-global.c: Include dbgcnt.h and debug.h.
(decode_options): Pass location to finish_options.
(handle_common_deferred_options): Check flag_dump_all_passed.
Handle OPT_fdbg_cnt_, OPT_fdbg_cnt_list, OPT_fdebug_prefix_map_,
OPT_frandom_seed and OPT_frandom_seed_. Don't assert on
OPT_fstack_limit.
* opts.c: Don't include toplev.h, dbgcnt.h or debug.h.
(set_struct_debug_option): Add location_t parameter. Update
recursive call. Use error_at.
(default_options_optimization): Use error_at.
(finish_options): Add location_t parameter. Use
opts->x_flag_opts_finished instead of first_time_p. Use
opts->x_optimize instead of optimize. Use error_at. Pass
location to inform.
(print_filtered_help): Use opts->x_help_printed to track what
options have been printed.
(print_specific_help): Use opts->x_help_columns to track number of
columns.
(common_handle_option): Pass locations and gcc_options pointers to
more functions. Use warning_at instead of fnotice and warning.
Don't handle OPT_fdbg_cnt_, OPT_fdbg_cnt_list or
OPT_fdebug_prefix_map_. Use error_at. Set
opts->x_initial_max_fld_align; don't set maximum_field_alignment.
Don't handle OPT_frandom_seed or OPT_frandom_seed_. Don't handle
OPT_fsched_verbose_.
(handle_param): Add location_r parameter. Use error_at.
(set_debug_level): Add location_r parameter. Use error_at and
warning_at.
(setup_core_dumping): Add diagnostic_context parameter.
(decode_d_option): Add gcc_options, location_t and
diagnostic_context parameters and use them instead of global
state. Use warning_at.
(enable_warning_as_error): Use error_at.
* opts.h (finish_options): Update prototype.
(set_struct_debug_option): Declare here.
* rtl.h (fix_sched_param): Remove.
* stor-layout.c (initial_max_fld_align): Remove.
* toplev.c (rtl_dump_and_exit, flag_print_asm_name,
graph_dump_format, flag_debug_asm, flag_dump_rtl_in_asm): Remove.
(process_options): Set maximum_field_alignment.
* tree.h (initial_max_fld_align) Don't declare here.
* Makefile.in (opts.o, opts-global.o): Update dependencies.
c-family:
* c-opts.c (c_common_handle_option): Pass location to
set_struct_debug_option.
testsuite:
* gcc.dg/opts-5.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167106 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/opts-global.c')
-rw-r--r-- | gcc/opts-global.c | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/gcc/opts-global.c b/gcc/opts-global.c index 3ed562d465f..dc462ec354f 100644 --- a/gcc/opts-global.c +++ b/gcc/opts-global.c @@ -30,6 +30,8 @@ along with GCC; see the file COPYING3. If not see #include "langhooks.h" #include "tm.h" /* Required by rtl.h. */ #include "rtl.h" +#include "dbgcnt.h" +#include "debug.h" #include "lto-streamer.h" #include "output.h" #include "plugin.h" @@ -326,7 +328,7 @@ decode_options (struct gcc_options *opts, struct gcc_options *opts_set, loc, lang_mask, &handlers, dc); - finish_options (opts, opts_set); + finish_options (opts, opts_set, loc); } /* Process common options that have been deferred until after the @@ -340,6 +342,9 @@ handle_common_deferred_options (void) VEC(cl_deferred_option,heap) *vec = (VEC(cl_deferred_option,heap) *) common_deferred_options; + if (flag_dump_all_passed) + enable_rtl_dump_file (); + FOR_EACH_VEC_ELT (cl_deferred_option, vec, i, opt) { switch (opt->opt_index) @@ -352,6 +357,18 @@ handle_common_deferred_options (void) fix_register (opt->arg, 0, 0); break; + case OPT_fdbg_cnt_: + dbg_cnt_process_opt (opt->arg); + break; + + case OPT_fdbg_cnt_list: + dbg_cnt_list_all_counters (); + break; + + case OPT_fdebug_prefix_map_: + add_debug_prefix_map (opt->arg); + break; + case OPT_fdump_: if (!dump_switch_p (opt->arg)) error ("unrecognized command line option %<-fdump-%s%>", opt->arg); @@ -378,10 +395,20 @@ handle_common_deferred_options (void) #endif break; + case OPT_frandom_seed: + /* The real switch is -fno-random-seed. */ + if (!opt->value) + set_random_seed (NULL); + break; + + case OPT_frandom_seed_: + set_random_seed (opt->arg); + break; + case OPT_fstack_limit: /* The real switch is -fno-stack-limit. */ - gcc_assert (!opt->value); - stack_limit_rtx = NULL_RTX; + if (!opt->value) + stack_limit_rtx = NULL_RTX; break; case OPT_fstack_limit_register_: |