Re: [PATCH][4/n] Remove GENERIC stmt combining from SCCVN

2015-07-21 Thread Richard Biener
On Thu, 16 Jul 2015, Andrew MacLeod wrote: > On 07/16/2015 07:54 AM, Andrew MacLeod wrote: > > On 07/16/2015 03:27 AM, Richard Biener wrote: > > > On Wed, 15 Jul 2015, Andrew MacLeod wrote: > > > > > > > admittedly neither situation is very common I suspect, but it does seem > > > > like a > > >

Re: [PATCH][4/n] Remove GENERIC stmt combining from SCCVN

2015-07-16 Thread Andrew MacLeod
On 07/16/2015 07:54 AM, Andrew MacLeod wrote: On 07/16/2015 03:27 AM, Richard Biener wrote: On Wed, 15 Jul 2015, Andrew MacLeod wrote: admittedly neither situation is very common I suspect, but it does seem like a hidden gotchya waiting to happen. I guess we either want to checking-assert th

Re: [PATCH][4/n] Remove GENERIC stmt combining from SCCVN

2015-07-16 Thread Andrew MacLeod
On 07/16/2015 03:27 AM, Richard Biener wrote: On Wed, 15 Jul 2015, Andrew MacLeod wrote: admittedly neither situation is very common I suspect, but it does seem like a hidden gotchya waiting to happen. I guess we either want to checking-assert that we never hit that special marker or handle it

Re: [PATCH][4/n] Remove GENERIC stmt combining from SCCVN

2015-07-16 Thread Richard Biener
On Wed, 15 Jul 2015, Andrew MacLeod wrote: > On 07/15/2015 03:01 PM, Jeff Law wrote: > > On 07/14/2015 05:37 AM, Richard Biener wrote: > > > On Tue, 14 Jul 2015, Richard Biener wrote: > > > > > > > > > > > Applied. The following patch adds the equivalences for the destination > > > > of use stm

Re: [PATCH][4/n] Remove GENERIC stmt combining from SCCVN

2015-07-15 Thread Andrew MacLeod
On 07/15/2015 03:01 PM, Jeff Law wrote: On 07/14/2015 05:37 AM, Richard Biener wrote: On Tue, 14 Jul 2015, Richard Biener wrote: Applied. The following patch adds the equivalences for the destination of use stmts if they simplify. Actually I can't use FOR_EACH_IMM_USE_STMT any longer becau

Re: [PATCH][4/n] Remove GENERIC stmt combining from SCCVN

2015-07-15 Thread Jeff Law
On 07/14/2015 05:37 AM, Richard Biener wrote: On Tue, 14 Jul 2015, Richard Biener wrote: On Mon, 13 Jul 2015, Jeff Law wrote: 2015-07-13 Richard Biener * tree-ssa-dom.c (record_temporary_equivalences): Merge wideing type conversion case from record_equivalences_from_incomi

Re: [PATCH][4/n] Remove GENERIC stmt combining from SCCVN

2015-07-14 Thread Richard Biener
On Tue, 14 Jul 2015, Richard Biener wrote: > On Mon, 13 Jul 2015, Jeff Law wrote: > > > > 2015-07-13 Richard Biener > > > > > > * tree-ssa-dom.c (record_temporary_equivalences): Merge > > > wideing type conversion case from > > > record_equivalences_from_incoming_edge > > > and use reco

Re: [PATCH][4/n] Remove GENERIC stmt combining from SCCVN

2015-07-14 Thread Richard Biener
On Mon, 13 Jul 2015, Jeff Law wrote: > On 07/13/2015 03:32 AM, Richard Biener wrote: > > On Mon, 13 Jul 2015, Richard Biener wrote: > > > > > On Sun, 12 Jul 2015, Jeff Law wrote: > > > > > > > On 06/29/2015 01:58 AM, Richard Biener wrote: > > > > > > > > > > In principle the following works for

Re: [PATCH][4/n] Remove GENERIC stmt combining from SCCVN

2015-07-13 Thread Jeff Law
On 07/13/2015 03:32 AM, Richard Biener wrote: On Mon, 13 Jul 2015, Richard Biener wrote: On Sun, 12 Jul 2015, Jeff Law wrote: On 06/29/2015 01:58 AM, Richard Biener wrote: In principle the following works for the testcase (even w/o fixing the VRP part). Index: gcc/tree-ssa-dom.c ==

Re: [PATCH][4/n] Remove GENERIC stmt combining from SCCVN

2015-07-13 Thread Jeff Law
On 07/13/2015 01:55 AM, Richard Biener wrote: I *think* these are closely enough related that some code can be factored out a bit and reused in both r_e_f_i_e and r_t_e to discover both types of equivalences for DOM and for jump threading. Indeed - the odd thing here is that one function uses c

Re: [PATCH][4/n] Remove GENERIC stmt combining from SCCVN

2015-07-13 Thread Jeff Law
On 07/13/2015 01:47 AM, Richard Biener wrote: The path duplication to expose redundancies is one of the things I'd like to get out of a Bodik-esque scheme. One of the things Bodik's work does is identify the minimal set of blocks that need to be copied to expose each path specific redundancy th

Re: [PATCH][4/n] Remove GENERIC stmt combining from SCCVN

2015-07-13 Thread Richard Biener
On Mon, 13 Jul 2015, Richard Biener wrote: > On Sun, 12 Jul 2015, Jeff Law wrote: > > > On 06/29/2015 01:58 AM, Richard Biener wrote: > > > > > > In principle the following works for the testcase (even w/o fixing > > > the VRP part). > > > > > > Index: gcc/tree-ssa-dom.c > > > =

Re: [PATCH][4/n] Remove GENERIC stmt combining from SCCVN

2015-07-13 Thread Richard Biener
On Sun, 12 Jul 2015, Jeff Law wrote: > On 06/29/2015 01:58 AM, Richard Biener wrote: > > > > In principle the following works for the testcase (even w/o fixing > > the VRP part). > > > > Index: gcc/tree-ssa-dom.c > > === > > --- gcc

Re: [PATCH][4/n] Remove GENERIC stmt combining from SCCVN

2015-07-13 Thread Richard Biener
On Sat, 11 Jul 2015, Jeff Law wrote: > On 06/29/2015 04:02 AM, Richard Biener wrote: > > > > Ok, the above isn't the correct place (seems to be used from the > > threading machinery only), but record_equivalences_from_incoming_edge is > > and that is where the special-case you mention is which ha

Re: [PATCH][4/n] Remove GENERIC stmt combining from SCCVN

2015-07-12 Thread Jeff Law
On 06/29/2015 01:58 AM, Richard Biener wrote: In principle the following works for the testcase (even w/o fixing the VRP part). Index: gcc/tree-ssa-dom.c === --- gcc/tree-ssa-dom.c (revision 225007) +++ gcc/tree-ssa-dom.c (workin

Re: [PATCH][4/n] Remove GENERIC stmt combining from SCCVN

2015-07-10 Thread Jeff Law
On 06/29/2015 04:02 AM, Richard Biener wrote: Ok, the above isn't the correct place (seems to be used from the threading machinery only), but record_equivalences_from_incoming_edge is and that is where the special-case you mention is which handles widening converts but not sign-changes. And yes

Re: [PATCH][4/n] Remove GENERIC stmt combining from SCCVN

2015-06-29 Thread Richard Biener
On Mon, 29 Jun 2015, Richard Biener wrote: > On Fri, 26 Jun 2015, Jeff Law wrote: > > > On 06/26/2015 03:24 AM, Richard Biener wrote: > > > On Thu, 25 Jun 2015, Richard Biener wrote: > > > > > > > > > > > This moves fold_sign_changed_comparison. Shows up in gcc.dg/pr55833.c > > > > > > > > I'

Re: [PATCH][4/n] Remove GENERIC stmt combining from SCCVN

2015-06-29 Thread Richard Biener
On Fri, 26 Jun 2015, Jeff Law wrote: > On 06/26/2015 03:24 AM, Richard Biener wrote: > > On Thu, 25 Jun 2015, Richard Biener wrote: > > > > > > > > This moves fold_sign_changed_comparison. Shows up in gcc.dg/pr55833.c > > > > > > I'll eventually massage it according to Jakubs suggestion to do

Re: [PATCH][4/n] Remove GENERIC stmt combining from SCCVN

2015-06-26 Thread Jeff Law
On 06/26/2015 03:24 AM, Richard Biener wrote: On Thu, 25 Jun 2015, Richard Biener wrote: This moves fold_sign_changed_comparison. Shows up in gcc.dg/pr55833.c I'll eventually massage it according to Jakubs suggestion to do a #ifndef HAVE_canonicalize_funcptr_for_compare #define HAVE_canonic

Re: [PATCH][4/n] Remove GENERIC stmt combining from SCCVN

2015-06-26 Thread Richard Biener
On Thu, 25 Jun 2015, Richard Biener wrote: > > This moves fold_sign_changed_comparison. Shows up in gcc.dg/pr55833.c > > I'll eventually massage it according to Jakubs suggestion to do a > > #ifndef HAVE_canonicalize_funcptr_for_compare > #define HAVE_canonicalize_funcptr_for_compare 0 > #endi

Re: [PATCH][4/n] Remove GENERIC stmt combining from SCCVN

2015-06-25 Thread Jakub Jelinek
On Thu, Jun 25, 2015 at 03:24:33PM +0200, Richard Biener wrote: > > This moves fold_sign_changed_comparison. Shows up in gcc.dg/pr55833.c > > I'll eventually massage it according to Jakubs suggestion to do a > > #ifndef HAVE_canonicalize_funcptr_for_compare > #define HAVE_canonicalize_funcptr_f

[PATCH][4/n] Remove GENERIC stmt combining from SCCVN

2015-06-25 Thread Richard Biener
This moves fold_sign_changed_comparison. Shows up in gcc.dg/pr55833.c I'll eventually massage it according to Jakubs suggestion to do a #ifndef HAVE_canonicalize_funcptr_for_compare #define HAVE_canonicalize_funcptr_for_compare 0 #endif somewhere (defaults.h should work I guess). Bootstrap an