public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] make -freg-struct-return visibly a negative alias of -fpcc-struct-return
@ 2024-04-28  8:23 Alexandre Oliva
  2024-04-30  7:41 ` Richard Biener
  0 siblings, 1 reply; 3+ messages in thread
From: Alexandre Oliva @ 2024-04-28  8:23 UTC (permalink / raw)
  To: gcc-patches


The fact that both options accept negative forms suggests that maybe
they aren't negative forms of each other.  They are, but that isn't
clear even by examining common.opt.  Use NegativeAlias to make it
abundantly clear.

The 'Optimization' keyword next to freg-struct-return was the only
thing that caused flag_pcc_struct_return to be a per-function flag,
and ipa-inline relied on that.  After making it an alias, the
Optimization keyword was no longer operational.  I'm not sure it was
sensible or desirable for flag_pcc_struct_return to be a per-function
setting, but this patch does not intend to change behavior.

Regstrapped on x86_64-linux-gnu and ppc64le-linux-gnu.  Ok to install?


for  gcc/ChangeLog

	* common.opt (freg-struct-return): Make it explicitly
	fpcc-struct-return's NegativeAlias.  Copy Optimization...
	(freg-struct-return): ... here.
---
 gcc/common.opt |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/common.opt b/gcc/common.opt
index ad3488447752b..12d93c76a1e63 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -2406,7 +2406,7 @@ Common RejectNegative Joined UInteger Optimization
 -fpack-struct=<number>	Set initial maximum structure member alignment.
 
 fpcc-struct-return
-Common Var(flag_pcc_struct_return,1) Init(DEFAULT_PCC_STRUCT_RETURN)
+Common Var(flag_pcc_struct_return,1) Init(DEFAULT_PCC_STRUCT_RETURN) Optimization
 Return small aggregates in memory, not registers.
 
 fpeel-loops
@@ -2596,7 +2596,7 @@ Common Var(flag_record_gcc_switches)
 Record gcc command line switches in the object file.
 
 freg-struct-return
-Common Var(flag_pcc_struct_return,0) Optimization
+Common NegativeAlias Alias(fpcc_struct_return) Optimization
 Return small aggregates in registers.
 
 fregmove

-- 
Alexandre Oliva, happy hacker            https://FSFLA.org/blogs/lxo/
   Free Software Activist                   GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity
Excluding neuro-others for not behaving ""normal"" is *not* inclusive

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

* Re: [PATCH] make -freg-struct-return visibly a negative alias of -fpcc-struct-return
  2024-04-28  8:23 [PATCH] make -freg-struct-return visibly a negative alias of -fpcc-struct-return Alexandre Oliva
@ 2024-04-30  7:41 ` Richard Biener
  2024-05-17  4:34   ` Alexandre Oliva
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Biener @ 2024-04-30  7:41 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: gcc-patches

On Sun, Apr 28, 2024 at 10:24 AM Alexandre Oliva <oliva@adacore.com> wrote:
>
>
> The fact that both options accept negative forms suggests that maybe
> they aren't negative forms of each other.  They are, but that isn't
> clear even by examining common.opt.  Use NegativeAlias to make it
> abundantly clear.
>
> The 'Optimization' keyword next to freg-struct-return was the only
> thing that caused flag_pcc_struct_return to be a per-function flag,
> and ipa-inline relied on that.  After making it an alias, the
> Optimization keyword was no longer operational.  I'm not sure it was
> sensible or desirable for flag_pcc_struct_return to be a per-function
> setting, but this patch does not intend to change behavior.
>
> Regstrapped on x86_64-linux-gnu and ppc64le-linux-gnu.  Ok to install?

OK.

Thanks,
Richard.

>
> for  gcc/ChangeLog
>
>         * common.opt (freg-struct-return): Make it explicitly
>         fpcc-struct-return's NegativeAlias.  Copy Optimization...
>         (freg-struct-return): ... here.
> ---
>  gcc/common.opt |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gcc/common.opt b/gcc/common.opt
> index ad3488447752b..12d93c76a1e63 100644
> --- a/gcc/common.opt
> +++ b/gcc/common.opt
> @@ -2406,7 +2406,7 @@ Common RejectNegative Joined UInteger Optimization
>  -fpack-struct=<number> Set initial maximum structure member alignment.
>
>  fpcc-struct-return
> -Common Var(flag_pcc_struct_return,1) Init(DEFAULT_PCC_STRUCT_RETURN)
> +Common Var(flag_pcc_struct_return,1) Init(DEFAULT_PCC_STRUCT_RETURN) Optimization
>  Return small aggregates in memory, not registers.
>
>  fpeel-loops
> @@ -2596,7 +2596,7 @@ Common Var(flag_record_gcc_switches)
>  Record gcc command line switches in the object file.
>
>  freg-struct-return
> -Common Var(flag_pcc_struct_return,0) Optimization
> +Common NegativeAlias Alias(fpcc_struct_return) Optimization
>  Return small aggregates in registers.
>
>  fregmove
>
> --
> Alexandre Oliva, happy hacker            https://FSFLA.org/blogs/lxo/
>    Free Software Activist                   GNU Toolchain Engineer
> More tolerance and less prejudice are key for inclusion and diversity
> Excluding neuro-others for not behaving ""normal"" is *not* inclusive

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

* Re: [PATCH] make -freg-struct-return visibly a negative alias of -fpcc-struct-return
  2024-04-30  7:41 ` Richard Biener
@ 2024-05-17  4:34   ` Alexandre Oliva
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Oliva @ 2024-05-17  4:34 UTC (permalink / raw)
  To: Richard Biener; +Cc: gcc-patches

On Apr 30, 2024, Richard Biener <richard.guenther@gmail.com> wrote:

> OK.

Thanks, I'm back (from LibrePlanet), and I've just installed it in the
trunk.

>> for  gcc/ChangeLog
>> 
>> * common.opt (freg-struct-return): Make it explicitly
>> fpcc-struct-return's NegativeAlias.  Copy Optimization...
>> (freg-struct-return): ... here.

-- 
Alexandre Oliva, happy hacker            https://FSFLA.org/blogs/lxo/
   Free Software Activist                   GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity
Excluding neuro-others for not behaving ""normal"" is *not* inclusive

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

end of thread, other threads:[~2024-05-17  4:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-28  8:23 [PATCH] make -freg-struct-return visibly a negative alias of -fpcc-struct-return Alexandre Oliva
2024-04-30  7:41 ` Richard Biener
2024-05-17  4:34   ` Alexandre Oliva

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