Re: [PATCH][v4] GIMPLE store merging pass

2016-10-04 Thread Richard Biener
On Fri, Sep 30, 2016 at 6:57 PM, Kyrill Tkachov wrote: > Hi Richard, > > On 29/09/16 11:45, Richard Biener wrote: >> >> >> + gimple_seq seq = NULL; >> + unsigned int num_stmts = 0; >> + tree offset_type = get_type_for_merged_store (group); >> + tree last_vdef, new_vuse; >> + last_vdef = gimpl

Re: [PATCH][v4] GIMPLE store merging pass

2016-10-03 Thread Richard Biener
On October 3, 2016 3:02:04 PM GMT+02:00, Kyrill Tkachov wrote: >Hi Richard, >another question as I'm working through your comments... > >On 29/09/16 11:45, Richard Biener wrote: >> >>> + /* The region from the byte array that we're inserting into. >*/ >>> + tree ptr_wide_int >>> + =

Re: [PATCH][v4] GIMPLE store merging pass

2016-10-03 Thread Kyrill Tkachov
Hi Richard, another question as I'm working through your comments... On 29/09/16 11:45, Richard Biener wrote: + /* The region from the byte array that we're inserting into. */ + tree ptr_wide_int + = native_interpret_expr (dest_int_type, ptr + first_byte, +

Re: [PATCH][v4] GIMPLE store merging pass

2016-09-30 Thread Richard Biener
On September 30, 2016 4:43:10 PM GMT+02:00, Kyrill Tkachov wrote: > >On 30/09/16 15:36, Kyrill Tkachov wrote: >> Hi Richard, >> >> On 29/09/16 11:45, Richard Biener wrote: >>> + + /* In some cases get_inner_reference may return a + MEM_REF [ptr + byteoffset]. For

Re: [PATCH][v4] GIMPLE store merging pass

2016-09-30 Thread Kyrill Tkachov
Hi Richard, On 29/09/16 11:45, Richard Biener wrote: + gimple_seq seq = NULL; + unsigned int num_stmts = 0; + tree offset_type = get_type_for_merged_store (group); + tree last_vdef, new_vuse; + last_vdef = gimple_vdef (group->last_stmt); + new_vuse = gimple_vuse (group->last_stmt); + loc

Re: [PATCH][v4] GIMPLE store merging pass

2016-09-30 Thread Kyrill Tkachov
On 30/09/16 15:36, Kyrill Tkachov wrote: Hi Richard, On 29/09/16 11:45, Richard Biener wrote: + + /* In some cases get_inner_reference may return a + MEM_REF [ptr + byteoffset]. For the purposes of this pass + canonicalize the base_addr to MEM_REF [ptr] and take +

Re: [PATCH][v4] GIMPLE store merging pass

2016-09-30 Thread Kyrill Tkachov
Hi Richard, On 29/09/16 11:45, Richard Biener wrote: + + /* In some cases get_inner_reference may return a +MEM_REF [ptr + byteoffset]. For the purposes of this pass +canonicalize the base_addr to MEM_REF [ptr] and take +byteoffset i

Re: [PATCH][v4] GIMPLE store merging pass

2016-09-30 Thread Richard Biener
On Thu, 29 Sep 2016, Kyrill Tkachov wrote: > Hi Richard, > > Thanks for the detailed comments, I'll be working on addressing them. > Below are answers to some of your questions: > > On 29/09/16 11:45, Richard Biener wrote: > > > > + > > + /* If we're inserting a non-bytesized width or not at a

Re: [PATCH][v4] GIMPLE store merging pass

2016-09-29 Thread Kyrill Tkachov
On 29/09/16 16:37, Pat Haugen wrote: On 09/28/2016 10:59 AM, Bill Schmidt wrote: Bill, could you or someone else with access to Power benchmarking try this patch out on some benchmarks that you usually use? The new pass in this patch is on by default and can be turned off by -fno-store-mergi

Re: [PATCH][v4] GIMPLE store merging pass

2016-09-29 Thread Pat Haugen
On 09/28/2016 10:59 AM, Bill Schmidt wrote: >> Bill, could you or someone else with access to Power benchmarking try this >> patch out on some benchmarks >> > that you usually use? The new pass in this patch is on by default and can >> > be turned off by -fno-store-merging >> > if needed. Jakub

Re: [PATCH][v4] GIMPLE store merging pass

2016-09-29 Thread Kyrill Tkachov
Hi Richard, Thanks for the detailed comments, I'll be working on addressing them. Below are answers to some of your questions: On 29/09/16 11:45, Richard Biener wrote: + + /* If we're inserting a non-bytesized width or not at a byte boundary + use an intermediate wide_int to perform the b

Re: [PATCH][v4] GIMPLE store merging pass

2016-09-29 Thread Richard Biener
On Wed, 28 Sep 2016, Kyrill Tkachov wrote: > Hi all, > > This is v4 of the pass. It addresses feedback by Bernhard, including typo > fixes and > skipping of debug statements. > Also, I've extended it to handle the case from PR 23684 and included that > testcase > in the patch. Merging now trigge

Re: [PATCH][v4] GIMPLE store merging pass

2016-09-29 Thread Kyrill Tkachov
On 29/09/16 08:36, Richard Biener wrote: On Wed, 28 Sep 2016, Pat Haugen wrote: On 09/28/2016 10:54 AM, Kyrill Tkachov wrote: +fstore-merging +Common Var(flag_store_merging) Optimization +Use the tree store merging pass. + Did you purposely leave off "Report" for this option? I noticed the o

Re: [PATCH][v4] GIMPLE store merging pass

2016-09-29 Thread Richard Biener
On Wed, 28 Sep 2016, Pat Haugen wrote: > On 09/28/2016 10:54 AM, Kyrill Tkachov wrote: > > +fstore-merging > > +Common Var(flag_store_merging) Optimization > > +Use the tree store merging pass. > > + > > Did you purposely leave off "Report" for this option? I noticed the option > didn't show up

Re: [PATCH][v4] GIMPLE store merging pass

2016-09-28 Thread Pat Haugen
On 09/28/2016 10:54 AM, Kyrill Tkachov wrote: > +fstore-merging > +Common Var(flag_store_merging) Optimization > +Use the tree store merging pass. > + Did you purposely leave off "Report" for this option? I noticed the option didn't show up in the "options enabled:" section of the .s file when -

Re: [PATCH][v4] GIMPLE store merging pass

2016-09-28 Thread Kyrill Tkachov
On 28/09/16 16:59, Bill Schmidt wrote: On Sep 28, 2016, at 10:54 AM, Kyrill Tkachov wrote: Hi all, This is v4 of the pass. It addresses feedback by Bernhard, including typo fixes and skipping of debug statements. Also, I've extended it to handle the case from PR 23684 and included that tes

Re: [PATCH][v4] GIMPLE store merging pass

2016-09-28 Thread Bill Schmidt
On Sep 28, 2016, at 10:54 AM, Kyrill Tkachov wrote: > > Hi all, > > This is v4 of the pass. It addresses feedback by Bernhard, including typo > fixes and > skipping of debug statements. > Also, I've extended it to handle the case from PR 23684 and included that > testcase > in the patch. Mer

[PATCH][v4] GIMPLE store merging pass

2016-09-28 Thread Kyrill Tkachov
Hi all, This is v4 of the pass. It addresses feedback by Bernhard, including typo fixes and skipping of debug statements. Also, I've extended it to handle the case from PR 23684 and included that testcase in the patch. Merging now triggers more often. I've also added purging of dead EH edges t