lkml.org 
[lkml]   [2007]   [Dec]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] x86: unify x86 Makefile(s)
Date

> Without inlining the maxmimum stack usage inside foobar() is
> max(stack usage foo(), stack usage bar()). [1]

It's a little more complicated. gcc 4.x (not sure which x, might 0)
is clever enough to not use max() stack, but only use the stack for the
different scopes as needed similar as when the calls weren't inlined.
But gcc 3 didn't do that.

> With foo() and bar() inlined (-funit-at-a-time also enables
> -finline-functions-called-once), the maxmimum stack usage inside
> foobar() is sum(stack usage foo(), stack usage bar()). And this
> worst case is the area where gcc 4 is much better than gcc 3.4.

Yes exactly. If the functions weren't inlined the problem wouldn't
occur because the stack sizes do not add up in the same dynamic call chain.
Thus a few statetic noinlines will fix it.

-Andi


\
 
 \ /
  Last update: 2007-12-30 03:03    [W:0.072 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site