This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Inlining vs the stack
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Daniel Berlin <dberlin at dberlin dot org>
- Cc: Bernd Jendrissek <berndj at prism dot co dot za>, Paul Koning <pkoning at equallogic dot com>, Ian Lance Taylor <ian at airs dot com>, dalej at apple dot com, gcc at gcc dot gnu dot org, jh at suse dot cz, Mike Stump <mrs at apple dot com>
- Date: Mon, 15 Aug 2005 22:09:06 +0200
- Subject: Re: Inlining vs the stack
- References: <m3slxeg8js.fsf@gossamer.airs.com> <20050814160152.GA5090@prism.co.za> <1124036008.25267.22.camel@linux.site>
It could still be done, even if we inline.
There is nothing that prevents us from adding space to the stack
allocation only at that point, it's just not coded in gcc to do that.
...and take the stack alloc back after the inlined call is finished.
This is what the original example needs; it doesn't actually need
to _actually_ do the allocations only where they are needed, just
_conceptually_ (i.e., the two calls to c() will actually share their
local stack space).
Segher