logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

RE: handling of c flags in configure: msg#00037

Subject: RE: handling of c flags in configure
First of all I have to say that I didn't introduce the optimization
flags in configure.ac myself, they were from ancient times... Given the
complexity of modern HW and SW, I'm quite aware that choosing the "best"
flags is next to impossible, so I'm fully in line with the current
proposals. Let's quickly discuss the flags currently used:

 * -O2: I think we all agree that this is a sane and useful flag.

 * -fomit-frame-pointer: I think this is OK, too. On some architectures
it makes debugging impossible, but we only use this for production
builds, anyway. At some point in time it was incompatible with profiling
(-pg), does anybody know if this is still the case?

 * -finline-functions: This should be OK, too. AFAIK GCC is careful
enough to avoid too much code bloat.

 * -fexpensive-optimizations: The GCC docs are very vague about this, so
I don't have a strong opinion about that. If there are no strong reasons
for including it, I'd vote for kicking it out.

 * -funroll(-all)-loops: If they are really unstable, they should be
removed. Furthermore, the GCC docs even mention that the "-all" variant
usually slows down programs. If it really turns out that we have a hot
spot in a loop (profiling!), we can unroll it manually a bit, probably
with the help of CPP. >:-)

 * -ffast-math: I am really unsure about this one. On the one hand it
can turn some math functions into very few machine operations without
any function call overhead, OTOH I'm totally unsure how much we rely on
IEEE/ANSI standards here. Opinions?

And a general remark: I think we shouldn't focus on performance issues
too much until full OpenAL 1.1 compliance is reached, this is much more
important at this stage IMHO.

Regarding GCC vs other compilers: It might be the case that our current
autotools build machinery requires GCC, but this is probably more by
accident than by design. If somebody sponsors me an Intel C++ compiler
for Linux, I'd be more than happy to support that, too (seriously!).
I've just installed Solaris x86 on a box at home, and probably FreeBSD
and Darwin will follow. This might ease maintenance of the backends, but
AFAIK all those platforms come with GCC only.

Cheers,
   S.


<Prev in Thread] Current Thread [Next in Thread>