Re: Add a param to decide stack slot sharing at -O0

2013-10-09 Thread Easwaran Raman
On Wed, Oct 9, 2013 at 4:11 AM, Richard Biener wrote: > On Tue, Oct 8, 2013 at 11:04 PM, Easwaran Raman wrote: >> In cfgexpand.c, variables in non-overlapping lexical scopes are >> assigned same stack locations at -O1 and above. At -O0, this is >> attempted only if the size of the stack objects i

Re: Add a param to decide stack slot sharing at -O0

2013-10-09 Thread Richard Biener
On Tue, Oct 8, 2013 at 11:04 PM, Easwaran Raman wrote: > In cfgexpand.c, variables in non-overlapping lexical scopes are > assigned same stack locations at -O1 and above. At -O0, this is > attempted only if the size of the stack objects is above a threshold > (32). The rationale is at -O0, more va

Re: Add a param to decide stack slot sharing at -O0

2013-10-09 Thread Eric Botcazou
> Seems like a odd thing for a param. If the compile time increase is very > small (< 1%?) I would just make the new threshold default. I don't understand the 'odd' here... params are exactly for this purpose, i.e. to avoid hardcoding magic numbers in the compiler, so please elaborate. -- Eric

Re: Add a param to decide stack slot sharing at -O0

2013-10-08 Thread Andi Kleen
Easwaran Raman writes: > In cfgexpand.c, variables in non-overlapping lexical scopes are > assigned same stack locations at -O1 and above. At -O0, this is > attempted only if the size of the stack objects is above a threshold > (32). The rationale is at -O0, more variables are going to be in the

Add a param to decide stack slot sharing at -O0

2013-10-08 Thread Easwaran Raman
In cfgexpand.c, variables in non-overlapping lexical scopes are assigned same stack locations at -O1 and above. At -O0, this is attempted only if the size of the stack objects is above a threshold (32). The rationale is at -O0, more variables are going to be in the stack and the O(n^2) stack slot s