Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-19 Thread Richard Biener
On Tue, Nov 18, 2014 at 10:04 PM, David Malcolm wrote: > On Tue, 2014-11-18 at 10:53 +0100, Richard Biener wrote: >> On Tue, Nov 18, 2014 at 2:59 AM, David Malcolm wrote: >> > On Mon, 2014-11-17 at 11:06 +0100, Richard Biener wrote: >> >> On Sat, Nov 15, 2014 at 12:00 PM, David Malcolm >> >> wr

Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-18 Thread David Malcolm
On Tue, 2014-11-18 at 10:53 +0100, Richard Biener wrote: > On Tue, Nov 18, 2014 at 2:59 AM, David Malcolm wrote: > > On Mon, 2014-11-17 at 11:06 +0100, Richard Biener wrote: > >> On Sat, Nov 15, 2014 at 12:00 PM, David Malcolm > >> wrote: > >> > On Thu, 2014-11-13 at 11:45 +0100, Richard Biener

Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-18 Thread Richard Biener
On Tue, Nov 18, 2014 at 2:59 AM, David Malcolm wrote: > On Mon, 2014-11-17 at 11:06 +0100, Richard Biener wrote: >> On Sat, Nov 15, 2014 at 12:00 PM, David Malcolm wrote: >> > On Thu, 2014-11-13 at 11:45 +0100, Richard Biener wrote: >> >> On Thu, Nov 13, 2014 at 2:41 AM, David Malcolm >> >> wro

Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-17 Thread David Malcolm
On Mon, 2014-11-17 at 11:06 +0100, Richard Biener wrote: > On Sat, Nov 15, 2014 at 12:00 PM, David Malcolm wrote: > > On Thu, 2014-11-13 at 11:45 +0100, Richard Biener wrote: > >> On Thu, Nov 13, 2014 at 2:41 AM, David Malcolm wrote: > >> > On Tue, 2014-11-11 at 11:43 +0100, Richard Biener wrote:

Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-17 Thread Jeff Law
On 11/17/14 03:06, Richard Biener wrote: Also, presumably if this were merged, it would require a followup with the gimple to gimple * fixup you wanted? (which we talked about doing as an early stage3 thing IIRC [1]). Yeah, that would be nice (to remind people - this is about getting rid of

Re: [PATCH] Add gimple-compat.h (was Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign)

2014-11-17 Thread Jeff Law
On 11/14/14 08:27, David Malcolm wrote: I just don't like all the as_a/is_a stuff enforced everywhere, it means more typing, more temporaries, more indentation. So, as I view it, instead of the checks being done cheaply (yes, I think the gimple checking as we have right now is very cheap) under

Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-17 Thread Richard Biener
On Sat, Nov 15, 2014 at 12:00 PM, David Malcolm wrote: > On Thu, 2014-11-13 at 11:45 +0100, Richard Biener wrote: >> On Thu, Nov 13, 2014 at 2:41 AM, David Malcolm wrote: >> > On Tue, 2014-11-11 at 11:43 +0100, Richard Biener wrote: >> >> On Tue, Nov 11, 2014 at 8:26 AM, Jakub Jelinek wrote: >>

Re: [PATCH] Add gimple-compat.h (was Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign)

2014-11-17 Thread Richard Biener
On Fri, Nov 14, 2014 at 4:27 PM, David Malcolm wrote: > On Thu, 2014-11-13 at 11:45 +0100, Richard Biener wrote: >> On Thu, Nov 13, 2014 at 2:41 AM, David Malcolm wrote: >> > On Tue, 2014-11-11 at 11:43 +0100, Richard Biener wrote: >> >> On Tue, Nov 11, 2014 at 8:26 AM, Jakub Jelinek wrote: >> >

Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-15 Thread David Malcolm
On Thu, 2014-11-13 at 11:45 +0100, Richard Biener wrote: > On Thu, Nov 13, 2014 at 2:41 AM, David Malcolm wrote: > > On Tue, 2014-11-11 at 11:43 +0100, Richard Biener wrote: > >> On Tue, Nov 11, 2014 at 8:26 AM, Jakub Jelinek wrote: > >> > On Mon, Nov 10, 2014 at 05:27:50PM -0500, David Malcolm w

[PATCH] Add gimple-compat.h (was Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign)

2014-11-14 Thread David Malcolm
On Thu, 2014-11-13 at 11:45 +0100, Richard Biener wrote: > On Thu, Nov 13, 2014 at 2:41 AM, David Malcolm wrote: > > On Tue, 2014-11-11 at 11:43 +0100, Richard Biener wrote: > >> On Tue, Nov 11, 2014 at 8:26 AM, Jakub Jelinek wrote: > >> > On Mon, Nov 10, 2014 at 05:27:50PM -0500, David Malcolm w

Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-13 Thread Andrew MacLeod
On 11/13/2014 09:34 AM, Richard Biener wrote: On Thu, Nov 13, 2014 at 3:24 PM, Andrew MacLeod wrote: On 11/13/2014 05:45 AM, Richard Biener wrote: On Thu, Nov 13, 2014 at 2:41 AM, David Malcolm wrote: On Tue, 2014-11-11 at 11:43 +0100, Richard Biener wrote: On Tue, Nov 11, 2014 at 8:26 AM,

Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-13 Thread Richard Biener
On Thu, Nov 13, 2014 at 3:24 PM, Andrew MacLeod wrote: > On 11/13/2014 05:45 AM, Richard Biener wrote: >> >> On Thu, Nov 13, 2014 at 2:41 AM, David Malcolm >> wrote: >>> >>> On Tue, 2014-11-11 at 11:43 +0100, Richard Biener wrote: On Tue, Nov 11, 2014 at 8:26 AM, Jakub Jelinek wrote: >

Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-13 Thread Andrew MacLeod
On 11/13/2014 05:45 AM, Richard Biener wrote: On Thu, Nov 13, 2014 at 2:41 AM, David Malcolm wrote: On Tue, 2014-11-11 at 11:43 +0100, Richard Biener wrote: On Tue, Nov 11, 2014 at 8:26 AM, Jakub Jelinek wrote: On Mon, Nov 10, 2014 at 05:27:50PM -0500, David Malcolm wrote: On Sat, 2014-11-0

Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-13 Thread Jonathan Wakely
On 13 November 2014 10:45, Richard Biener wrote: > > Hmm. > > struct assign; > struct base { > operator assign *() const { return (assign *)this; } > }; > struct assign : base { > }; > > void foo (assign *); > void bar (base *b) > { > foo (b); > } > > doesn't work, but > > void bar (base &b) >

Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-13 Thread Richard Biener
On Thu, Nov 13, 2014 at 2:41 AM, David Malcolm wrote: > On Tue, 2014-11-11 at 11:43 +0100, Richard Biener wrote: >> On Tue, Nov 11, 2014 at 8:26 AM, Jakub Jelinek wrote: >> > On Mon, Nov 10, 2014 at 05:27:50PM -0500, David Malcolm wrote: >> >> On Sat, 2014-11-08 at 14:56 +0100, Jakub Jelinek wrot

Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-12 Thread David Malcolm
On Tue, 2014-11-11 at 08:26 +0100, Jakub Jelinek wrote: > On Mon, Nov 10, 2014 at 05:27:50PM -0500, David Malcolm wrote: > > On Sat, 2014-11-08 at 14:56 +0100, Jakub Jelinek wrote: > > > On Sat, Nov 08, 2014 at 01:07:28PM +0100, Richard Biener wrote: > > > > To be constructive here - the above case

Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-12 Thread David Malcolm
On Tue, 2014-11-11 at 11:43 +0100, Richard Biener wrote: > On Tue, Nov 11, 2014 at 8:26 AM, Jakub Jelinek wrote: > > On Mon, Nov 10, 2014 at 05:27:50PM -0500, David Malcolm wrote: > >> On Sat, 2014-11-08 at 14:56 +0100, Jakub Jelinek wrote: > >> > On Sat, Nov 08, 2014 at 01:07:28PM +0100, Richard

Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-11 Thread Bernd Schmidt
On 11/11/2014 09:30 AM, Eric Botcazou wrote: I just don't like all the as_a/is_a stuff enforced everywhere, it means more typing, more temporaries, more indentation. So, as I view it, instead of the checks being done cheaply (yes, I think the gimple checking as we have right now is very cheap) un

Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-11 Thread Richard Biener
On Tue, Nov 11, 2014 at 8:26 AM, Jakub Jelinek wrote: > On Mon, Nov 10, 2014 at 05:27:50PM -0500, David Malcolm wrote: >> On Sat, 2014-11-08 at 14:56 +0100, Jakub Jelinek wrote: >> > On Sat, Nov 08, 2014 at 01:07:28PM +0100, Richard Biener wrote: >> > > To be constructive here - the above case is

Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-11 Thread Eric Botcazou
> I just don't like all the as_a/is_a stuff enforced everywhere, > it means more typing, more temporaries, more indentation. > So, as I view it, instead of the checks being done cheaply (yes, I think > the gimple checking as we have right now is very cheap) under the > hood by the accessors (gimple

Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-10 Thread Jakub Jelinek
On Mon, Nov 10, 2014 at 05:27:50PM -0500, David Malcolm wrote: > On Sat, 2014-11-08 at 14:56 +0100, Jakub Jelinek wrote: > > On Sat, Nov 08, 2014 at 01:07:28PM +0100, Richard Biener wrote: > > > To be constructive here - the above case is from within a > > > GIMPLE_ASSIGN case label > > > and thus

Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-10 Thread Andrew Pinski
On Mon, Nov 10, 2014 at 2:27 PM, David Malcolm wrote: > On Sat, 2014-11-08 at 14:56 +0100, Jakub Jelinek wrote: >> On Sat, Nov 08, 2014 at 01:07:28PM +0100, Richard Biener wrote: >> > To be constructive here - the above case is from within a >> > GIMPLE_ASSIGN case label >> > and thus I'd have exp

Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-10 Thread David Malcolm
On Sat, 2014-11-08 at 14:56 +0100, Jakub Jelinek wrote: > On Sat, Nov 08, 2014 at 01:07:28PM +0100, Richard Biener wrote: > > To be constructive here - the above case is from within a > > GIMPLE_ASSIGN case label > > and thus I'd have expected > > > > case GIMPLE_ASSIGN: > > { > >

Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-08 Thread David Malcolm
On Sat, 2014-11-08 at 13:07 +0100, Richard Biener wrote: > On Fri, Nov 7, 2014 at 10:01 PM, Richard Biener > wrote: > > On Fri, Nov 7, 2014 at 4:21 PM, David Malcolm wrote: > >> gcc/ChangeLog.gimple-classes: > >> * tree-ssa-tail-merge.c (same_succ_hash): Add checked cast. > >> (gi

Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-08 Thread Jakub Jelinek
On Sat, Nov 08, 2014 at 01:07:28PM +0100, Richard Biener wrote: > To be constructive here - the above case is from within a > GIMPLE_ASSIGN case label > and thus I'd have expected > > case GIMPLE_ASSIGN: > { > gassign *a1 = as_a (s1); > gassign *a2 = as_a (s2); >

Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-08 Thread Richard Biener
On Fri, Nov 7, 2014 at 10:01 PM, Richard Biener wrote: > On Fri, Nov 7, 2014 at 4:21 PM, David Malcolm wrote: >> gcc/ChangeLog.gimple-classes: >> * tree-ssa-tail-merge.c (same_succ_hash): Add checked cast. >> (gimple_equal_p): Add checked casts. >> --- >> gcc/ChangeLog.gimple-cla

Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-08 Thread Marek Polacek
On Fri, Nov 07, 2014 at 10:01:45PM +0100, Richard Biener wrote: > Just a comment as these patches flow by - I think this is a huge step > backwards from "enforcing" s1/s2 being a gimple_assign inside > gimple_assign_rhs1 to this as_a boilerplate at _each_ callsite! FWIW, I feel the same way. Mor

Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-07 Thread Jakub Jelinek
On Fri, Nov 07, 2014 at 10:01:45PM +0100, Richard Biener wrote: > > --- a/gcc/tree-ssa-tail-merge.c > > +++ b/gcc/tree-ssa-tail-merge.c > > @@ -484,7 +484,7 @@ same_succ_hash (const_same_succ e) > > > >hstate.add_int (gimple_code (stmt)); > >if (is_gimple_assign (stmt)) > > -

Re: [gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-07 Thread Richard Biener
On Fri, Nov 7, 2014 at 4:21 PM, David Malcolm wrote: > gcc/ChangeLog.gimple-classes: > * tree-ssa-tail-merge.c (same_succ_hash): Add checked cast. > (gimple_equal_p): Add checked casts. > --- > gcc/ChangeLog.gimple-classes | 5 + > gcc/tree-ssa-tail-merge.c| 8 +--- >

[gimple-classes, committed 4/6] tree-ssa-tail-merge.c: Use gassign

2014-11-07 Thread David Malcolm
gcc/ChangeLog.gimple-classes: * tree-ssa-tail-merge.c (same_succ_hash): Add checked cast. (gimple_equal_p): Add checked casts. --- gcc/ChangeLog.gimple-classes | 5 + gcc/tree-ssa-tail-merge.c| 8 +--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/gcc/