Unsafe Optimizations (WAS: Compiler Design in C How about it?)

pardo@cs.washington.edu (David Keppel)
Mon, 4 Jun 90 04:42:55 GMT

          From comp.compilers

Related articles
Unsafe Optimizations (WAS: Compiler Design in C How about it?) pardo@cs.washington.edu (1990-06-04)
Re: Unsafe Optimizations (WAS: Compiler Design in C How about it?) larus@spool.cs.wisc.edu (1990-06-04)
Re: Unsafe Optimizations (WAS: Compiler Design in C How about it?) MERRIMAN@ccavax.camb.com (George Merriman -- CCA/NY) (1990-06-05)
Re: Unsafe Optimizations (WAS: Compiler Design in C How about it?) mike@hpfcso.hp.com (1990-06-05)
Re: Unsafe Optimizations (WAS: Compiler Design in C How about it?) pardo@cs.washington.edu (1990-06-05)
Re: Unsafe Optimizations (WAS: Compiler Design in C How about it?) robinson@cs.dal.ca (1990-06-05)
Unsafe Optimizations (WAS: Compiler Design in C How about it?) stewart@sdsu.edu (1990-06-05)
[7 later articles]
| List of all articles for this month |

Newsgroups: comp.compilers
From: pardo@cs.washington.edu (David Keppel)
References: <1990Jun1.194941.5781@esegue.segue.boston.ma.us>
Date: Mon, 4 Jun 90 04:42:55 GMT
Organization: University of Washington, Computer Science, Seattle
Keywords: books, optimize

Preston Briggs <preston@rice.edu> writes:
>[Summary of A. Holub's ``Compiler Design in C''.]
>[``It's better to provide maximum optimization even if dangerous.'']
>[Outrageous!]


I agree wholeheartedly. I've been taking a class this quarter and
we've been studying optimizaing compilers for supercomputers, e.g., the
vector machines, the SIMD machines, and the shared-memory
multiprocessors. Today in class, I expressed the following opinion:


``You compile your program 100 times with optimization turned
off and then 1 time with optimization turned on. It's no
wonder that so many bugs show up in the optimizer, it hardly
ever gets tested. Therefore, you should compile your programs
with only the optimizations that you can ``debug through'' and
leave it at that.''


An extreme position, I know, I was actually trying to be provocative
rather than express my own opinion. Anyway, at this point one of my
classmates -- who has worked on optimizing compilers for several
high-performance computers -- tells me that I am free to feel that way,
but that her customers won't buy my product. They'd rather spend time
figuring out why their code gives wrong answers than spend time waiting
for their computer to give the right answer. (Ok, so they run programs
that take a week to execute...)


It's not quite the same thing as ``provide optimizations even if
dangerous'', but I'd just finished listening to a 10-minute report from
a group that had spent most of their time trying to figure out why the
compiler for a vectorizing multiprocessor kept producing incorrect code.


Flame away...


;-D on ( Debugger they come, deharder they foul ) Pardo
--
pardo@cs.washington.edu
        {rutgers,cornell,ucsd,ubc-cs,tektronix}!uw-beaver!june!pardo


--


Post a followup to this message

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