Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE - v3

2017-01-11 Thread Jeff Law
On 01/04/2017 06:23 AM, Richard Biener wrote: On Wed, Jan 4, 2017 at 2:22 PM, Richard Biener wrote: On Thu, Dec 22, 2016 at 7:26 AM, Jeff Law wrote: This is the first of the 4 part patchkit to address deficiencies in our DSE implementation. This patch addresses the P2 regression 33562 which

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE - v3

2017-01-11 Thread Jeff Law
On 01/04/2017 06:22 AM, Richard Biener wrote: Bootstrapped and regression tested on x86_64-linux-gnu. OK for the trunk? New functions in sbitmap.c lack function comments. Bah. Sophomoric on my part. Fixed. bitmap_count_bits fails to guard against GCC_VERSION >= 3400 (the version is not

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE - v3

2017-01-04 Thread Richard Biener
On Wed, Jan 4, 2017 at 2:22 PM, Richard Biener wrote: > On Thu, Dec 22, 2016 at 7:26 AM, Jeff Law wrote: >> This is the first of the 4 part patchkit to address deficiencies in our DSE >> implementation. >> >> This patch addresses the P2 regression 33562 which has been a low priority >> regression

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE - v3

2017-01-04 Thread Richard Biener
On Thu, Dec 22, 2016 at 7:26 AM, Jeff Law wrote: > This is the first of the 4 part patchkit to address deficiencies in our DSE > implementation. > > This patch addresses the P2 regression 33562 which has been a low priority > regression since gcc-4.3. To summarize, DSE no longer has the ability t

[RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE - v3

2016-12-21 Thread Jeff Law
This is the first of the 4 part patchkit to address deficiencies in our DSE implementation. This patch addresses the P2 regression 33562 which has been a low priority regression since gcc-4.3. To summarize, DSE no longer has the ability to detect an aggregate store as dead if subsequent store

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE

2016-12-21 Thread Jeff Law
On 12/16/2016 06:57 AM, Richard Biener wrote: Apart from what Trevor says about using sbitmaps (try to avoid the initial zeroing please) and the missed freeing (you can use auto_[s]bitmap?) some comments below. New version uses sbitmaps and avoids zero-ing when we can. +static void +trim_comp

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE

2016-12-21 Thread Jeff Law
On 12/16/2016 12:29 AM, Trevor Saunders wrote: On Thu, Dec 15, 2016 at 06:54:43PM -0700, Jeff Law wrote: unsigned cnt = 0; + bitmap live_bytes = NULL; + bitmap orig_live_bytes = NULL; *use_stmt = NULL; + /* REF is a memory write. Go ahead and get its base, size, extent + informat

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE

2016-12-21 Thread Jeff Law
On 12/21/2016 06:43 AM, Trevor Saunders wrote: So a few interesting things have to be dealt if we want to make this change. I already mentioned the need to bias based on ref->offset so that the range of bytes we're tracking is represented 0..size. While we know the length of the potential dead s

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE

2016-12-21 Thread Trevor Saunders
On Sat, Dec 17, 2016 at 01:19:41AM -0700, Jeff Law wrote: > On 12/16/2016 12:29 AM, Trevor Saunders wrote: > > On Thu, Dec 15, 2016 at 06:54:43PM -0700, Jeff Law wrote: > > >unsigned cnt = 0; > > > + bitmap live_bytes = NULL; > > > + bitmap orig_live_bytes = NULL; > > > > > >*use_stmt =

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE

2016-12-17 Thread Richard Sandiford
Jeff Law writes: > This is the first of the 4 part patchkit to address deficiencies in our > DSE implementation. > > This patch addresses the P2 regression 33562 which has been a low > priority regression since gcc-4.3. To summarize, DSE no longer has the > ability to detect an aggregate store

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE

2016-12-17 Thread Richard Biener
On December 16, 2016 7:43:22 PM GMT+01:00, Jakub Jelinek wrote: >On Fri, Dec 16, 2016 at 06:35:58PM +, Joseph Myers wrote: >> On Thu, 15 Dec 2016, Jeff Law wrote: >> >> > This version attacks the problem by improving DSE to track stores >to memory at >> > a byte level. That allows us to det

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE

2016-12-17 Thread Jeff Law
On 12/16/2016 12:29 AM, Trevor Saunders wrote: On Thu, Dec 15, 2016 at 06:54:43PM -0700, Jeff Law wrote: unsigned cnt = 0; + bitmap live_bytes = NULL; + bitmap orig_live_bytes = NULL; *use_stmt = NULL; + /* REF is a memory write. Go ahead and get its base, size, extent + informat

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE

2016-12-16 Thread Jeff Law
On 12/16/2016 06:57 AM, Richard Biener wrote: On Fri, Dec 16, 2016 at 2:54 AM, Jeff Law wrote: + /* REF is a memory write. Go ahead and get its base, size, extent + information and encode the bytes written into LIVE_BYTES. We can + handle any case where we have a known base and maxim

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE

2016-12-16 Thread Jeff Law
On 12/16/2016 06:57 AM, Richard Biener wrote: On Fri, Dec 16, 2016 at 2:54 AM, Jeff Law wrote: + { + /* STMT might be partially dead and we may be able to reduce +how many memory locations it stores into. */ + if (live_bytes + && !bitmap_equal_p (l

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE

2016-12-16 Thread Joseph Myers
On Fri, 16 Dec 2016, Jakub Jelinek wrote: > On Fri, Dec 16, 2016 at 06:35:58PM +, Joseph Myers wrote: > > On Thu, 15 Dec 2016, Jeff Law wrote: > > > > > This version attacks the problem by improving DSE to track stores to > > > memory at > > > a byte level. That allows us to determine if a

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE

2016-12-16 Thread Jeff Law
On 12/16/2016 11:43 AM, Jakub Jelinek wrote: On Fri, Dec 16, 2016 at 06:35:58PM +, Joseph Myers wrote: On Thu, 15 Dec 2016, Jeff Law wrote: This version attacks the problem by improving DSE to track stores to memory at a byte level. That allows us to determine if a series of stores comple

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE

2016-12-16 Thread Jeff Law
On 12/16/2016 11:35 AM, Joseph Myers wrote: On Thu, 15 Dec 2016, Jeff Law wrote: This version attacks the problem by improving DSE to track stores to memory at a byte level. That allows us to determine if a series of stores completely covers an earlier store (thus making the earlier store dead

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE

2016-12-16 Thread Jakub Jelinek
On Fri, Dec 16, 2016 at 06:35:58PM +, Joseph Myers wrote: > On Thu, 15 Dec 2016, Jeff Law wrote: > > > This version attacks the problem by improving DSE to track stores to memory > > at > > a byte level. That allows us to determine if a series of stores completely > > covers an earlier store

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE

2016-12-16 Thread Joseph Myers
On Thu, 15 Dec 2016, Jeff Law wrote: > This version attacks the problem by improving DSE to track stores to memory at > a byte level. That allows us to determine if a series of stores completely > covers an earlier store (thus making the earlier store dead). Question: suppose you have an assignm

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE

2016-12-16 Thread Jeff Law
On 12/16/2016 06:57 AM, Richard Biener wrote: Apart from what Trevor says about using sbitmaps (try to avoid the initial zeroing please) and the missed freeing (you can use auto_[s]bitmap?) some comments below. In progress. We'll need a few routines for sbitmaps that don't currently exist, but

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE

2016-12-16 Thread Jeff Law
On 12/16/2016 12:29 AM, Trevor Saunders wrote: On Thu, Dec 15, 2016 at 06:54:43PM -0700, Jeff Law wrote: unsigned cnt = 0; + bitmap live_bytes = NULL; + bitmap orig_live_bytes = NULL; *use_stmt = NULL; + /* REF is a memory write. Go ahead and get its base, size, extent + informat

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE

2016-12-16 Thread Richard Biener
On Fri, Dec 16, 2016 at 2:54 AM, Jeff Law wrote: > > This is the first of the 4 part patchkit to address deficiencies in our DSE > implementation. > > > This patch addresses the P2 regression 33562 which has been a low priority > regression since gcc-4.3. To summarize, DSE no longer has the abili

Re: [RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE

2016-12-15 Thread Trevor Saunders
On Thu, Dec 15, 2016 at 06:54:43PM -0700, Jeff Law wrote: >unsigned cnt = 0; > + bitmap live_bytes = NULL; > + bitmap orig_live_bytes = NULL; > >*use_stmt = NULL; > > + /* REF is a memory write. Go ahead and get its base, size, extent > + information and encode the bytes written

[RFA] [PR tree-optimization/33562] [PATCH 1/4] Byte tracking in DSE

2016-12-15 Thread Jeff Law
This is the first of the 4 part patchkit to address deficiencies in our DSE implementation. This patch addresses the P2 regression 33562 which has been a low priority regression since gcc-4.3. To summarize, DSE no longer has the ability to detect an aggregate store as dead if subsequent st