Use more SET_OPTION_IF_UNSET.

2019-11-12  Martin Liska  <mliska@suse.cz>

	* config/i386/i386-options.c (ix86_recompute_optlev_based_flags):
	Use SET_OPTION_IF_UNSET.
	(ix86_option_override_internal): Likewise.
	* opts.c (default_options_optimization): Likewise.
	(finish_options): Likewise.
	(enable_fdo_optimizations): Likewise.
	(common_handle_option): Likewise.
2019-11-12  Martin Liska  <mliska@suse.cz>

	* c-opts.c (c_common_post_options):
	Use SET_OPTION_IF_UNSET.
2019-11-12  Martin Liska  <mliska@suse.cz>

	* options.c (gfc_init_options):
	Use SET_OPTION_IF_UNSET.
2019-11-12  Martin Liska  <mliska@suse.cz>

	* go-lang.c (go_langhook_post_options):
	Use SET_OPTION_IF_UNSET.

From-SVN: r278091
This commit is contained in:
Martin Liska 2019-11-12 11:10:58 +01:00 committed by Martin Liska
parent 8100e93b72
commit 6ed760441a
9 changed files with 119 additions and 121 deletions

View file

@ -1,3 +1,13 @@
2019-11-12 Martin Liska <mliska@suse.cz>
* config/i386/i386-options.c (ix86_recompute_optlev_based_flags):
Use SET_OPTION_IF_UNSET.
(ix86_option_override_internal): Likewise.
* opts.c (default_options_optimization): Likewise.
(finish_options): Likewise.
(enable_fdo_optimizations): Likewise.
(common_handle_option): Likewise.
2019-11-12 Martin Liska <mliska@suse.cz> 2019-11-12 Martin Liska <mliska@suse.cz>
* common/common-target.def: Remove option_validate_param and * common/common-target.def: Remove option_validate_param and

View file

@ -1,3 +1,8 @@
2019-11-12 Martin Liska <mliska@suse.cz>
* c-opts.c (c_common_post_options):
Use SET_OPTION_IF_UNSET.
2019-11-12 Maciej W. Rozycki <macro@codesourcery.com> 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
Frederik Harwath <frederik@codesourcery.com> Frederik Harwath <frederik@codesourcery.com>

View file

@ -828,9 +828,9 @@ c_common_post_options (const char **pfilename)
/* C2X Annex F does not permit certain built-in functions to raise /* C2X Annex F does not permit certain built-in functions to raise
"inexact". */ "inexact". */
if (flag_isoc2x if (flag_isoc2x)
&& !global_options_set.x_flag_fp_int_builtin_inexact) SET_OPTION_IF_UNSET (&global_options, &global_options_set,
flag_fp_int_builtin_inexact = 0; flag_fp_int_builtin_inexact, 0);
/* By default we use C99 inline semantics in GNU99 or C99 mode. C99 /* By default we use C99 inline semantics in GNU99 or C99 mode. C99
inline semantics are not supported in GNU89 or C89 mode. */ inline semantics are not supported in GNU89 or C89 mode. */
@ -847,9 +847,9 @@ c_common_post_options (const char **pfilename)
/* If -ffreestanding, -fno-hosted or -fno-builtin then disable /* If -ffreestanding, -fno-hosted or -fno-builtin then disable
pattern recognition. */ pattern recognition. */
if (!global_options_set.x_flag_tree_loop_distribute_patterns if (flag_no_builtin)
&& flag_no_builtin) SET_OPTION_IF_UNSET (&global_options, &global_options_set,
flag_tree_loop_distribute_patterns = 0; flag_tree_loop_distribute_patterns, 0);
/* -Woverlength-strings is off by default, but is enabled by -Wpedantic. /* -Woverlength-strings is off by default, but is enabled by -Wpedantic.
It is never enabled in C++, as the minimum limit is not normative It is never enabled in C++, as the minimum limit is not normative
@ -918,16 +918,17 @@ c_common_post_options (const char **pfilename)
&& (cxx_dialect >= cxx11 || flag_isoc99)); && (cxx_dialect >= cxx11 || flag_isoc99));
/* -Wregister is enabled by default in C++17. */ /* -Wregister is enabled by default in C++17. */
if (!global_options_set.x_warn_register) SET_OPTION_IF_UNSET (&global_options, &global_options_set, warn_register,
warn_register = cxx_dialect >= cxx17; cxx_dialect >= cxx17);
/* -Wcomma-subscript is enabled by default in C++20. */ /* -Wcomma-subscript is enabled by default in C++20. */
if (!global_options_set.x_warn_comma_subscript) SET_OPTION_IF_UNSET (&global_options, &global_options_set,
warn_comma_subscript = (cxx_dialect >= cxx2a && warn_deprecated); warn_comma_subscript,
cxx_dialect >= cxx2a && warn_deprecated);
/* -Wvolatile is enabled by default in C++20. */ /* -Wvolatile is enabled by default in C++20. */
if (!global_options_set.x_warn_volatile) SET_OPTION_IF_UNSET (&global_options, &global_options_set, warn_volatile,
warn_volatile = (cxx_dialect >= cxx2a && warn_deprecated); cxx_dialect >= cxx2a && warn_deprecated);
/* Declone C++ 'structors if -Os. */ /* Declone C++ 'structors if -Os. */
if (flag_declone_ctor_dtor == -1) if (flag_declone_ctor_dtor == -1)
@ -979,12 +980,13 @@ c_common_post_options (const char **pfilename)
/* By default, enable the new inheriting constructor semantics along with ABI /* By default, enable the new inheriting constructor semantics along with ABI
11. New and old should coexist fine, but it is a change in what 11. New and old should coexist fine, but it is a change in what
artificial symbols are generated. */ artificial symbols are generated. */
if (!global_options_set.x_flag_new_inheriting_ctors) SET_OPTION_IF_UNSET (&global_options, &global_options_set,
flag_new_inheriting_ctors = abi_version_at_least (11); flag_new_inheriting_ctors,
abi_version_at_least (11));
/* For GCC 7, only enable DR150 resolution by default if -std=c++17. */ /* For GCC 7, only enable DR150 resolution by default if -std=c++17. */
if (!global_options_set.x_flag_new_ttp) SET_OPTION_IF_UNSET (&global_options, &global_options_set, flag_new_ttp,
flag_new_ttp = (cxx_dialect >= cxx17); cxx_dialect >= cxx17);
if (cxx_dialect >= cxx11) if (cxx_dialect >= cxx11)
{ {

View file

@ -1605,12 +1605,12 @@ ix86_recompute_optlev_based_flags (struct gcc_options *opts,
in case they weren't overwritten by command line options. */ in case they weren't overwritten by command line options. */
if (TARGET_64BIT_P (opts->x_ix86_isa_flags)) if (TARGET_64BIT_P (opts->x_ix86_isa_flags))
{ {
if (opts->x_optimize >= 1 && !opts_set->x_flag_omit_frame_pointer) if (opts->x_optimize >= 1)
opts->x_flag_omit_frame_pointer = !USE_IX86_FRAME_POINTER; SET_OPTION_IF_UNSET (opts, opts_set, flag_omit_frame_pointer,
!USE_IX86_FRAME_POINTER);
if (opts->x_flag_asynchronous_unwind_tables if (opts->x_flag_asynchronous_unwind_tables
&& !opts_set->x_flag_unwind_tables
&& TARGET_64BIT_MS_ABI) && TARGET_64BIT_MS_ABI)
opts->x_flag_unwind_tables = 1; SET_OPTION_IF_UNSET (opts, opts_set, flag_unwind_tables, 1);
if (opts->x_flag_asynchronous_unwind_tables == 2) if (opts->x_flag_asynchronous_unwind_tables == 2)
opts->x_flag_unwind_tables opts->x_flag_unwind_tables
= opts->x_flag_asynchronous_unwind_tables = 1; = opts->x_flag_asynchronous_unwind_tables = 1;
@ -1619,9 +1619,9 @@ ix86_recompute_optlev_based_flags (struct gcc_options *opts,
} }
else else
{ {
if (opts->x_optimize >= 1 && !opts_set->x_flag_omit_frame_pointer) if (opts->x_optimize >= 1)
opts->x_flag_omit_frame_pointer SET_OPTION_IF_UNSET (opts, opts_set, flag_omit_frame_pointer,
= !(USE_IX86_FRAME_POINTER || opts->x_optimize_size); !(USE_IX86_FRAME_POINTER || opts->x_optimize_size));
if (opts->x_flag_asynchronous_unwind_tables == 2) if (opts->x_flag_asynchronous_unwind_tables == 2)
opts->x_flag_asynchronous_unwind_tables = !USE_IX86_FRAME_POINTER; opts->x_flag_asynchronous_unwind_tables = !USE_IX86_FRAME_POINTER;
if (opts->x_flag_pcc_struct_return == 2) if (opts->x_flag_pcc_struct_return == 2)
@ -1821,8 +1821,7 @@ ix86_option_override_internal (bool main_args_p,
opts->x_ix86_pmode = TARGET_LP64_P (opts->x_ix86_isa_flags) opts->x_ix86_pmode = TARGET_LP64_P (opts->x_ix86_isa_flags)
? PMODE_DI : PMODE_SI; ? PMODE_DI : PMODE_SI;
if (!opts_set->x_ix86_abi) SET_OPTION_IF_UNSET (opts, opts_set, ix86_abi, DEFAULT_ABI);
opts->x_ix86_abi = DEFAULT_ABI;
if (opts->x_ix86_abi == MS_ABI && TARGET_X32_P (opts->x_ix86_isa_flags)) if (opts->x_ix86_abi == MS_ABI && TARGET_X32_P (opts->x_ix86_isa_flags))
error ("%<-mabi=ms%> not supported with X32 ABI"); error ("%<-mabi=ms%> not supported with X32 ABI");
@ -1843,8 +1842,8 @@ ix86_option_override_internal (bool main_args_p,
/* For targets using ms ABI enable ms-extensions, if not /* For targets using ms ABI enable ms-extensions, if not
explicit turned off. For non-ms ABI we turn off this explicit turned off. For non-ms ABI we turn off this
option. */ option. */
if (!opts_set->x_flag_ms_extensions) SET_OPTION_IF_UNSET (opts, opts_set, flag_ms_extensions,
opts->x_flag_ms_extensions = (MS_ABI == DEFAULT_ABI); (MS_ABI == DEFAULT_ABI));
if (opts_set->x_ix86_cmodel) if (opts_set->x_ix86_cmodel)
{ {
@ -2367,8 +2366,8 @@ ix86_option_override_internal (bool main_args_p,
ix86_default_align (opts); ix86_default_align (opts);
/* Provide default for -mbranch-cost= value. */ /* Provide default for -mbranch-cost= value. */
if (!opts_set->x_ix86_branch_cost) SET_OPTION_IF_UNSET (opts, opts_set, ix86_branch_cost,
opts->x_ix86_branch_cost = ix86_tune_cost->branch_cost; ix86_tune_cost->branch_cost);
if (TARGET_64BIT_P (opts->x_ix86_isa_flags)) if (TARGET_64BIT_P (opts->x_ix86_isa_flags))
{ {
@ -2474,8 +2473,8 @@ ix86_option_override_internal (bool main_args_p,
} }
/* Set the default value for -mstackrealign. */ /* Set the default value for -mstackrealign. */
if (!opts_set->x_ix86_force_align_arg_pointer) SET_OPTION_IF_UNSET (opts, opts_set, ix86_force_align_arg_pointer,
opts->x_ix86_force_align_arg_pointer = STACK_REALIGN_DEFAULT; STACK_REALIGN_DEFAULT);
ix86_default_incoming_stack_boundary = PREFERRED_STACK_BOUNDARY; ix86_default_incoming_stack_boundary = PREFERRED_STACK_BOUNDARY;
@ -2863,9 +2862,8 @@ ix86_option_override_internal (bool main_args_p,
/* PR86952: jump table usage with retpolines is slow. /* PR86952: jump table usage with retpolines is slow.
The PR provides some numbers about the slowness. */ The PR provides some numbers about the slowness. */
if (ix86_indirect_branch != indirect_branch_keep if (ix86_indirect_branch != indirect_branch_keep)
&& !opts_set->x_flag_jump_tables) SET_OPTION_IF_UNSET (opts, opts_set, flag_jump_tables, 0);
opts->x_flag_jump_tables = 0;
return true; return true;
} }

View file

@ -1,3 +1,8 @@
2019-11-12 Martin Liska <mliska@suse.cz>
* options.c (gfc_init_options):
Use SET_OPTION_IF_UNSET.
2019-11-12 Maciej W. Rozycki <macro@codesourcery.com> 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
Frederik Harwath <frederik@codesourcery.com> Frederik Harwath <frederik@codesourcery.com>

View file

@ -162,8 +162,8 @@ gfc_init_options (unsigned int decoded_options_count,
/* ??? Wmissing-include-dirs is disabled by default in C/C++ but /* ??? Wmissing-include-dirs is disabled by default in C/C++ but
enabled by default in Fortran. Ideally, we should express this enabled by default in Fortran. Ideally, we should express this
in .opt, but that is not supported yet. */ in .opt, but that is not supported yet. */
if (!global_options_set.x_cpp_warn_missing_include_dirs) SET_OPTION_IF_UNSET (&global_options, &global_options_set,
global_options.x_cpp_warn_missing_include_dirs = 1; cpp_warn_missing_include_dirs, 1);
set_dec_flags (0); set_dec_flags (0);

View file

@ -1,3 +1,8 @@
2019-11-12 Martin Liska <mliska@suse.cz>
* go-lang.c (go_langhook_post_options):
Use SET_OPTION_IF_UNSET.
2019-09-04 Ian Lance Taylor <iant@golang.org> 2019-09-04 Ian Lance Taylor <iant@golang.org>
PR tree-optimization/91663 PR tree-optimization/91663

View file

@ -297,13 +297,13 @@ go_langhook_post_options (const char **pfilename ATTRIBUTE_UNUSED)
flag_excess_precision = EXCESS_PRECISION_STANDARD; flag_excess_precision = EXCESS_PRECISION_STANDARD;
/* Tail call optimizations can confuse uses of runtime.Callers. */ /* Tail call optimizations can confuse uses of runtime.Callers. */
if (!global_options_set.x_flag_optimize_sibling_calls) SET_OPTION_IF_UNSET (&global_options, &global_options_set,
global_options.x_flag_optimize_sibling_calls = 0; flag_optimize_sibling_calls, 0);
/* Partial inlining can confuses uses of runtime.Callers. /* Partial inlining can confuses uses of runtime.Callers.
See https://gcc.gnu.org/PR91663. */ See https://gcc.gnu.org/PR91663. */
if (!global_options_set.x_flag_partial_inlining) SET_OPTION_IF_UNSET (&global_options, &global_options_set,
global_options.x_flag_partial_inlining = 0; flag_partial_inlining, 0);
/* If the debug info level is still 1, as set in init_options, make /* If the debug info level is still 1, as set in init_options, make
sure that some debugging type is selected. */ sure that some debugging type is selected. */
@ -312,18 +312,18 @@ go_langhook_post_options (const char **pfilename ATTRIBUTE_UNUSED)
global_options.x_write_symbols = PREFERRED_DEBUGGING_TYPE; global_options.x_write_symbols = PREFERRED_DEBUGGING_TYPE;
/* We turn on stack splitting if we can. */ /* We turn on stack splitting if we can. */
if (!global_options_set.x_flag_split_stack if (targetm_common.supports_split_stack (false, &global_options))
&& targetm_common.supports_split_stack (false, &global_options)) SET_OPTION_IF_UNSET (&global_options, &global_options_set,
global_options.x_flag_split_stack = 1; flag_split_stack, 1);
/* If stack splitting is turned on, and the user did not explicitly /* If stack splitting is turned on, and the user did not explicitly
request function partitioning, turn off partitioning, as it request function partitioning, turn off partitioning, as it
confuses the linker when trying to handle partitioned split-stack confuses the linker when trying to handle partitioned split-stack
code that calls a non-split-stack function. */ code that calls a non-split-stack function. */
if (global_options.x_flag_split_stack if (global_options.x_flag_split_stack
&& global_options.x_flag_reorder_blocks_and_partition && global_options.x_flag_reorder_blocks_and_partition)
&& !global_options_set.x_flag_reorder_blocks_and_partition) SET_OPTION_IF_UNSET (&global_options, &global_options_set,
global_options.x_flag_reorder_blocks_and_partition = 0; flag_reorder_blocks_and_partition, 0);
/* Returning false means that the backend should be used. */ /* Returning false means that the backend should be used. */
return false; return false;

View file

@ -641,9 +641,8 @@ default_options_optimization (struct gcc_options *opts,
/* -O2 param settings. */ /* -O2 param settings. */
opt2 = (opts->x_optimize >= 2); opt2 = (opts->x_optimize >= 2);
if (openacc_mode if (openacc_mode)
&& !opts_set->x_flag_ipa_pta) SET_OPTION_IF_UNSET (opts, opts_set, flag_ipa_pta, true);
opts->x_flag_ipa_pta = true;
/* Track fields in field-sensitive alias analysis. */ /* Track fields in field-sensitive alias analysis. */
if (opt2) if (opt2)
@ -1064,13 +1063,11 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
code that calls a non-split-stack functions. But if partitioning code that calls a non-split-stack functions. But if partitioning
was turned on explicitly just hope for the best. */ was turned on explicitly just hope for the best. */
if (opts->x_flag_split_stack if (opts->x_flag_split_stack
&& opts->x_flag_reorder_blocks_and_partition && opts->x_flag_reorder_blocks_and_partition)
&& !opts_set->x_flag_reorder_blocks_and_partition) SET_OPTION_IF_UNSET (opts, opts_set, flag_reorder_blocks_and_partition, 0);
opts->x_flag_reorder_blocks_and_partition = 0;
if (opts->x_flag_reorder_blocks_and_partition if (opts->x_flag_reorder_blocks_and_partition)
&& !opts_set->x_flag_reorder_functions) SET_OPTION_IF_UNSET (opts, opts_set, flag_reorder_functions, 1);
opts->x_flag_reorder_functions = 1;
/* The -gsplit-dwarf option requires -ggnu-pubnames. */ /* The -gsplit-dwarf option requires -ggnu-pubnames. */
if (opts->x_dwarf_split_debug_info) if (opts->x_dwarf_split_debug_info)
@ -1127,9 +1124,9 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
/* Enable -fsanitize-address-use-after-scope if address sanitizer is /* Enable -fsanitize-address-use-after-scope if address sanitizer is
enabled. */ enabled. */
if ((opts->x_flag_sanitize & SANITIZE_USER_ADDRESS) if (opts->x_flag_sanitize & SANITIZE_USER_ADDRESS)
&& !opts_set->x_flag_sanitize_address_use_after_scope) SET_OPTION_IF_UNSET (opts, opts_set, flag_sanitize_address_use_after_scope,
opts->x_flag_sanitize_address_use_after_scope = true; true);
/* Force -fstack-reuse=none in case -fsanitize-address-use-after-scope /* Force -fstack-reuse=none in case -fsanitize-address-use-after-scope
is enabled. */ is enabled. */
@ -1670,52 +1667,34 @@ enable_fdo_optimizations (struct gcc_options *opts,
struct gcc_options *opts_set, struct gcc_options *opts_set,
int value) int value)
{ {
if (!opts_set->x_flag_branch_probabilities) SET_OPTION_IF_UNSET (opts, opts_set, flag_branch_probabilities, value);
opts->x_flag_branch_probabilities = value; SET_OPTION_IF_UNSET (opts, opts_set, flag_profile_values, value);
if (!opts_set->x_flag_profile_values) SET_OPTION_IF_UNSET (opts, opts_set, flag_unroll_loops, value);
opts->x_flag_profile_values = value; SET_OPTION_IF_UNSET (opts, opts_set, flag_peel_loops, value);
if (!opts_set->x_flag_unroll_loops) SET_OPTION_IF_UNSET (opts, opts_set, flag_tracer, value);
opts->x_flag_unroll_loops = value; SET_OPTION_IF_UNSET (opts, opts_set, flag_value_profile_transformations,
if (!opts_set->x_flag_peel_loops) value);
opts->x_flag_peel_loops = value; SET_OPTION_IF_UNSET (opts, opts_set, flag_inline_functions, value);
if (!opts_set->x_flag_tracer) SET_OPTION_IF_UNSET (opts, opts_set, flag_ipa_cp, value);
opts->x_flag_tracer = value; if (value)
if (!opts_set->x_flag_value_profile_transformations) {
opts->x_flag_value_profile_transformations = value; SET_OPTION_IF_UNSET (opts, opts_set, flag_ipa_cp_clone, 1);
if (!opts_set->x_flag_inline_functions) SET_OPTION_IF_UNSET (opts, opts_set, flag_ipa_bit_cp, 1);
opts->x_flag_inline_functions = value; }
if (!opts_set->x_flag_ipa_cp) SET_OPTION_IF_UNSET (opts, opts_set, flag_predictive_commoning, value);
opts->x_flag_ipa_cp = value; SET_OPTION_IF_UNSET (opts, opts_set, flag_split_loops, value);
if (!opts_set->x_flag_ipa_cp_clone SET_OPTION_IF_UNSET (opts, opts_set, flag_unswitch_loops, value);
&& value && opts->x_flag_ipa_cp) SET_OPTION_IF_UNSET (opts, opts_set, flag_gcse_after_reload, value);
opts->x_flag_ipa_cp_clone = value; SET_OPTION_IF_UNSET (opts, opts_set, flag_tree_loop_vectorize, value);
if (!opts_set->x_flag_ipa_bit_cp SET_OPTION_IF_UNSET (opts, opts_set, flag_tree_slp_vectorize, value);
&& value && opts->x_flag_ipa_cp) SET_OPTION_IF_UNSET (opts, opts_set, flag_version_loops_for_strides, value);
opts->x_flag_ipa_bit_cp = value; SET_OPTION_IF_UNSET (opts, opts_set, flag_vect_cost_model,
if (!opts_set->x_flag_predictive_commoning) VECT_COST_MODEL_DYNAMIC);
opts->x_flag_predictive_commoning = value; SET_OPTION_IF_UNSET (opts, opts_set, flag_tree_loop_distribute_patterns,
if (!opts_set->x_flag_split_loops) value);
opts->x_flag_split_loops = value; SET_OPTION_IF_UNSET (opts, opts_set, flag_loop_interchange, value);
if (!opts_set->x_flag_unswitch_loops) SET_OPTION_IF_UNSET (opts, opts_set, flag_unroll_jam, value);
opts->x_flag_unswitch_loops = value; SET_OPTION_IF_UNSET (opts, opts_set, flag_tree_loop_distribution, value);
if (!opts_set->x_flag_gcse_after_reload)
opts->x_flag_gcse_after_reload = value;
if (!opts_set->x_flag_tree_loop_vectorize)
opts->x_flag_tree_loop_vectorize = value;
if (!opts_set->x_flag_tree_slp_vectorize)
opts->x_flag_tree_slp_vectorize = value;
if (!opts_set->x_flag_version_loops_for_strides)
opts->x_flag_version_loops_for_strides = value;
if (!opts_set->x_flag_vect_cost_model)
opts->x_flag_vect_cost_model = VECT_COST_MODEL_DYNAMIC;
if (!opts_set->x_flag_tree_loop_distribute_patterns)
opts->x_flag_tree_loop_distribute_patterns = value;
if (!opts_set->x_flag_loop_interchange)
opts->x_flag_loop_interchange = value;
if (!opts_set->x_flag_unroll_jam)
opts->x_flag_unroll_jam = value;
if (!opts_set->x_flag_tree_loop_distribution)
opts->x_flag_tree_loop_distribution = value;
} }
/* -f{,no-}sanitize{,-recover}= suboptions. */ /* -f{,no-}sanitize{,-recover}= suboptions. */
@ -2531,13 +2510,13 @@ common_handle_option (struct gcc_options *opts,
/* FALLTHRU */ /* FALLTHRU */
case OPT_fprofile_use: case OPT_fprofile_use:
enable_fdo_optimizations (opts, opts_set, value); enable_fdo_optimizations (opts, opts_set, value);
if (!opts_set->x_flag_profile_reorder_functions) SET_OPTION_IF_UNSET (opts, opts_set, flag_profile_reorder_functions,
opts->x_flag_profile_reorder_functions = value; value);
/* Indirect call profiling should do all useful transformations /* Indirect call profiling should do all useful transformations
speculative devirtualization does. */ speculative devirtualization does. */
if (!opts_set->x_flag_devirtualize_speculatively if (opts->x_flag_value_profile_transformations)
&& opts->x_flag_value_profile_transformations) SET_OPTION_IF_UNSET (opts, opts_set, flag_devirtualize_speculatively,
opts->x_flag_devirtualize_speculatively = false; false);
break; break;
case OPT_fauto_profile_: case OPT_fauto_profile_:
@ -2548,8 +2527,7 @@ common_handle_option (struct gcc_options *opts,
/* FALLTHRU */ /* FALLTHRU */
case OPT_fauto_profile: case OPT_fauto_profile:
enable_fdo_optimizations (opts, opts_set, value); enable_fdo_optimizations (opts, opts_set, value);
if (!opts_set->x_flag_profile_correction) SET_OPTION_IF_UNSET (opts, opts_set, flag_profile_correction, value);
opts->x_flag_profile_correction = value;
SET_OPTION_IF_UNSET (opts, opts_set, SET_OPTION_IF_UNSET (opts, opts_set,
param_early_inliner_max_iterations, 10); param_early_inliner_max_iterations, 10);
break; break;
@ -2560,19 +2538,14 @@ common_handle_option (struct gcc_options *opts,
/* No break here - do -fprofile-generate processing. */ /* No break here - do -fprofile-generate processing. */
/* FALLTHRU */ /* FALLTHRU */
case OPT_fprofile_generate: case OPT_fprofile_generate:
if (!opts_set->x_profile_arc_flag) SET_OPTION_IF_UNSET (opts, opts_set, profile_arc_flag, value);
opts->x_profile_arc_flag = value; SET_OPTION_IF_UNSET (opts, opts_set, flag_profile_values, value);
if (!opts_set->x_flag_profile_values) SET_OPTION_IF_UNSET (opts, opts_set, flag_inline_functions, value);
opts->x_flag_profile_values = value; SET_OPTION_IF_UNSET (opts, opts_set, flag_ipa_bit_cp, value);
if (!opts_set->x_flag_inline_functions)
opts->x_flag_inline_functions = value;
if (!opts_set->x_flag_ipa_bit_cp)
opts->x_flag_ipa_bit_cp = value;
/* FIXME: Instrumentation we insert makes ipa-reference bitmaps /* FIXME: Instrumentation we insert makes ipa-reference bitmaps
quadratic. Disable the pass until better memory representation quadratic. Disable the pass until better memory representation
is done. */ is done. */
if (!opts_set->x_flag_ipa_reference) SET_OPTION_IF_UNSET (opts, opts_set, flag_ipa_reference, false);
opts->x_flag_ipa_reference = false;
break; break;
case OPT_fpatchable_function_entry_: case OPT_fpatchable_function_entry_: