rs6000: Properly default-disable late-combine passes [PR106594, PR115622, PR115633] (was: [PATCH 6/6] Add a late-combine pass [PR106594])

2024-06-25 Thread Thomas Schwinge
Hi! On 2024-06-25T10:07:47+0100, Richard Sandiford wrote: > Thomas Schwinge writes: >> On 2024-06-20T14:34:18+0100, Richard Sandiford >> wrote: >>> This patch adds a combine pass that runs late in the pipeline. >>> [...] >> >> Nice! >> >>> The patch [...] disables the pass by default on i386,

Re: [PATCH 6/6] Add a late-combine pass [PR106594]

2024-06-25 Thread Richard Sandiford
Thomas Schwinge writes: > Hi! > > On 2024-06-20T14:34:18+0100, Richard Sandiford > wrote: >> This patch adds a combine pass that runs late in the pipeline. >> [...] > > Nice! > >> The patch [...] disables the pass by default on i386, rs6000 >> and xtensa. > > Like here: > >> --- a/gcc/config/i38

Re: [PATCH 6/6] Add a late-combine pass [PR106594]

2024-06-25 Thread Thomas Schwinge
Hi! On 2024-06-20T14:34:18+0100, Richard Sandiford wrote: > This patch adds a combine pass that runs late in the pipeline. > [...] Nice! > The patch [...] disables the pass by default on i386, rs6000 > and xtensa. Like here: > --- a/gcc/config/i386/i386-options.cc > +++ b/gcc/config/i386/i38

Re: [PATCH 6/6] Add a late-combine pass [PR106594]

2024-06-24 Thread Richard Biener
On Mon, Jun 24, 2024 at 1:34 PM Richard Sandiford wrote: > > Richard Biener writes: > > On Mon, Jun 24, 2024 at 10:03 AM Richard Sandiford > > wrote: > >> > >> Richard Biener writes: > >> > On Sat, Jun 22, 2024 at 6:50 PM Richard Sandiford > >> >> The traditional (and IMO correct) way to handle

Re: [PATCH 6/6] Add a late-combine pass [PR106594]

2024-06-24 Thread Richard Sandiford
Richard Biener writes: > On Mon, Jun 24, 2024 at 10:03 AM Richard Sandiford > wrote: >> >> Richard Biener writes: >> > On Sat, Jun 22, 2024 at 6:50 PM Richard Sandiford >> >> The traditional (and IMO correct) way to handle this is to make the >> >> pattern reserve the temporary registers that it

Re: [PATCH 6/6] Add a late-combine pass [PR106594]

2024-06-24 Thread Richard Biener
On Mon, Jun 24, 2024 at 10:03 AM Richard Sandiford wrote: > > Richard Biener writes: > > On Sat, Jun 22, 2024 at 6:50 PM Richard Sandiford > >> The traditional (and IMO correct) way to handle this is to make the > >> pattern reserve the temporary registers that it needs, using > >> match_scratch

Re: [PATCH 6/6] Add a late-combine pass [PR106594]

2024-06-24 Thread Richard Sandiford
Richard Biener writes: > On Sat, Jun 22, 2024 at 6:50 PM Richard Sandiford >> The traditional (and IMO correct) way to handle this is to make the >> pattern reserve the temporary registers that it needs, using match_scratches. >> rs6000 has many examples of this. E.g.: >> >> (define_insn_and_spli

Re: [PATCH 6/6] Add a late-combine pass [PR106594]

2024-06-23 Thread Richard Biener
On Sat, Jun 22, 2024 at 6:50 PM Richard Sandiford wrote: > > Takayuki 'January June' Suwa writes: > > On 2024/06/20 22:34, Richard Sandiford wrote: > >> This patch adds a combine pass that runs late in the pipeline. > >> There are two instances: one between combine and split1, and one > >> after

Re: [PATCH 6/6] Add a late-combine pass [PR106594]

2024-06-22 Thread Takayuki 'January June' Suwa
Hi! On 2024/06/23 1:49, Richard Sandiford wrote: Takayuki 'January June' Suwa writes: On 2024/06/20 22:34, Richard Sandiford wrote: This patch adds a combine pass that runs late in the pipeline. There are two instances: one between combine and split1, and one after postreload. The pass curre

Re: [PATCH 6/6] Add a late-combine pass [PR106594]

2024-06-22 Thread Richard Sandiford
Takayuki 'January June' Suwa writes: > On 2024/06/20 22:34, Richard Sandiford wrote: >> This patch adds a combine pass that runs late in the pipeline. >> There are two instances: one between combine and split1, and one >> after postreload. >> >> The pass currently has a single objective: remove d

Re: [PATCH 6/6] Add a late-combine pass [PR106594]

2024-06-21 Thread Jeff Law
On 6/20/24 7:34 AM, Richard Sandiford wrote: This patch adds a combine pass that runs late in the pipeline. There are two instances: one between combine and split1, and one after postreload. The pass currently has a single objective: remove definitions by substituting into all uses. The pre-

Re: [PATCH 6/6] Add a late-combine pass [PR106594]

2024-06-21 Thread Richard Biener
On Fri, Jun 21, 2024 at 10:21 AM Richard Sandiford wrote: > > Richard Biener writes: > > [...] > > I wonder if you can amend doc/passes.texi, specifically noting differences > > between fwprop, combine and late-combine? > > Ooh, we have a doc/passes.texi? :) Somehow missed that. Yeah, I also us

Re: [PATCH 6/6] Add a late-combine pass [PR106594]

2024-06-21 Thread Richard Sandiford
Richard Biener writes: > [...] > I wonder if you can amend doc/passes.texi, specifically noting differences > between fwprop, combine and late-combine? Ooh, we have a doc/passes.texi? :) Somehow missed that. How about the patch below? Thanks, Richard diff --git a/gcc/doc/passes.texi b/gcc/do

Re: [PATCH 6/6] Add a late-combine pass [PR106594]

2024-06-21 Thread Richard Sandiford
Oleg Endo writes: > On Thu, 2024-06-20 at 14:34 +0100, Richard Sandiford wrote: >> >> I tried compiling at least one target per CPU directory and comparing >> the assembly output for parts of the GCC testsuite. This is just a way >> of getting a flavour of how the pass performs; it obviously isn

Re: [PATCH 6/6] Add a late-combine pass [PR106594]

2024-06-20 Thread Richard Biener
On Thu, Jun 20, 2024 at 3:37 PM Richard Sandiford wrote: > > This patch adds a combine pass that runs late in the pipeline. > There are two instances: one between combine and split1, and one > after postreload. > > The pass currently has a single objective: remove definitions by > substituting int

Re: [PATCH 6/6] Add a late-combine pass [PR106594]

2024-06-20 Thread Oleg Endo
On Thu, 2024-06-20 at 14:34 +0100, Richard Sandiford wrote: > > I tried compiling at least one target per CPU directory and comparing > the assembly output for parts of the GCC testsuite. This is just a way > of getting a flavour of how the pass performs; it obviously isn't a > meaningful bench

[PATCH 6/6] Add a late-combine pass [PR106594]

2024-06-20 Thread Richard Sandiford
This patch adds a combine pass that runs late in the pipeline. There are two instances: one between combine and split1, and one after postreload. The pass currently has a single objective: remove definitions by substituting into all uses. The pre-RA version tries to restrict itself to cases that