Unsafe Optimizations (formerly Compiler Design in C...)

holub@violet.Berkeley.EDU (Alan Holub)
Tue, 12 Jun 90 16:39:59 GMT

          From comp.compilers

Related articles
Unsafe Optimizations (formerly Compiler Design in C...) holub@violet.Berkeley.EDU (1990-06-12)
Re: Unsafe Optimizations (formerly Compiler Design in C...) moss@cs.umass.edu (1990-06-13)
Re: Unsafe Optimizations (formerly Compiler Design in C...) holub@violet.Berkeley.EDU (1990-06-14)
Re: Unsafe Optimizations (formerly Compiler Design in C...) marti@inf.ethz.ch (1990-06-14)
Re: Unsafe Optimizations (formerly Compiler Design in C...) larus@primost.cs.wisc.edu (1990-06-14)
Re: Unsafe Optimizations (formerly Compiler Design in C...) grover@brahmand.Eng.Sun.COM (1990-06-15)
Re: Unsafe Optimizations (formerly Compiler Design in C...) MERRIMAN@ccavax.camb.com (George Merriman -- CCA/NY) (1990-06-15)
[12 later articles]
| List of all articles for this month |

Newsgroups: comp.compilers
From: holub@violet.Berkeley.EDU (Alan Holub)
Date: Tue, 12 Jun 90 16:39:59 GMT
Organization: University of California, Berkeley
Keywords: compiler design, C, unsafe optimizations

I want to defend my belief that programmers are basically intelligent
people who are well able to decide for themselves whether or not to use
safe optimizations. It is basic to the philosophy of C that programmers
know what they are doing and the compiler shouldn't get in their way. The
classic example of this philosophy is the C pointer system, which lets you
write all over memory (even when you don't want to do so) because
situations do come up in which you need to write to strange memory
locations. If you don't like this philosophy, there are scores of safer
(slower, less-powerful) languages that will hold you hand and not let you
do something stupid. It seems to me to be a simple extension of this
philosophy that the programmer should be able to control optimization
strategies. I'm not advocating that any compiler should do an unsafe
optimization by default. I strongly believe that if I know that an
optimization is unsafe, and I understand the issues, and know that the
optimization is safe in the CURRENT case, that I should be allowed to use
that optimization if I want to. I don't think much of the "compiler
fascists" (if you will) who insist on protecting me from myself.


-Allen Holub (holub@violet.berkeley.edu)
--


Post a followup to this message

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