Re: Compiler optimization test/benchmark (IEEE fp) (Bob Morgan)
31 Jul 1998 11:01:09 -0400

          From comp.compilers

Related articles
Compiler optimization test/benchmark (IEEE fp) (Cyril Fischer) (1998-07-30)
Re: Compiler optimization test/benchmark (IEEE fp) (1998-07-31)
| List of all articles for this month |

From: (Bob Morgan)
Newsgroups: comp.compilers
Date: 31 Jul 1998 11:01:09 -0400
Organization: the company formerly known as Digital Equipment Corporation
References: 98-07-233
Keywords: books, optimize, comment

On 30 Jul 1998 23:18:10 -0400, Cyril Fischer <>

>Does anybody know about an optimization test or benchmark available?
>It happens sometimes to me that the codes with and without optimization
>give different results. E.g. compiling paranoia.c from netlib on my
>linux box with gcc with optimizations enabled (-O or -O2)
>produces an infinite loop and reports completely misleading results. The
>same compiler on sgi (mips 2) works O.K.

Optimizing compilers may have bugs, however a compiler that has been
used for a good amount of time (such as gcc or the manufacturers
compilers) is much less likely to have a bug. What I have found over
time is that the program itself has a bug. The compiler may use
uninitialized variables or some other characteristic which the
language standard says is undefined but is not checkable by the
compiler. With no optimization the program may run fine (that was the
way it was debugged) however different program behavior is possible
when the program is optimized.

I do not know of a URL, however there are two books that do give lists
of optimizations and some discussion of what is a valid optimization.

Robert, Morgan "Building an Optimizing Compiler" Digital Press
(shameless plug by author)

Steve Muchnick's book on the same topic (I do not have the
exact title handy but it is published by Morgan Kaufman.

Both books can be found at either amazon or barnesandnoble web sites.
If you can get a hold of an old set of notes by Michael Wolfe on
optimization, they also list the information. His most recent book is
a good read for dependence based optimizations, but does not cover the
other aspects as thorougly

Bob Morgan
[URLs for those books are:

Morgan's book:

Muchnick's "Advanced Compiler Design and Implementation":

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.