Re: [PATCH] rtl-optimization/80960 - avoid creating garbage RTL in DSE

2021-02-02 Thread Jakub Jelinek via Gcc-patches
On Tue, Feb 02, 2021 at 08:51:07AM +0100, Richard Biener wrote: > > Shouldn't we gather statistics from larger codebase first and perhaps > > compare against tree-ssa-dse statistics? I mean, in many functions there > > are no DSE opportunities at all. > > Of course. Some DSE will definitely be r

Re: [PATCH] rtl-optimization/80960 - avoid creating garbage RTL in DSE

2021-02-01 Thread Richard Biener
On Mon, 1 Feb 2021, Jakub Jelinek wrote: > On Mon, Feb 01, 2021 at 12:54:50PM -0700, Jeff Law wrote: > > >>> So I see no difference for stage2-gcc/*.o dse1/dse2 with/without the > > >>> patch but counts are _extremely_ small. Statistics: > > >>> > > >>> 70148 dse: local deletions = 0, global de

Re: [PATCH] rtl-optimization/80960 - avoid creating garbage RTL in DSE

2021-02-01 Thread Jakub Jelinek via Gcc-patches
On Mon, Feb 01, 2021 at 12:54:50PM -0700, Jeff Law wrote: > >>> So I see no difference for stage2-gcc/*.o dse1/dse2 with/without the > >>> patch but counts are _extremely_ small. Statistics: > >>> > >>> 70148 dse: local deletions = 0, global deletions = 0 > >>> 32 dse: local deletions = 0,

Re: [PATCH] rtl-optimization/80960 - avoid creating garbage RTL in DSE

2021-02-01 Thread Jeff Law via Gcc-patches
On 2/1/21 12:47 PM, Richard Biener wrote: > On February 1, 2021 8:34:35 PM GMT+01:00, Jeff Law wrote: >> >> On 1/28/21 1:09 AM, Richard Biener wrote: >>> On Wed, 27 Jan 2021, Jakub Jelinek wrote: >>> On Wed, Jan 27, 2021 at 03:40:38PM +0100, Richard Biener wrote: > The following avoids

Re: [PATCH] rtl-optimization/80960 - avoid creating garbage RTL in DSE

2021-02-01 Thread Richard Biener
On February 1, 2021 8:34:35 PM GMT+01:00, Jeff Law wrote: > > >On 1/28/21 1:09 AM, Richard Biener wrote: >> On Wed, 27 Jan 2021, Jakub Jelinek wrote: >> >>> On Wed, Jan 27, 2021 at 03:40:38PM +0100, Richard Biener wrote: The following avoids repeatedly turning VALUE RTXen into sth useful

Re: [PATCH] rtl-optimization/80960 - avoid creating garbage RTL in DSE

2021-02-01 Thread Jeff Law via Gcc-patches
On 1/28/21 1:09 AM, Richard Biener wrote: > On Wed, 27 Jan 2021, Jakub Jelinek wrote: > >> On Wed, Jan 27, 2021 at 03:40:38PM +0100, Richard Biener wrote: >>> The following avoids repeatedly turning VALUE RTXen into >>> sth useful and re-applying a constant offset through get_addr >>> via DSE ch

Re: [PATCH] rtl-optimization/80960 - avoid creating garbage RTL in DSE

2021-01-28 Thread Richard Biener
On Wed, 27 Jan 2021, Jakub Jelinek wrote: > On Wed, Jan 27, 2021 at 03:40:38PM +0100, Richard Biener wrote: > > The following avoids repeatedly turning VALUE RTXen into > > sth useful and re-applying a constant offset through get_addr > > via DSE check_mem_read_rtx. Instead perform this once for

Re: [PATCH] rtl-optimization/80960 - avoid creating garbage RTL in DSE

2021-01-27 Thread Jakub Jelinek via Gcc-patches
On Wed, Jan 27, 2021 at 05:37:54PM +0100, Richard Biener wrote: > Sure, more micro-optimizing is possible, including passing a flag > to canon_true_dependence whether the addr RTX already had get_addr > called on it. And pass in the offset as poly-rtx-int and make > get_addr apply it if not zero.

Re: [PATCH] rtl-optimization/80960 - avoid creating garbage RTL in DSE

2021-01-27 Thread Richard Biener
On Wed, 27 Jan 2021, Jakub Jelinek wrote: > On Wed, Jan 27, 2021 at 04:16:22PM +0100, Richard Biener wrote: > > I can check but all immediate first uses of mem_addr are in > > true_dependece_1 which does x_addr = get_addr (x_addr); as the > > first thing on it. So the concern would be that > > ge

Re: [PATCH] rtl-optimization/80960 - avoid creating garbage RTL in DSE

2021-01-27 Thread Jakub Jelinek via Gcc-patches
On Wed, Jan 27, 2021 at 04:16:22PM +0100, Richard Biener wrote: > I can check but all immediate first uses of mem_addr are in > true_dependece_1 which does x_addr = get_addr (x_addr); as the > first thing on it. So the concern would be that > get_addr (get_addr (x_addr)) != get_addr (x_addr) which

Re: [PATCH] rtl-optimization/80960 - avoid creating garbage RTL in DSE

2021-01-27 Thread Richard Biener
On Wed, 27 Jan 2021, Jakub Jelinek wrote: > On Wed, Jan 27, 2021 at 03:40:38PM +0100, Richard Biener wrote: > > The following avoids repeatedly turning VALUE RTXen into > > sth useful and re-applying a constant offset through get_addr > > via DSE check_mem_read_rtx. Instead perform this once for

Re: [PATCH] rtl-optimization/80960 - avoid creating garbage RTL in DSE

2021-01-27 Thread Jakub Jelinek via Gcc-patches
On Wed, Jan 27, 2021 at 03:40:38PM +0100, Richard Biener wrote: > The following avoids repeatedly turning VALUE RTXen into > sth useful and re-applying a constant offset through get_addr > via DSE check_mem_read_rtx. Instead perform this once for > all stores to be visited in check_mem_read_rtx.

[PATCH] rtl-optimization/80960 - avoid creating garbage RTL in DSE

2021-01-27 Thread Richard Biener
The following avoids repeatedly turning VALUE RTXen into sth useful and re-applying a constant offset through get_addr via DSE check_mem_read_rtx. Instead perform this once for all stores to be visited in check_mem_read_rtx. This avoids allocating 1.6GB of garbage PLUS RTXen on the PR80960 testca