Re: Improve stack layout heuristic.

2011-04-21 Thread Easwaran Raman
On Thu, Apr 21, 2011 at 12:30 PM, Eric Botcazou wrote: >> 2011-04-21  Easwaran Raman   >> >>       * gcc/cfgexpand.c (stack_var): Remove OFFSET... >>       (add_stack_var): ...and its reference here... >>       (expand_stack_vars): ...and here. >>       (stack_var_cmp): Sort by descending order of

Re: Improve stack layout heuristic.

2011-04-21 Thread Eric Botcazou
> 2011-04-21 Easwaran Raman > > * gcc/cfgexpand.c (stack_var): Remove OFFSET... > (add_stack_var): ...and its reference here... > (expand_stack_vars): ...and here. > (stack_var_cmp): Sort by descending order of size. > (partition_stack_vars): Change heuristic. >

Re: Improve stack layout heuristic.

2011-04-21 Thread Easwaran Raman
On Thu, Apr 21, 2011 at 8:43 AM, Richard Guenther wrote: > On Thu, Apr 21, 2011 at 5:22 PM, Michael Matz wrote: >> Hi, >> >> On Wed, 20 Apr 2011, Easwaran Raman wrote: >> >>> But you're right - not adding that conflict doesn't actually reduce the >>> size of bit maps. Reverting back to what was t

Re: Improve stack layout heuristic.

2011-04-21 Thread Richard Guenther
On Thu, Apr 21, 2011 at 5:22 PM, Michael Matz wrote: > Hi, > > On Wed, 20 Apr 2011, Easwaran Raman wrote: > >> But you're right - not adding that conflict doesn't actually reduce the >> size of bit maps. Reverting back to what was there originally. > > Thanks, I have no more issues with the patch.

Re: Improve stack layout heuristic.

2011-04-21 Thread Michael Matz
Hi, On Wed, 20 Apr 2011, Easwaran Raman wrote: > But you're right - not adding that conflict doesn't actually reduce the > size of bit maps. Reverting back to what was there originally. Thanks, I have no more issues with the patch. You'll need to find someone who can formally approve it, thou

Re: Improve stack layout heuristic.

2011-04-20 Thread Easwaran Raman
On Wed, Apr 20, 2011 at 6:53 AM, Michael Matz wrote: > Hi, > > On Tue, 19 Apr 2011, Easwaran Raman wrote: > >> > That is correct but is also what the use of stack_vars[u].representative >> > achieves alone, ... >> > >> >> I am adding a check to that effect. >> > >> > ... without any check. >> > >>

Re: Improve stack layout heuristic.

2011-04-20 Thread Michael Matz
Hi, On Tue, 19 Apr 2011, Easwaran Raman wrote: > > That is correct but is also what the use of stack_vars[u].representative > > achieves alone, ... > > > >> I am adding a check to that effect. > > > > ... without any check. > > > > @@ -596,7 +581,8 @@ > >   if (vb->conflicts) > >     { > >      

Re: Improve stack layout heuristic.

2011-04-19 Thread Easwaran Raman
On Tue, Apr 19, 2011 at 5:08 AM, Michael Matz wrote: > Hi, > > On Mon, 18 Apr 2011, Easwaran Raman wrote: > >> > > @@ -596,7 +581,7 @@ >> > >    if (vb->conflicts) >> > >      { >> > >        EXECUTE_IF_SET_IN_BITMAP (vb->conflicts, 0, u, bi) >> > > -     add_stack_var_conflict (a, stack_vars[u].r

Re: Improve stack layout heuristic.

2011-04-19 Thread Michael Matz
Hi, On Mon, 18 Apr 2011, Easwaran Raman wrote: > > > @@ -596,7 +581,7 @@ > > >    if (vb->conflicts) > > >      { > > >        EXECUTE_IF_SET_IN_BITMAP (vb->conflicts, 0, u, bi) > > > -     add_stack_var_conflict (a, stack_vars[u].representative); > > > +     add_stack_var_conflict (a, u); > > >

Re: Improve stack layout heuristic.

2011-04-18 Thread Easwaran Raman
On Mon, Apr 18, 2011 at 5:58 AM, Michael Matz wrote: > > Hi, > > [FWIW I can't approve patches, but some feedback nevertheless] > > On Sun, 17 Apr 2011, Easwaran Raman wrote: > > >  This patch impoves the heuristic used in assigning stack location to > > stack variables.  Currently, if there are 3

Re: Improve stack layout heuristic.

2011-04-18 Thread Michael Matz
Hi, [FWIW I can't approve patches, but some feedback nevertheless] On Sun, 17 Apr 2011, Easwaran Raman wrote: > This patch impoves the heuristic used in assigning stack location to > stack variables. Currently, if there are 3 variables A, B and C with > their sizes in increasing order and A an

Re: Improve stack layout heuristic.

2011-04-18 Thread Richard Guenther
On Sun, Apr 17, 2011 at 11:27 PM, Easwaran Raman wrote: > On Sun, Apr 17, 2011 at 1:39 PM, Steven Bosscher > wrote: >> On Sun, Apr 17, 2011 at 9:39 PM, Easwaran Raman wrote: >>> @@ -372,8 +366,9 @@ >>>                 to elements will conflict.  In case of unions we have >>>                 to

Re: Improve stack layout heuristic.

2011-04-17 Thread Easwaran Raman
On Sun, Apr 17, 2011 at 1:39 PM, Steven Bosscher wrote: > On Sun, Apr 17, 2011 at 9:39 PM, Easwaran Raman wrote: >> @@ -372,8 +366,9 @@ >>                 to elements will conflict.  In case of unions we have >>                 to be careful as type based aliasing rules may say >>                

Re: Improve stack layout heuristic.

2011-04-17 Thread Steven Bosscher
On Sun, Apr 17, 2011 at 9:39 PM, Easwaran Raman wrote: > @@ -372,8 +366,9 @@ >                 to elements will conflict.  In case of unions we have >                 to be careful as type based aliasing rules may say >                 access to the same memory does not conflict.  So play > -    

Improve stack layout heuristic.

2011-04-17 Thread Easwaran Raman
Hi, This patch impoves the heuristic used in assigning stack location to stack variables. Currently, if there are 3 variables A, B and C with their sizes in increasing order and A and C have a conflict, it will put A and B in a partition and C in a separate partition with a total frame size of si