smart compilers

Brandon Allbery the tame hacker on the North Coast bsa at ncoast.UUCP
Wed Jan 2 07:49:43 AEST 1985


It occurs to me that there are two ways to look at optimizers:

	1) That an optimizer optimizes, not the language code, but ASSEMBLER
	   code, and hence does not need to follow the language standard;

	2) That an optimizer must follow the language standard exactly,
	   and hence should optimize the language code itself.

If you accept (1), as every optimizer I've seen is designed to do, you
are likely to see an optimizer that will occasionally fail.  If (2),
there is little optimization possible, especially in a language like
Pascal where you can't manipulate the machine directly.

All you who complain about optimizers breaking code:  look at the current
discussion of the correct optimization of a piece of ForTran code.  No one
has yet proposed an optimization (type 2) that does the same thing as the
original code.  And if it's hard in ForTran, how much harder in Assembler?

Let's face it, guys -- placing any limitations (i.e. standards) on a
programming language is going to make an executing program in that language
slower.  Optimizing is often simply ignoring some of the standards and
removing their effects from the generated code.

--bsa
-- 
  Brandon Allbery @ decvax!cwruecmp!ncoast!bsa (..ncoast!tdi1!bsa business)
	6504 Chestnut Road, Independence, Ohio 44131   (216) 524-1416
    Who said you had to be (a) a poor programmer or (b) a security hazard
			     to be a hacker?



More information about the Comp.unix.wizards mailing list