chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] gcc 3..3 and -fno-strict-aliasing


From: felix
Subject: [Chicken-users] gcc 3..3 and -fno-strict-aliasing
Date: Sat, 07 Feb 2004 11:05:00 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113

Hello!

I wrote:

> - configure.in: uses -fno-strict-aliasing with gcc 3.3

Sven asked my to clarify this, so here we go:

It appears that newer versions of gcc (probably upwards from
3.3.2) enable -fstrict-aliasing by default (with -O2, -O3 or -Os),
and I have seen two cases (a dual-processor Xeon Linux box and a IA64 Linux 
system)
where chicken crashes when compiled with strict aliasing.
So if configure detects a gcc 3.3 it adds `-fno-strict-aliasing' to the
flags which are used to build the system and compile translated
Scheme files.

I'm not exactly sure whether this is a gcc bug, or whether
Chicken generates code that would break under the strict aliasing
rules.

If you are *really* concerned about performance, try to override
the CFLAGS settings for both configure and make, like this:

% CFLAGS="<my flags>" ./configure
% gmake CFLAGS="<my flags>"

(it has to be done twice - once to tell configure what CFLAGS to use
for the system, and once to tell make which CFLAGS should be used by
csc and chicken-config)

On x86 systems with gcc < 3.3, these options _appear_ to give best
performance:

-O3 -fomit-frame-pointer -fstrict-aliasing 
-march=<whatever-fits-your-system-best>
  -mpreferred-stack-boundary=2

Results may vary, of course. Some experimentation has to be done for particular
system.

If needed, I can provide a benchmark suite
(Actually, I think I'll add one to the distribution)


cheers,
felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]