optimising recursive functions

Zdenek Dvorak rakdver@kam.mff.cuni.cz
Sat Oct 27 14:45:00 GMT 2007


Hi,

> > > 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
> calling conventions.

alternatively, you can use -fwhole-program to get the same effect.

Zdenek



More information about the Gcc mailing list