diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-30 10:38:55 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-30 10:38:55 +0000 |
commit | 7baffbd38d2e4687a7d7f8e5382d82c778567231 (patch) | |
tree | bd32e842f1dc6dd55db511672ed8034ae7e0f1f4 /gcc/opts.c | |
parent | b9825313eeb5bc4ec94af5e600a18acf8d0f9c3b (diff) | |
download | gcc-7baffbd38d2e4687a7d7f8e5382d82c778567231.tar.gz |
* parse.c (parse_interface): Silence uninitialized var warning.
* postreload-gcse.c (gate_handle_gcse2): Disable for functions
optimized for speed.
* final.c (compute_alignments): Use optimize_bb_for_size_p.
* tree-call-cdce.c (gate_call_cdce): Use optimize_function_for_speed_p.
* opts.c (flag_predictive_commoning_set, flag_unswitch_loops_set,
flag_gcse_after_reload_set): New static vars.
(common_handle_option): Enable those flags for profile-use.
(decode_options): Remove optimize_size flags that are handled
on higher granuality.
* tree-vectorizer.c (vectorize_loops): Use
optimize_loop_nest_for_speed_p.
* tree-ssa-pre.c (do_pre): Use optimize_function_for_speed_p.
* tree-predcom.c (tree_predictive_commoning): Use
optimize_loop_for_speed_p.
* varasm.c (assemble_start_function): Use optimize_function_for_speed_p.
* bb-reorder.c (rest_of_handle_reorder_blocks): Likewise.
* predict.c (optimize_loop_for_speed_p): Fix walk.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139801 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/opts.c')
-rw-r--r-- | gcc/opts.c | 46 |
1 files changed, 19 insertions, 27 deletions
diff --git a/gcc/opts.c b/gcc/opts.c index fbe67569c2d..621f6b3fff3 100644 --- a/gcc/opts.c +++ b/gcc/opts.c @@ -348,6 +348,7 @@ static bool flag_unroll_loops_set, flag_tracer_set; static bool flag_value_profile_transformations_set; static bool flag_peel_loops_set, flag_branch_probabilities_set; static bool flag_inline_functions_set, flag_ipa_cp_set, flag_ipa_cp_clone_set; +static bool flag_predictive_commoning_set, flag_unswitch_loops_set, flag_gcse_after_reload_set; /* Functions excluded from profiling. */ @@ -993,37 +994,10 @@ decode_options (unsigned int argc, const char **argv) if (optimize_size) { - /* Conditional DCE generates bigger code. */ - flag_tree_builtin_call_dce = 0; - - /* PRE tends to generate bigger code. */ - flag_tree_pre = 0; - - /* These options are set with -O3, so reset for -Os */ - flag_predictive_commoning = 0; - flag_gcse_after_reload = 0; - flag_tree_vectorize = 0; - - /* Don't reorder blocks when optimizing for size because extra jump insns may - be created; also barrier may create extra padding. - - More correctly we should have a block reordering mode that tried to - minimize the combined size of all the jumps. This would more or less - automatically remove extra jumps, but would also try to use more short - jumps instead of long jumps. */ - flag_reorder_blocks = 0; - flag_reorder_blocks_and_partition = 0; - /* Inlining of functions reducing size is a good idea regardless of them being declared inline. */ flag_inline_functions = 1; - /* Don't align code. */ - align_loops = 1; - align_jumps = 1; - align_labels = 1; - align_functions = 1; - /* Basic optimization options. */ optimize_size = 1; if (optimize > 2) @@ -1839,6 +1813,12 @@ common_handle_option (size_t scode, const char *arg, int value, if (!flag_ipa_cp_clone_set && value && flag_ipa_cp) flag_ipa_cp_clone = value; + if (!flag_predictive_commoning_set) + flag_predictive_commoning = value; + if (!flag_unswitch_loops_set) + flag_unswitch_loops = value; + if (!flag_gcse_after_reload_set) + flag_gcse_after_reload = value; break; case OPT_fprofile_generate_: @@ -2004,6 +1984,18 @@ common_handle_option (size_t scode, const char *arg, int value, flag_ipa_cp_clone_set = true; break; + case OPT_fpredictive_commoning: + flag_predictive_commoning_set = true; + break; + + case OPT_funswitch_loops: + flag_unswitch_loops_set = true; + break; + + case OPT_fgcse_after_reload: + flag_gcse_after_reload_set = true; + break; + case OPT_funroll_loops: flag_unroll_loops_set = true; break; |