This is the mail archive of the
mailing list for the GCC project.
Re: optimising recursive functions
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Robert Dewar" <dewar at adacore dot com>
- Cc: skaller <skaller at users dot sourceforge dot net>, GCC <gcc at gcc dot gnu dot org>
- Date: Sat, 27 Oct 2007 12:54:04 +0200
- Subject: Re: optimising recursive functions
- References: <firstname.lastname@example.org> <4722859F.email@example.com>
On 10/27/07, Robert Dewar <firstname.lastname@example.org> wrote:
> skaller wrote:
> > So I am guessing the Felix version is lucky there are
> > no gratuitous temporaries to be saved when this happens,
> > and the C code is unlucky and there are.
> > Maybe someone who knows how the optimiser works can comment?
> One problem with departing from the ABI even on a local level
> like this is that it wipes out lots of tools that depend on
> ABI compliance for the entire call chain. I suspect the overall
> gain is too small to be worth this hit.
If you make the function static then gcc can chose ABI-incompatible