Re: Inline limits

2009-02-09 Thread Jan Hubicka
> On Thu, 5 Feb 2009, Paul Brook wrote: > > > For -Os it should be enough to set PARAM_STACK_FRAME_GROWTH > > > to zero. Inlining at -Os should already only happen if it decreases > > > (overall!) code-size. Thus, inlining a function that is called once and > > > that does not need to be emitted

Re: Inline limits

2009-02-09 Thread Hans-Peter Nilsson
On Thu, 5 Feb 2009, Paul Brook wrote: > > For -Os it should be enough to set PARAM_STACK_FRAME_GROWTH > > to zero. Inlining at -Os should already only happen if it decreases > > (overall!) code-size. Thus, inlining a function that is called once and > > that does not need to be emitted will alway

Re: Inline limits

2009-02-05 Thread Steven Bosscher
On Thu, Feb 5, 2009 at 3:04 PM, Paul Brook wrote: >> Hmm, we should be able to model this counting the number of edges >> bypassing the call, right? > > Something like that, yes. > > Ideally you'd want to factor in the size of the function, and the current > length of those edges, at which point y

Re: Inline limits

2009-02-05 Thread Paul Brook
> > On Thumb-2 we found that the overhead of a function call was often > > smaller than the cost of lengthening branches in the caller. > > It turns out that, over a fair selection of applications, programmers > > tend to write "nice" sized functions. After inlining we have big nasty > > blocks of

Re: Inline limits

2009-02-05 Thread Richard Guenther
On Thu, 5 Feb 2009, Paul Brook wrote: > > For -Os it should be enough to set PARAM_STACK_FRAME_GROWTH > > to zero. Inlining at -Os should already only happen if it decreases > > (overall!) code-size. Thus, inlining a function that is called once and > > that does not need to be emitted will alwa

Re: Inline limits

2009-02-05 Thread Paul Brook
> For -Os it should be enough to set PARAM_STACK_FRAME_GROWTH > to zero. Inlining at -Os should already only happen if it decreases > (overall!) code-size. Thus, inlining a function that is called once and > that does not need to be emitted will always be an overall code-size > win. > > > A side

Re: Inline limits

2009-01-26 Thread Richard Guenther
On Mon, Jan 26, 2009 at 5:29 PM, Hariharan wrote: > Hi, > I ran into some code-size/stack size bloat using -Os for a piece of code. > This seemed to happen only when certain single call-site functions are > defined "static" and not otherwise. On investigating further on this, i see > that the inli

Re: Inline limits

2009-01-26 Thread Richard Guenther
On Mon, Jan 26, 2009 at 5:41 PM, Richard Guenther wrote: > On Mon, Jan 26, 2009 at 5:29 PM, Hariharan wrote: >> Hi, >> I ran into some code-size/stack size bloat using -Os for a piece of code. >> This seemed to happen only when certain single call-site functions are >> defined "static" and not ot

Inline limits

2009-01-26 Thread Hariharan
Hi, I ran into some code-size/stack size bloat using -Os for a piece of code. This seemed to happen only when certain single call-site functions are defined "static" and not otherwise. On investigating further on this, i see that the inline_functions_called_once seems to rely only on "cgraph_c