[Ecls-list] Some improvements

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Fri Jul 3 17:25:56 UTC 2009


On Fri, Jul 3, 2009 at 7:12 PM, Matthew Mondor<mm_lists at pulsar-zone.net> wrote:
> The -fomit-frame-pointer optimization flag may help slightly on x86 but
> this also makes debugging harder...

In particular, -fomit-frame-pointer breaks all profiling in OS X and
probably in Linux as well :-/

> Lately, inline functions become more popular (and are standard in C99)
> and the compiler may at its discretion generate a real function where
> necessary.[ ...].  A side
> effect of inlining might also be an increase in text footprint, and
> cache-thrashing on cache-starved processors, like for loop unrolling.

I guess this will have to be done case by case. We already have a
header ecl-inl.h, where some inline forms used to go.

>> - PIC code is also horribly slow.
>
> PIC efficiency depends on architecture and on memory model (i.e. it was
> pretty nice with m68k and small memory model but might be very poor on
> x86).  Is PIC important other than for a few architectures though?  Or
> is it important because of ECL's design?

PIC is the only possible flag in OS X, at least when building shared
libraries. Actually, even if you do not provide it, the compiler adds
it.

> I could be mistaken but I have the impression that with ELF (supporting
> relocation) and MMU, mapping shared libraries in the process space on
> x86 doesn't really require PIC code on modern unix-like OS.

I do not know. I might have to look at a linux box and see the quality
and type of code it produces. It might be that the improvements for
Mac kill other platforms

> In any case, does -minline-plt help any?

That only seems to apply to two weird architectures now.

>> - GCC refuses to optimize tail calls to neighboring functions with the
>> same # of arguments. I do not know why. Perhaps because of the
>> debugging flags.
>
> Was this with -foptimize-sibling-calls still?  But yes it'd also have
> to be tested without debugging flags and with -O3

Yes, I have tried various combinations. Again, it may well be that the
compiler refuses to do the sibling call in order to preserve the stack
frame.

Juanjo

-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com




More information about the ecl-devel mailing list