Re: [PATCH] Add a bit dislike for separate mem alternative when op is REG_P.

2022-05-31 Thread Hongtao Liu via Gcc-patches
On Wed, Jun 1, 2022 at 12:40 AM Richard Sandiford wrote: > > Vladimir Makarov via Gcc-patches writes: > > On 2022-05-29 23:05, Hongtao Liu wrote: > >> On Fri, May 27, 2022 at 5:12 AM Vladimir Makarov via Gcc-patches > >> wrote: > >>> > >>> On 2022-05-24 23:39, liuhongt wrote: > Rigt now,

Re: [PATCH] Add a bit dislike for separate mem alternative when op is REG_P.

2022-05-31 Thread Richard Sandiford via Gcc-patches
Vladimir Makarov via Gcc-patches writes: > On 2022-05-29 23:05, Hongtao Liu wrote: >> On Fri, May 27, 2022 at 5:12 AM Vladimir Makarov via Gcc-patches >> wrote: >>> >>> On 2022-05-24 23:39, liuhongt wrote: Rigt now, mem_cost for separate mem alternative is 1 * frequency which is pretty

Re: [PATCH] Add a bit dislike for separate mem alternative when op is REG_P.

2022-05-31 Thread Vladimir Makarov via Gcc-patches
On 2022-05-29 23:05, Hongtao Liu wrote: On Fri, May 27, 2022 at 5:12 AM Vladimir Makarov via Gcc-patches wrote: On 2022-05-24 23:39, liuhongt wrote: Rigt now, mem_cost for separate mem alternative is 1 * frequency which is pretty small and caused the unnecessary SSE spill in the PR, I've

Re: [PATCH] Add a bit dislike for separate mem alternative when op is REG_P.

2022-05-30 Thread Alexander Monakov via Gcc-patches
On Mon, 30 May 2022, Hongtao Liu wrote: > On Mon, May 30, 2022 at 3:44 PM Alexander Monakov wrote: > > > > On Mon, 30 May 2022, Hongtao Liu wrote: > > > > > On Mon, May 30, 2022 at 2:22 PM Alexander Monakov via Gcc-patches > > > wrote: > > > > > > > > > > The spill is mainly decided by 3 insns

Re: [PATCH] Add a bit dislike for separate mem alternative when op is REG_P.

2022-05-30 Thread Hongtao Liu via Gcc-patches
On Mon, May 30, 2022 at 3:44 PM Alexander Monakov wrote: > > On Mon, 30 May 2022, Hongtao Liu wrote: > > > On Mon, May 30, 2022 at 2:22 PM Alexander Monakov via Gcc-patches > > wrote: > > > > > > > > The spill is mainly decided by 3 insns related to r92 > > > > > > > > 283(insn 3 61 4 2 (set

Re: [PATCH] Add a bit dislike for separate mem alternative when op is REG_P.

2022-05-30 Thread Alexander Monakov via Gcc-patches
On Mon, 30 May 2022, Hongtao Liu wrote: > On Mon, May 30, 2022 at 2:22 PM Alexander Monakov via Gcc-patches > wrote: > > > > > > The spill is mainly decided by 3 insns related to r92 > > > > > > 283(insn 3 61 4 2 (set (reg/v:SF 92 [ x ]) > > > 284(reg:SF 102)) "test3.c":7:1 142

Re: [PATCH] Add a bit dislike for separate mem alternative when op is REG_P.

2022-05-30 Thread Hongtao Liu via Gcc-patches
On Mon, May 30, 2022 at 2:22 PM Alexander Monakov via Gcc-patches wrote: > > > > In the PR, the spill happens in the initial basic block of the function, > > > i.e. > > > the one with the highest frequency. > > > > > > Also as noted in the PR, swapping the 'unlikely' branch to 'likely' > > >

RE: [PATCH] Add a bit dislike for separate mem alternative when op is REG_P.

2022-05-30 Thread Alexander Monakov via Gcc-patches
> > In the PR, the spill happens in the initial basic block of the function, > > i.e. > > the one with the highest frequency. > > > > Also as noted in the PR, swapping the 'unlikely' branch to 'likely' avoids > > the spill, > > even though it does not affect the frequency of the initial basic

Re: [PATCH] Add a bit dislike for separate mem alternative when op is REG_P.

2022-05-29 Thread Hongtao Liu via Gcc-patches
On Fri, May 27, 2022 at 5:12 AM Vladimir Makarov via Gcc-patches wrote: > > > On 2022-05-24 23:39, liuhongt wrote: > > Rigt now, mem_cost for separate mem alternative is 1 * frequency which > > is pretty small and caused the unnecessary SSE spill in the PR, I've tried > > to rework backend cost

RE: [PATCH] Add a bit dislike for separate mem alternative when op is REG_P.

2022-05-29 Thread Liu, Hongtao via Gcc-patches
> -Original Message- > From: Alexander Monakov > Sent: Friday, May 27, 2022 5:39 PM > To: Liu, Hongtao > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] Add a bit dislike for separate mem alternative when op is > REG_P. > > On Wed, 25 May 2022, liuhongt via Gcc-patches wrote: > >

Re: [PATCH] Add a bit dislike for separate mem alternative when op is REG_P.

2022-05-27 Thread Alexander Monakov via Gcc-patches
On Wed, 25 May 2022, liuhongt via Gcc-patches wrote: > Rigt now, mem_cost for separate mem alternative is 1 * frequency which > is pretty small and caused the unnecessary SSE spill in the PR, I've tried > to rework backend cost model, but RA still not happy with that(regress > somewhere else). I

Re: [PATCH] Add a bit dislike for separate mem alternative when op is REG_P.

2022-05-26 Thread Vladimir Makarov via Gcc-patches
On 2022-05-24 23:39, liuhongt wrote: Rigt now, mem_cost for separate mem alternative is 1 * frequency which is pretty small and caused the unnecessary SSE spill in the PR, I've tried to rework backend cost model, but RA still not happy with that(regress somewhere else). I think the root cause

Re: [PATCH] Add a bit dislike for separate mem alternative when op is REG_P.

2022-05-24 Thread Hongtao Liu via Gcc-patches
On Wed, May 25, 2022 at 11:39 AM liuhongt via Gcc-patches wrote: > > Rigt now, mem_cost for separate mem alternative is 1 * frequency which > is pretty small and caused the unnecessary SSE spill in the PR, I've tried > to rework backend cost model, but RA still not happy with that(regress >

[PATCH] Add a bit dislike for separate mem alternative when op is REG_P.

2022-05-24 Thread liuhongt via Gcc-patches
Rigt now, mem_cost for separate mem alternative is 1 * frequency which is pretty small and caused the unnecessary SSE spill in the PR, I've tried to rework backend cost model, but RA still not happy with that(regress somewhere else). I think the root cause of this is cost for separate 'm'