On Mon, Oct 11, 2021 at 12:58 PM Martin Liška <mli...@suse.cz> wrote:
>
> The patch is about using OPTION_SET_P instead of a default
> option value set in common.opt.
>
> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
>
> Ready to be installed?

OK, but...

> Thanks,
> Martin
>
> gcc/ChangeLog:
>
>         * common.opt: Remove Init(2) for some options.

you could enumerate the three changed opts here.

>         * toplev.c (process_options): Do not use AUTODETECT_VALUE, but
>         use rather OPTION_SET_P.
> ---
>   gcc/common.opt | 6 +++---
>   gcc/toplev.c   | 6 +++---
>   2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/gcc/common.opt b/gcc/common.opt
> index 59ecc9fbdf7..4099effcc80 100644
> --- a/gcc/common.opt
> +++ b/gcc/common.opt
> @@ -2399,7 +2399,7 @@ Common Var(flag_live_range_shrinkage) Init(0) 
> Optimization
>   Relief of register pressure through live range shrinkage.
>
>   frename-registers
> -Common Var(flag_rename_registers) Init(2) Optimization
> +Common Var(flag_rename_registers) Optimization
>   Perform a register renaming optimization pass.
>
>   fschedule-fusion
> @@ -2797,7 +2797,7 @@ Common Ignore
>   Does nothing.  Preserved for backward compatibility.
>
>   ftree-cselim
> -Common Var(flag_tree_cselim) Init(2) Optimization
> +Common Var(flag_tree_cselim) Optimization
>   Transform condition stores into unconditional ones.
>
>   ftree-switch-conversion
> @@ -3158,7 +3158,7 @@ Common Var(flag_value_profile_transformations) 
> Optimization
>   Use expression value profiles in optimizations.
>
>   fweb
> -Common Var(flag_web) Init(2) Optimization
> +Common Var(flag_web) Optimization
>   Construct webs and split unrelated uses of single variable.
>
>   ftree-builtin-call-dce
> diff --git a/gcc/toplev.c b/gcc/toplev.c
> index b878234f3f2..167feac2583 100644
> --- a/gcc/toplev.c
> +++ b/gcc/toplev.c
> @@ -1332,10 +1332,10 @@ process_options (bool no_backend)
>       }
>
>     /* web and rename-registers help when run after loop unrolling.  */
> -  if (flag_web == AUTODETECT_VALUE)
> +  if (!OPTION_SET_P (flag_web))
>       flag_web = flag_unroll_loops;
>
> -  if (flag_rename_registers == AUTODETECT_VALUE)
> +  if (!OPTION_SET_P (flag_rename_registers))
>       flag_rename_registers = flag_unroll_loops;
>
>     if (flag_non_call_exceptions)
> @@ -1598,7 +1598,7 @@ process_options (bool no_backend)
>         debug_inline_points = 0;
>       }
>
> -  if (flag_tree_cselim == AUTODETECT_VALUE)
> +  if (!OPTION_SET_P (flag_tree_cselim))
>       {
>         if (HAVE_conditional_move)
>         flag_tree_cselim = 1;
> --
> 2.33.0
>

Reply via email to