Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* When is -O2 faster than -O3 for MIPS compiler?
@ 1990-12-28 17:13 g hugh song
  1990-12-28 22:42 ` Michael Meissner
  1991-01-02 21:20 ` Fred Chow
  0 siblings, 2 replies; 3+ messages in thread
From: g hugh song @ 1990-12-28 17:13 UTC (permalink / 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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1991-01-02 21:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1990-12-28 17:13 When is -O2 faster than -O3 for MIPS compiler? g hugh song
1990-12-28 22:42 ` Michael Meissner
1991-01-02 21:20 ` Fred Chow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox