public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: "Martin Liška" <mliska@suse.cz>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] opts: Remove AUTODETECT_VALUE usage.
Date: Mon, 11 Oct 2021 14:57:21 +0200	[thread overview]
Message-ID: <CAFiYyc13q7w7Fxbqwko18hDDHzY2SuHvdXYQkz2SA=PZ-1c7Ng@mail.gmail.com> (raw)
In-Reply-To: <7b67904e-af64-a584-8706-f81e7d8482b8@suse.cz>

On Mon, Oct 11, 2021 at 12:58 PM Martin Liška <mliska@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	other threads:[~2021-10-11 12:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-11 10:58 Martin Liška
2021-10-11 12:57 ` Richard Biener [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFiYyc13q7w7Fxbqwko18hDDHzY2SuHvdXYQkz2SA=PZ-1c7Ng@mail.gmail.com' \
    --to=richard.guenther@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=mliska@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).