WIP Move 'pass_fast_rtl_dce' from 'pass_postreload' into 'pass_late_compilation' (was: nvptx vs. [PATCH] Add a late-combine pass [PR106594])

2024-07-01 Thread Thomas Schwinge
Hi! On 2024-06-28T00:41:54+0200, I wrote: > On 2024-06-27T23:20:18+0200, I wrote: >> On 2024-06-27T22:27:21+0200, I wrote: >>> On 2024-06-27T18:49:17+0200, I wrote: On 2023-10-24T19:49:10+0100, Richard Sandiford wrote: > This patch adds a combine pass that runs late in the

Re: nvptx vs. [PATCH] Add a late-combine pass [PR106594]

2024-07-01 Thread Thomas Schwinge
Hi Richard! On 2024-06-28T17:48:30+0100, Richard Sandiford wrote: > Richard Sandiford writes: >> Thomas Schwinge writes: >>> On 2024-06-27T23:20:18+0200, I wrote: On 2024-06-27T22:27:21+0200, I wrote: > On 2024-06-27T18:49:17+0200, I wrote: >> On 2023-10-24T19:49:10+0100, Richard

Re: nvptx vs. [PATCH] Add a late-combine pass [PR106594]

2024-06-28 Thread Richard Sandiford
Richard Sandiford writes: > Thomas Schwinge writes: >> Hi! >> >> On 2024-06-27T23:20:18+0200, I wrote: >>> On 2024-06-27T22:27:21+0200, I wrote: On 2024-06-27T18:49:17+0200, I wrote: > On 2023-10-24T19:49:10+0100, Richard Sandiford > wrote: >> This patch adds a combine pass

Re: nvptx vs. [PATCH] Add a late-combine pass [PR106594]

2024-06-28 Thread Richard Sandiford
Thomas Schwinge writes: > Hi! > > On 2024-06-27T23:20:18+0200, I wrote: >> On 2024-06-27T22:27:21+0200, I wrote: >>> On 2024-06-27T18:49:17+0200, I wrote: On 2023-10-24T19:49:10+0100, Richard Sandiford wrote: > This patch adds a combine pass that runs late in the pipeline. >>> >>>

RE: nvptx vs. [PATCH] Add a late-combine pass [PR106594]

2024-06-28 Thread Roger Sayle
.com; gcc-patches@gcc.gnu.org; > Tom de Vries ; Roger Sayle > Subject: Re: nvptx vs. [PATCH] Add a late-combine pass [PR106594] > > Hi! > > On 2024-06-27T22:27:21+0200, I wrote: > > On 2024-06-27T18:49:17+0200, I wrote: > >> On 2023-10-24T19:49:10+0100, Richard Sandiford

Re: nvptx vs. [PATCH] Add a late-combine pass [PR106594]

2024-06-27 Thread Thomas Schwinge
Hi! On 2024-06-27T23:20:18+0200, I wrote: > On 2024-06-27T22:27:21+0200, I wrote: >> On 2024-06-27T18:49:17+0200, I wrote: >>> On 2023-10-24T19:49:10+0100, Richard Sandiford >>> wrote: This patch adds a combine pass that runs late in the pipeline. >> >> [After sending, I realized I replied

Re: nvptx vs. [PATCH] Add a late-combine pass [PR106594]

2024-06-27 Thread Thomas Schwinge
Hi! On 2024-06-27T22:27:21+0200, I wrote: > On 2024-06-27T18:49:17+0200, I wrote: >> On 2023-10-24T19:49:10+0100, Richard Sandiford >> wrote: >>> This patch adds a combine pass that runs late in the pipeline. > > [After sending, I realized I replied to a previous thread of this work.] > >> I've

Re: nvptx vs. [PATCH] Add a late-combine pass [PR106594]

2024-06-27 Thread Thomas Schwinge
Hi! On 2024-06-27T18:49:17+0200, I wrote: > On 2023-10-24T19:49:10+0100, Richard Sandiford > wrote: >> This patch adds a combine pass that runs late in the pipeline. [After sending, I realized I replied to a previous thread of this work.] > I've beek looking a bit through recent nvptx target

nvptx vs. [PATCH] Add a late-combine pass [PR106594]

2024-06-27 Thread Thomas Schwinge
Hi! On 2023-10-24T19:49:10+0100, Richard Sandiford wrote: > This patch adds a combine pass that runs late in the pipeline. Great! In context of 'nvptx vs. "fwprop: invoke change_is_worthwhile to judge if a replacement is worthwhile"', I've beek looking a bit

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

2024-06-25 Thread YunQiang Su
Just FYI. This patch does something to gcc.target/mips/madd-8.c, and gcc.target/mips/msub-8.c. -PASS: gcc.target/mips/madd-8.c -O2 scan-assembler \tmul\t -PASS: gcc.target/mips/madd-8.c -O2 scan-assembler-not \tmadd\t -PASS: gcc.target/mips/madd-8.c -O2 scan-assembler-not \tmflo\t

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

2024-06-25 Thread Richard Biener
On Mon, Jun 24, 2024 at 9:38 PM Segher Boessenkool wrote: > > I didn't see this before. Sigh. > > On Tue, Jan 02, 2024 at 09:47:11AM +, Richard Sandiford wrote: > > Segher Boessenkool writes: > > > On Tue, Oct 24, 2023 at 07:49:10PM +0100, Richard Sandiford wrote: > > >> This patch adds a

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

2024-06-24 Thread Segher Boessenkool
I didn't see this before. Sigh. On Tue, Jan 02, 2024 at 09:47:11AM +, Richard Sandiford wrote: > Segher Boessenkool writes: > > On Tue, Oct 24, 2023 at 07:49:10PM +0100, Richard Sandiford wrote: > >> This patch adds a combine pass that runs late in the pipeline. > > > > But it is not. It

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

2024-06-20 Thread Hongtao Liu
On Wed, Oct 25, 2023 at 2:49 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

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

2024-01-10 Thread Jeff Law
On 1/10/24 06:01, Richard Sandiford wrote: So to get an idea for expectations: would it be a requirement that a GCC 15 submission is enabled unconditionally and all known issues in the ports fixed? I don't think we need to fix those latent port issues as a hard requirement. I try to

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

2024-01-10 Thread Jeff Law
On 1/10/24 06:35, Richard Biener wrote: I think x86 maintainers could opt to disable the pass - so it would be opt-out. It's reasonable to expect them to fix the backend given there's nothing really wrong with the new pass, it just does something that wasn't done before at that point?

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

2024-01-10 Thread Richard Biener
On Wed, 10 Jan 2024, Richard Sandiford wrote: > Just a note that, following discussion on IRC, I'll pull this for > GCC 14 and resubmit for GCC 15. > > There was also pushback on IRC about making the pass opt-in. > Enabling it for x86_64 would mean fixing RPAD to use a representation > that is

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

2024-01-10 Thread Richard Sandiford
Just a note that, following discussion on IRC, I'll pull this for GCC 14 and resubmit for GCC 15. There was also pushback on IRC about making the pass opt-in. Enabling it for x86_64 would mean fixing RPAD to use a representation that is more robust against recombination, but as you can imagine,

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

2024-01-08 Thread Jeff Law
On 1/8/24 12:11, Richard Sandiford wrote: Thanks. That led me to the following, which seems a bit more plausible than my first attempt. I'll test it on aarch64-linux-gnu and x86_64-linux-gnu. Does it look OK? It looks reasonable to me. I'm going to send another failure (ICE in

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

2024-01-08 Thread Richard Sandiford
Jeff Law writes: > On 1/8/24 09:59, Richard Sandiford wrote: >> This is a bit of a hopeful stab, but is the problem that recog_data still >> had the previous contents of insn 3674, and so extract_insn_cached wrongly >> thought that it doesn't need to do anything? If so, does something like: >>

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

2024-01-08 Thread Jeff Law
On 1/8/24 09:59, Richard Sandiford wrote: This is a bit of a hopeful stab, but is the problem that recog_data still had the previous contents of insn 3674, and so extract_insn_cached wrongly thought that it doesn't need to do anything? If so, does something like: diff --git a/gcc/recog.cc

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

2024-01-08 Thread Richard Sandiford
Jeff Law writes: > On 1/8/24 04:52, Richard Sandiford wrote: >> Jeff Law writes: >>> The other issue that's been in the back of my mind is costing. But I >>> think the model here is combine without regards to cost. >> >> No, it does take costing into account. For size, it's the usual >> "sum

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

2024-01-08 Thread Jeff Law
On 1/8/24 04:52, Richard Sandiford wrote: Jeff Law writes: The other issue that's been in the back of my mind is costing. But I think the model here is combine without regards to cost. No, it does take costing into account. For size, it's the usual "sum up the before and after insn

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

2024-01-08 Thread Richard Sandiford
Jeff Law writes: > The other issue that's been in the back of my mind is costing. But I > think the model here is combine without regards to cost. No, it does take costing into account. For size, it's the usual "sum up the before and after insn costs and see which one is lower". For speed,

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

2024-01-07 Thread Jeff Law
On 1/5/24 10:35, Richard Sandiford wrote: Jeff Law writes: On 10/24/23 12:49, 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. So have you done any investigation on

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

2024-01-05 Thread Richard Sandiford
Jeff Law writes: > On 10/24/23 12:49, 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. > So have you done any investigation on cases caught by your new pass >

Re: Ping^3: [PATCH] Add a late-combine pass [PR106594]

2024-01-05 Thread YunQiang Su
I have tested this patch on mips64el: No regression.

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

2024-01-02 Thread Jeff Law
On 10/24/23 12:49, 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. So have you done any investigation on cases caught by your new pass between combine and split1 to

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

2024-01-02 Thread Richard Sandiford
Segher Boessenkool writes: > Hi! > > On Tue, Oct 24, 2023 at 07:49:10PM +0100, Richard Sandiford wrote: >> This patch adds a combine pass that runs late in the pipeline. > > But it is not. It is a completely new thing, and much closer to > fwprop than to combine, too. Well, it is a combine

Re: Ping^3: [PATCH] Add a late-combine pass [PR106594]

2023-12-31 Thread YunQiang Su
Richard Sandiford 于2023年12月30日周六 23:35写道: > > Ping^3 > I am testing it on MIPS. > --- a/gcc/common/config/aarch64/aarch64-common.cc > +++ b/gcc/common/config/aarch64/aarch64-common.cc > @@ -55,6 +55,7 @@ static const struct default_options > aarch_option_optimization_table[] = > {

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

2023-12-30 Thread Segher Boessenkool
Hi! On Tue, Oct 24, 2023 at 07:49:10PM +0100, Richard Sandiford wrote: > This patch adds a combine pass that runs late in the pipeline. But it is not. It is a completely new thing, and much closer to fwprop than to combine, too. Could you rename it to something else, please? Something less

Ping^3: [PATCH] Add a late-combine pass [PR106594]

2023-12-30 Thread Richard Sandiford
Ping^3 --- 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

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

2023-12-11 Thread Robin Dapp
Hi Richard, I have tested the new pass on riscv64 and while it did exhibit some regressions, none of them are critical. Mostly, test expectations will need to be adjusted - no new execution failures. As mentioned in the initial discussion it does help us get the behavior we want but, as of now,

Ping: [PATCH] Add a late-combine pass [PR106594]

2023-12-11 Thread Richard Sandiford
Ping --- 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

Ping: [PATCH] Add a late-combine pass [PR106594]

2023-11-30 Thread Richard Sandiford
Ping Richard Sandiford writes: > 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

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

2023-10-24 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