public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Remove usage of IRA_REGION_AUTODETECT
@ 2021-10-11 10:58 Martin Liška
  2021-10-11 12:59 ` Richard Biener
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Liška @ 2021-10-11 10:58 UTC (permalink / raw)
  To: gcc-patches

Similar patch, let's rely on OPTION_SET_P and not a default
options value.

Patch can bootstrap on x86_64-linux-gnu and survives regression tests.

Ready to be installed?
Thanks,
Martin

gcc/ChangeLog:

	* common.opt: Remove usage of IRA_REGION_AUTODETECT.
	* flag-types.h (enum ira_region): Likewise.
	* toplev.c (process_options): Use OPTION_SET_P instead of
	IRA_REGION_AUTODETECT.
---
  gcc/common.opt   | 2 +-
  gcc/flag-types.h | 4 ----
  gcc/toplev.c     | 2 +-
  3 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/gcc/common.opt b/gcc/common.opt
index 52693e226d2..59ecc9fbdf7 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -1923,7 +1923,7 @@ EnumValue
  Enum(ira_algorithm) String(priority) Value(IRA_ALGORITHM_PRIORITY)
  
  fira-region=
-Common Joined RejectNegative Enum(ira_region) Var(flag_ira_region) Init(IRA_REGION_AUTODETECT) Optimization
+Common Joined RejectNegative Enum(ira_region) Var(flag_ira_region) Init(IRA_REGION_ONE) Optimization
  -fira-region=[one|all|mixed]	Set regions for IRA.
  
  Enum
diff --git a/gcc/flag-types.h b/gcc/flag-types.h
index 5bd1f771c8b..ae0b216e8a3 100644
--- a/gcc/flag-types.h
+++ b/gcc/flag-types.h
@@ -191,10 +191,6 @@ enum ira_region
    IRA_REGION_ONE,
    IRA_REGION_ALL,
    IRA_REGION_MIXED,
-  /* This value means that there were no options -fira-region on the
-     command line and that we should choose a value depending on the
-     used -O option.  */
-  IRA_REGION_AUTODETECT
  };
  
  /* The options for excess precision.  */
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 81748b1152a..b878234f3f2 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -1319,7 +1319,7 @@ process_options (bool no_backend)
      }
  
    /* One region RA really helps to decrease the code size.  */
-  if (flag_ira_region == IRA_REGION_AUTODETECT)
+  if (!OPTION_SET_P (flag_ira_region))
      flag_ira_region
        = optimize_size || !optimize ? IRA_REGION_ONE : IRA_REGION_MIXED;
  
-- 
2.33.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Remove usage of IRA_REGION_AUTODETECT
  2021-10-11 10:58 [PATCH] Remove usage of IRA_REGION_AUTODETECT Martin Liška
@ 2021-10-11 12:59 ` Richard Biener
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2021-10-11 12:59 UTC (permalink / raw)
  To: Martin Liška; +Cc: GCC Patches

On Mon, Oct 11, 2021 at 12:58 PM Martin Liška <mliska@suse.cz> wrote:
>
> Similar patch, let's rely on OPTION_SET_P and not a default
> options value.
>
> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
>
> Ready to be installed?

OK.

> Thanks,
> Martin
>
> gcc/ChangeLog:
>
>         * common.opt: Remove usage of IRA_REGION_AUTODETECT.
>         * flag-types.h (enum ira_region): Likewise.
>         * toplev.c (process_options): Use OPTION_SET_P instead of
>         IRA_REGION_AUTODETECT.
> ---
>   gcc/common.opt   | 2 +-
>   gcc/flag-types.h | 4 ----
>   gcc/toplev.c     | 2 +-
>   3 files changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/gcc/common.opt b/gcc/common.opt
> index 52693e226d2..59ecc9fbdf7 100644
> --- a/gcc/common.opt
> +++ b/gcc/common.opt
> @@ -1923,7 +1923,7 @@ EnumValue
>   Enum(ira_algorithm) String(priority) Value(IRA_ALGORITHM_PRIORITY)
>
>   fira-region=
> -Common Joined RejectNegative Enum(ira_region) Var(flag_ira_region) Init(IRA_REGION_AUTODETECT) Optimization
> +Common Joined RejectNegative Enum(ira_region) Var(flag_ira_region) Init(IRA_REGION_ONE) Optimization
>   -fira-region=[one|all|mixed]  Set regions for IRA.
>
>   Enum
> diff --git a/gcc/flag-types.h b/gcc/flag-types.h
> index 5bd1f771c8b..ae0b216e8a3 100644
> --- a/gcc/flag-types.h
> +++ b/gcc/flag-types.h
> @@ -191,10 +191,6 @@ enum ira_region
>     IRA_REGION_ONE,
>     IRA_REGION_ALL,
>     IRA_REGION_MIXED,
> -  /* This value means that there were no options -fira-region on the
> -     command line and that we should choose a value depending on the
> -     used -O option.  */
> -  IRA_REGION_AUTODETECT
>   };
>
>   /* The options for excess precision.  */
> diff --git a/gcc/toplev.c b/gcc/toplev.c
> index 81748b1152a..b878234f3f2 100644
> --- a/gcc/toplev.c
> +++ b/gcc/toplev.c
> @@ -1319,7 +1319,7 @@ process_options (bool no_backend)
>       }
>
>     /* One region RA really helps to decrease the code size.  */
> -  if (flag_ira_region == IRA_REGION_AUTODETECT)
> +  if (!OPTION_SET_P (flag_ira_region))
>       flag_ira_region
>         = optimize_size || !optimize ? IRA_REGION_ONE : IRA_REGION_MIXED;
>
> --
> 2.33.0
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-11 13:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-11 10:58 [PATCH] Remove usage of IRA_REGION_AUTODETECT Martin Liška
2021-10-11 12:59 ` Richard Biener

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).