From: hsong@nvuxl.UUCP (g hugh song)
Subject: When is -O2 faster than -O3 for MIPS compiler?
Date: 28 Dec 90 17:13:22 GMT [thread overview]
Message-ID: <765@nvuxl.UUCP> (raw)
I wrote yesterday about the f77 compiler 2.1 for DecStation 5000/200
with Ultrix 4.0 :
> It is running with -O2 -C. However it does not run without -C. Usually
> the revese is the usual case.
("-C" is for the run-time subscript range checking, BTW)
I finally pinpointed out a routine which is affected by the compiler
bug. (It was not easy to pinpoint out just one routine among
about 100 routines.)
The same program ran with -O3 without -C, but at slower speed.
What? Yes. it ran more than two times slowly with higher optimization
level. The other compiler switches I used for both cases are
"-Olimit 2000 -align32" and either "-c" or "-j" with respect to
-O2 or -O3. And the loader switch is "-G 4800".
So my question is:
In what situation, is "-O2" faster than "-O3"?
My conclusion so far is there is a very critical bug in the
compiler-optimizer. And there is no handy mechanism for detecting
floating point errors. Someone pointed out "fpc" in <mips/fpu.h>.
But I still do not understand how it works.
If you know how to use it, please let us know how to use it.
Thanks.
-hsong-
nvuxl!hsong@bellcore.bellcore.com
hosng%nvuxl@bellcore.bellcore.com
PS: You need to type "nvuxl\!hsong@..." on Csh command line.
next reply other threads:[~1990-12-28 17:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1990-12-28 17:13 g hugh song [this message]
1990-12-28 22:42 ` When is -O2 faster than -O3 for MIPS compiler? Michael Meissner
1991-01-02 21:20 ` Fred Chow
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox