* [PATCH][V2] rs6000: Remove unnecessary option manipulation.
@ 2021-11-04 12:36 Martin Liška
2021-11-11 16:42 ` Martin Liška
2021-11-11 17:52 ` Segher Boessenkool
0 siblings, 2 replies; 6+ messages in thread
From: Martin Liška @ 2021-11-04 12:36 UTC (permalink / raw)
To: GCC Patches; +Cc: segher
Sending the patch in a separate thread.
Ready for master?
Cheers,
Martin
gcc/ChangeLog:
* config/rs6000/rs6000.c (rs6000_override_options_after_change):
Do not set flag_rename_registers, it's already enabled with
EnabledBy(funroll-loops).
Use EnabledBy for unroll_only_small_loops.
* config/rs6000/rs6000.opt: Use EnabledBy for
unroll_only_small_loops.
---
gcc/config/rs6000/rs6000.c | 7 +------
gcc/config/rs6000/rs6000.opt | 2 +-
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 01a95591a5d..b9dddcd0aa1 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -3472,13 +3472,8 @@ rs6000_override_options_after_change (void)
/* Explicit -funroll-loops turns -munroll-only-small-loops off, and
turns -frename-registers on. */
if ((OPTION_SET_P (flag_unroll_loops) && flag_unroll_loops)
- || (OPTION_SET_P (flag_unroll_all_loops)
- && flag_unroll_all_loops))
+ || (OPTION_SET_P (flag_unroll_all_loops) && flag_unroll_all_loops))
{
- if (!OPTION_SET_P (unroll_only_small_loops))
- unroll_only_small_loops = 0;
- if (!OPTION_SET_P (flag_rename_registers))
- flag_rename_registers = 1;
if (!OPTION_SET_P (flag_cunroll_grow_size))
flag_cunroll_grow_size = 1;
}
diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt
index 9d7878f144a..faeb7423ca7 100644
--- a/gcc/config/rs6000/rs6000.opt
+++ b/gcc/config/rs6000/rs6000.opt
@@ -546,7 +546,7 @@ Target Undocumented Var(rs6000_optimize_swaps) Init(1) Save
Analyze and remove doubleword swaps from VSX computations.
munroll-only-small-loops
-Target Undocumented Var(unroll_only_small_loops) Init(0) Save
+Target Undocumented Var(unroll_only_small_loops) Init(0) Save EnabledBy(funroll-loops)
; Use conservative small loop unrolling.
mpower9-misc
--
2.33.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][V2] rs6000: Remove unnecessary option manipulation.
2021-11-04 12:36 [PATCH][V2] rs6000: Remove unnecessary option manipulation Martin Liška
@ 2021-11-11 16:42 ` Martin Liška
2021-11-11 17:52 ` Segher Boessenkool
1 sibling, 0 replies; 6+ messages in thread
From: Martin Liška @ 2021-11-11 16:42 UTC (permalink / raw)
To: GCC Patches; +Cc: segher
PING^1
On 11/4/21 13:36, Martin Liška wrote:
> Sending the patch in a separate thread.
>
> Ready for master?
>
> Cheers,
> Martin
>
> gcc/ChangeLog:
>
> * config/rs6000/rs6000.c (rs6000_override_options_after_change):
> Do not set flag_rename_registers, it's already enabled with
> EnabledBy(funroll-loops).
> Use EnabledBy for unroll_only_small_loops.
> * config/rs6000/rs6000.opt: Use EnabledBy for
> unroll_only_small_loops.
> ---
> gcc/config/rs6000/rs6000.c | 7 +------
> gcc/config/rs6000/rs6000.opt | 2 +-
> 2 files changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
> index 01a95591a5d..b9dddcd0aa1 100644
> --- a/gcc/config/rs6000/rs6000.c
> +++ b/gcc/config/rs6000/rs6000.c
> @@ -3472,13 +3472,8 @@ rs6000_override_options_after_change (void)
> /* Explicit -funroll-loops turns -munroll-only-small-loops off, and
> turns -frename-registers on. */
> if ((OPTION_SET_P (flag_unroll_loops) && flag_unroll_loops)
> - || (OPTION_SET_P (flag_unroll_all_loops)
> - && flag_unroll_all_loops))
> + || (OPTION_SET_P (flag_unroll_all_loops) && flag_unroll_all_loops))
> {
> - if (!OPTION_SET_P (unroll_only_small_loops))
> - unroll_only_small_loops = 0;
> - if (!OPTION_SET_P (flag_rename_registers))
> - flag_rename_registers = 1;
> if (!OPTION_SET_P (flag_cunroll_grow_size))
> flag_cunroll_grow_size = 1;
> }
> diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt
> index 9d7878f144a..faeb7423ca7 100644
> --- a/gcc/config/rs6000/rs6000.opt
> +++ b/gcc/config/rs6000/rs6000.opt
> @@ -546,7 +546,7 @@ Target Undocumented Var(rs6000_optimize_swaps) Init(1) Save
> Analyze and remove doubleword swaps from VSX computations.
>
> munroll-only-small-loops
> -Target Undocumented Var(unroll_only_small_loops) Init(0) Save
> +Target Undocumented Var(unroll_only_small_loops) Init(0) Save EnabledBy(funroll-loops)
> ; Use conservative small loop unrolling.
>
> mpower9-misc
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][V2] rs6000: Remove unnecessary option manipulation.
2021-11-04 12:36 [PATCH][V2] rs6000: Remove unnecessary option manipulation Martin Liška
2021-11-11 16:42 ` Martin Liška
@ 2021-11-11 17:52 ` Segher Boessenkool
2021-11-12 14:34 ` Martin Liška
1 sibling, 1 reply; 6+ messages in thread
From: Segher Boessenkool @ 2021-11-11 17:52 UTC (permalink / raw)
To: Martin Liška; +Cc: GCC Patches
Hi!
On Thu, Nov 04, 2021 at 01:36:06PM +0100, Martin Liška wrote:
> Sending the patch in a separate thread.
You forgot to send the commit message though?
> * config/rs6000/rs6000.c (rs6000_override_options_after_change):
> Do not set flag_rename_registers, it's already enabled with
> EnabledBy(funroll-loops).
> Use EnabledBy for unroll_only_small_loops.
> * config/rs6000/rs6000.opt: Use EnabledBy for
> unroll_only_small_loops.
Please don't put newlines in random places. It makes reading changelogs
much harder than needed.
> --- a/gcc/config/rs6000/rs6000.c
> +++ b/gcc/config/rs6000/rs6000.c
> @@ -3472,13 +3472,8 @@ rs6000_override_options_after_change (void)
> /* Explicit -funroll-loops turns -munroll-only-small-loops off, and
> turns -frename-registers on. */
> if ((OPTION_SET_P (flag_unroll_loops) && flag_unroll_loops)
> - || (OPTION_SET_P (flag_unroll_all_loops)
> - && flag_unroll_all_loops))
> + || (OPTION_SET_P (flag_unroll_all_loops) && flag_unroll_all_loops))
> {
> - if (!OPTION_SET_P (unroll_only_small_loops))
> - unroll_only_small_loops = 0;
> - if (!OPTION_SET_P (flag_rename_registers))
> - flag_rename_registers = 1;
> if (!OPTION_SET_P (flag_cunroll_grow_size))
> flag_cunroll_grow_size = 1;
> }
So some explanation for these two changes would be good to have.
> diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt
> index 9d7878f144a..faeb7423ca7 100644
> --- a/gcc/config/rs6000/rs6000.opt
> +++ b/gcc/config/rs6000/rs6000.opt
> @@ -546,7 +546,7 @@ Target Undocumented Var(rs6000_optimize_swaps) Init(1)
> Save
> Analyze and remove doubleword swaps from VSX computations.
>
> munroll-only-small-loops
> -Target Undocumented Var(unroll_only_small_loops) Init(0) Save
> +Target Undocumented Var(unroll_only_small_loops) Init(0) Save
> EnabledBy(funroll-loops)
You used format=flowed it seems? Don't. Patches are mangled with it :-(
Segher
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][V2] rs6000: Remove unnecessary option manipulation.
2021-11-11 17:52 ` Segher Boessenkool
@ 2021-11-12 14:34 ` Martin Liška
2021-11-12 15:58 ` Segher Boessenkool
0 siblings, 1 reply; 6+ messages in thread
From: Martin Liška @ 2021-11-12 14:34 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: GCC Patches
On 11/11/21 18:52, Segher Boessenkool wrote:
> Hi!
>
> On Thu, Nov 04, 2021 at 01:36:06PM +0100, Martin Liška wrote:
>> Sending the patch in a separate thread.
>
Hello.
> You forgot to send the commit message though?
No, the patch is simple so I didn't write any message (except commit title).
>
>> * config/rs6000/rs6000.c (rs6000_override_options_after_change):
>> Do not set flag_rename_registers, it's already enabled with
>> EnabledBy(funroll-loops).
>> Use EnabledBy for unroll_only_small_loops.
>> * config/rs6000/rs6000.opt: Use EnabledBy for
>> unroll_only_small_loops.
>
> Please don't put newlines in random places. It makes reading changelogs
> much harder than needed.
All right, I'm going to update it in V3.
>
>> --- a/gcc/config/rs6000/rs6000.c
>> +++ b/gcc/config/rs6000/rs6000.c
>> @@ -3472,13 +3472,8 @@ rs6000_override_options_after_change (void)
>> /* Explicit -funroll-loops turns -munroll-only-small-loops off, and
>> turns -frename-registers on. */
>> if ((OPTION_SET_P (flag_unroll_loops) && flag_unroll_loops)
>> - || (OPTION_SET_P (flag_unroll_all_loops)
>> - && flag_unroll_all_loops))
>> + || (OPTION_SET_P (flag_unroll_all_loops) && flag_unroll_all_loops))
>> {
>> - if (!OPTION_SET_P (unroll_only_small_loops))
>> - unroll_only_small_loops = 0;
>> - if (!OPTION_SET_P (flag_rename_registers))
>> - flag_rename_registers = 1;
>> if (!OPTION_SET_P (flag_cunroll_grow_size))
>> flag_cunroll_grow_size = 1;
>> }
>
> So some explanation for these two changes would be good to have.
It's explained in the ChangeLog entry.
>
>> diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt
>> index 9d7878f144a..faeb7423ca7 100644
>> --- a/gcc/config/rs6000/rs6000.opt
>> +++ b/gcc/config/rs6000/rs6000.opt
>> @@ -546,7 +546,7 @@ Target Undocumented Var(rs6000_optimize_swaps) Init(1)
>> Save
>> Analyze and remove doubleword swaps from VSX computations.
>>
>> munroll-only-small-loops
>> -Target Undocumented Var(unroll_only_small_loops) Init(0) Save
>> +Target Undocumented Var(unroll_only_small_loops) Init(0) Save
>> EnabledBy(funroll-loops)
>
> You used format=flowed it seems? Don't. Patches are mangled with it :-(
No, it's correct:
https://gcc.gnu.org/pipermail/gcc-patches/2021-November/583310.html
Martin
>
>
> Segher
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][V2] rs6000: Remove unnecessary option manipulation.
2021-11-12 14:34 ` Martin Liška
@ 2021-11-12 15:58 ` Segher Boessenkool
2021-11-12 16:13 ` Martin Liška
0 siblings, 1 reply; 6+ messages in thread
From: Segher Boessenkool @ 2021-11-12 15:58 UTC (permalink / raw)
To: Martin Liška; +Cc: GCC Patches
On Fri, Nov 12, 2021 at 03:34:17PM +0100, Martin Liška wrote:
> On 11/11/21 18:52, Segher Boessenkool wrote:
> >You forgot to send the commit message though?
>
> No, the patch is simple so I didn't write any message (except commit title).
How is a maintainer supposed to know what the patch is about, then? Not
all of us are clairvoyant.
> >>--- a/gcc/config/rs6000/rs6000.c
> >>+++ b/gcc/config/rs6000/rs6000.c
> >>@@ -3472,13 +3472,8 @@ rs6000_override_options_after_change (void)
> >> /* Explicit -funroll-loops turns -munroll-only-small-loops off, and
> >> turns -frename-registers on. */
> >> if ((OPTION_SET_P (flag_unroll_loops) && flag_unroll_loops)
> >>- || (OPTION_SET_P (flag_unroll_all_loops)
> >>- && flag_unroll_all_loops))
> >>+ || (OPTION_SET_P (flag_unroll_all_loops) &&
> >>flag_unroll_all_loops))
> >> {
> >>- if (!OPTION_SET_P (unroll_only_small_loops))
> >>- unroll_only_small_loops = 0;
> >>- if (!OPTION_SET_P (flag_rename_registers))
> >>- flag_rename_registers = 1;
> >> if (!OPTION_SET_P (flag_cunroll_grow_size))
> >> flag_cunroll_grow_size = 1;
> >> }
> >
> >So some explanation for these two changes would be good to have.
>
> It's explained in the ChangeLog entry.
It is not. Besides, a changelog should describe *what* changed, not
*why*, anyway.
> >>diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt
> >>index 9d7878f144a..faeb7423ca7 100644
> >>--- a/gcc/config/rs6000/rs6000.opt
> >>+++ b/gcc/config/rs6000/rs6000.opt
> >>@@ -546,7 +546,7 @@ Target Undocumented Var(rs6000_optimize_swaps) Init(1)
> >>Save
> >> Analyze and remove doubleword swaps from VSX computations.
> >>
> >> munroll-only-small-loops
> >>-Target Undocumented Var(unroll_only_small_loops) Init(0) Save
> >>+Target Undocumented Var(unroll_only_small_loops) Init(0) Save
> >>EnabledBy(funroll-loops)
> >
> >You used format=flowed it seems? Don't. Patches are mangled with it :-(
>
> No, it's correct:
> https://gcc.gnu.org/pipermail/gcc-patches/2021-November/583310.html
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
It is not correct. Please fix.
Segher
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][V2] rs6000: Remove unnecessary option manipulation.
2021-11-12 15:58 ` Segher Boessenkool
@ 2021-11-12 16:13 ` Martin Liška
0 siblings, 0 replies; 6+ messages in thread
From: Martin Liška @ 2021-11-12 16:13 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: GCC Patches
On 11/12/21 16:58, Segher Boessenkool wrote:
> On Fri, Nov 12, 2021 at 03:34:17PM +0100, Martin Liška wrote:
>> On 11/11/21 18:52, Segher Boessenkool wrote:
>>> You forgot to send the commit message though?
>>
>> No, the patch is simple so I didn't write any message (except commit title).
>
> How is a maintainer supposed to know what the patch is about, then? Not
> all of us are clairvoyant.
Oh yeah, lemme explain it.
>
>>>> --- a/gcc/config/rs6000/rs6000.c
>>>> +++ b/gcc/config/rs6000/rs6000.c
>>>> @@ -3472,13 +3472,8 @@ rs6000_override_options_after_change (void)
>>>> /* Explicit -funroll-loops turns -munroll-only-small-loops off, and
>>>> turns -frename-registers on. */
>>>> if ((OPTION_SET_P (flag_unroll_loops) && flag_unroll_loops)
>>>> - || (OPTION_SET_P (flag_unroll_all_loops)
>>>> - && flag_unroll_all_loops))
>>>> + || (OPTION_SET_P (flag_unroll_all_loops) &&
>>>> flag_unroll_all_loops))
>>>> {
>>>> - if (!OPTION_SET_P (unroll_only_small_loops))
>>>> - unroll_only_small_loops = 0;
>>>> - if (!OPTION_SET_P (flag_rename_registers))
>>>> - flag_rename_registers = 1;
>>>> if (!OPTION_SET_P (flag_cunroll_grow_size))
>>>> flag_cunroll_grow_size = 1;
>>>> }
>>>
>>> So some explanation for these two changes would be good to have.
>>
>> It's explained in the ChangeLog entry.
>
> It is not. Besides, a changelog should describe *what* changed, not
> *why*, anyway.
All right.
>
>>>> diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt
>>>> index 9d7878f144a..faeb7423ca7 100644
>>>> --- a/gcc/config/rs6000/rs6000.opt
>>>> +++ b/gcc/config/rs6000/rs6000.opt
>>>> @@ -546,7 +546,7 @@ Target Undocumented Var(rs6000_optimize_swaps) Init(1)
>>>> Save
>>>> Analyze and remove doubleword swaps from VSX computations.
>>>>
>>>> munroll-only-small-loops
>>>> -Target Undocumented Var(unroll_only_small_loops) Init(0) Save
>>>> +Target Undocumented Var(unroll_only_small_loops) Init(0) Save
>>>> EnabledBy(funroll-loops)
>>>
>>> You used format=flowed it seems? Don't. Patches are mangled with it :-(
>>
>> No, it's correct:
>> https://gcc.gnu.org/pipermail/gcc-patches/2021-November/583310.html
>
> Content-Type: text/plain; charset=UTF-8; format=flowed
> Content-Transfer-Encoding: 8bit
>
> It is not correct. Please fix.
Ok, I've just used directly git send-email, please search for V4.
Thanks,
Martin
>
>
> Segher
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-11-12 16:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-04 12:36 [PATCH][V2] rs6000: Remove unnecessary option manipulation Martin Liška
2021-11-11 16:42 ` Martin Liška
2021-11-11 17:52 ` Segher Boessenkool
2021-11-12 14:34 ` Martin Liška
2021-11-12 15:58 ` Segher Boessenkool
2021-11-12 16:13 ` Martin Liška
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).