Re: [PATCH 02/89] Introduce gimple_switch and use it in various places

2014-04-24 Thread David Malcolm
On Wed, 2014-04-23 at 13:58 -0600, Jeff Law wrote: > On 04/21/14 10:56, David Malcolm wrote: [...] > So, generally I like it. It looks pretty much like what I'd expect from > this kind of work. > > So it sounds like Richi really prefers the explicit casting rather than > member functions. It s

Re: [PATCH 02/89] Introduce gimple_switch and use it in various places

2014-04-23 Thread Trevor Saunders
On Wed, Apr 23, 2014 at 01:32:24PM -0700, Richard Henderson wrote: > On 04/23/2014 12:56 PM, Jeff Law wrote: > > On 04/22/14 15:38, Richard Henderson wrote: > >> On 04/22/2014 10:13 AM, David Malcolm wrote: > >>> On Mon, 2014-04-21 at 18:45 -0400, Trevor Saunders wrote: > > --- a/gcc/tree-loop-

Re: [PATCH 02/89] Introduce gimple_switch and use it in various places

2014-04-23 Thread Richard Henderson
On 04/23/2014 12:56 PM, Jeff Law wrote: > On 04/22/14 15:38, Richard Henderson wrote: >> On 04/22/2014 10:13 AM, David Malcolm wrote: >>> On Mon, 2014-04-21 at 18:45 -0400, Trevor Saunders wrote: > --- a/gcc/tree-loop-distribution.c > +++ b/gcc/tree-loop-distribution.c > @@ -687,8 +687,

Re: [PATCH 02/89] Introduce gimple_switch and use it in various places

2014-04-23 Thread Jeff Law
On 04/21/14 10:56, David Malcolm wrote: gcc/ * gimple.h (gimple_statement_switch): New subclass of gimple_statement_with_ops, adding the invariant that stmt->code == GIMPLE_SWITCH. (gimple_statement_base::as_a_gimple_switch): New. (gimple_statement_base::dy

Re: [PATCH 02/89] Introduce gimple_switch and use it in various places

2014-04-23 Thread Jeff Law
On 04/22/14 15:38, Richard Henderson wrote: On 04/22/2014 10:13 AM, David Malcolm wrote: On Mon, 2014-04-21 at 18:45 -0400, Trevor Saunders wrote: --- a/gcc/tree-loop-distribution.c +++ b/gcc/tree-loop-distribution.c @@ -687,8 +687,9 @@ generate_loops_for_partition (struct loop *loop, partitio

Re: [PATCH 02/89] Introduce gimple_switch and use it in various places

2014-04-23 Thread Florian Weimer
On 04/22/2014 10:17 PM, David Malcolm wrote: or indeed, something like: else if (gimple_switch switch_stmt = dyn_cast (stmt)) { to avoid an 83-character-wide line :) Hope that's the appropriate way to split such a line; I can never rem

Re: [PATCH 02/89] Introduce gimple_switch and use it in various places

2014-04-22 Thread Richard Henderson
On 04/22/2014 10:13 AM, David Malcolm wrote: > On Mon, 2014-04-21 at 18:45 -0400, Trevor Saunders wrote: >>> --- a/gcc/tree-loop-distribution.c >>> +++ b/gcc/tree-loop-distribution.c >>> @@ -687,8 +687,9 @@ generate_loops_for_partition (struct loop *loop, >>> partition_t partition, >>>

Re: [PATCH 02/89] Introduce gimple_switch and use it in various places

2014-04-22 Thread David Malcolm
On Tue, 2014-04-22 at 13:13 -0400, David Malcolm wrote: > On Mon, 2014-04-21 at 18:45 -0400, Trevor Saunders wrote: > > > --- a/gcc/tree-loop-distribution.c > > > +++ b/gcc/tree-loop-distribution.c > > > @@ -687,8 +687,9 @@ generate_loops_for_partition (struct loop *loop, > > > partition_t partiti

Re: [PATCH 02/89] Introduce gimple_switch and use it in various places

2014-04-22 Thread David Malcolm
On Mon, 2014-04-21 at 18:45 -0400, Trevor Saunders wrote: > > --- a/gcc/tree-loop-distribution.c > > +++ b/gcc/tree-loop-distribution.c > > @@ -687,8 +687,9 @@ generate_loops_for_partition (struct loop *loop, > > partition_t partition, > > } > > else if (gimple_code (stmt) ==

Re: [PATCH 02/89] Introduce gimple_switch and use it in various places

2014-04-22 Thread Richard Biener
On Tue, Apr 22, 2014 at 12:45 AM, Trevor Saunders wrote: >> --- a/gcc/tree-loop-distribution.c >> +++ b/gcc/tree-loop-distribution.c >> @@ -687,8 +687,9 @@ generate_loops_for_partition (struct loop *loop, >> partition_t partition, >> } >> else if (gimple_code (stmt) == G

Re: [PATCH 02/89] Introduce gimple_switch and use it in various places

2014-04-21 Thread Trevor Saunders
> --- a/gcc/tree-loop-distribution.c > +++ b/gcc/tree-loop-distribution.c > @@ -687,8 +687,9 @@ generate_loops_for_partition (struct loop *loop, > partition_t partition, > } > else if (gimple_code (stmt) == GIMPLE_SWITCH) > { > + gimple_switch

[PATCH 02/89] Introduce gimple_switch and use it in various places

2014-04-21 Thread David Malcolm
gcc/ * gimple.h (gimple_statement_switch): New subclass of gimple_statement_with_ops, adding the invariant that stmt->code == GIMPLE_SWITCH. (gimple_statement_base::as_a_gimple_switch): New. (gimple_statement_base::dyn_cast_gimple_switch): New. (is_a_