diff options
Diffstat (limited to 'gcc/opts.cc')
-rw-r--r-- | gcc/opts.cc | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/gcc/opts.cc b/gcc/opts.cc index a9b9b91..6ca1ec7 100644 --- a/gcc/opts.cc +++ b/gcc/opts.cc @@ -2080,10 +2080,13 @@ print_specific_help (unsigned int include_flags, static void enable_fdo_optimizations (struct gcc_options *opts, struct gcc_options *opts_set, - int value) + int value, bool autofdo) { - SET_OPTION_IF_UNSET (opts, opts_set, flag_branch_probabilities, value); - SET_OPTION_IF_UNSET (opts, opts_set, flag_profile_values, value); + if (!autofdo) + { + SET_OPTION_IF_UNSET (opts, opts_set, flag_branch_probabilities, value); + SET_OPTION_IF_UNSET (opts, opts_set, flag_profile_values, value); + } SET_OPTION_IF_UNSET (opts, opts_set, flag_unroll_loops, value); SET_OPTION_IF_UNSET (opts, opts_set, flag_peel_loops, value); SET_OPTION_IF_UNSET (opts, opts_set, flag_tracer, value); @@ -2872,7 +2875,7 @@ common_handle_option (struct gcc_options *opts, break; case OPT_Wfatal_errors: - dc->m_fatal_errors = value; + dc->set_fatal_errors (value); break; case OPT_Wstack_usage_: @@ -3124,7 +3127,7 @@ common_handle_option (struct gcc_options *opts, /* No break here - do -fprofile-use processing. */ /* FALLTHRU */ case OPT_fprofile_use: - enable_fdo_optimizations (opts, opts_set, value); + enable_fdo_optimizations (opts, opts_set, value, false); SET_OPTION_IF_UNSET (opts, opts_set, flag_profile_reorder_functions, value); /* Indirect call profiling should do all useful transformations @@ -3141,7 +3144,7 @@ common_handle_option (struct gcc_options *opts, /* No break here - do -fauto-profile processing. */ /* FALLTHRU */ case OPT_fauto_profile: - enable_fdo_optimizations (opts, opts_set, value); + enable_fdo_optimizations (opts, opts_set, value, true); SET_OPTION_IF_UNSET (opts, opts_set, flag_profile_correction, value); break; |