Path: utzoo!attcan!uunet!cs.utexas.edu!yale!cmcl2!lanl!jlg From: jlg@lanl.gov (Jim Giles) Newsgroups: comp.lang.misc Subject: Re: Aggressive optimization Message-ID: <5008@lanl.gov> Date: 5 Nov 90 22:15:54 GMT References: Organization: Los Alamos Natl Lab, Los Alamos, N.M. Lines: 34 From article , by pcg@cs.aber.ac.uk (Piercarlo Grandi): > [...] Now, the interesting question is how much of a > liability in terms of reduced confidence is aggressive optimization. > Reasoning shows that in way of principle it lowers the reliability of a > compiler. Show that this is not true, or that if true there are > compensating advantages, and quantify yoru argument. You are making the assumption that optimization techniques reduce the reliability of the compiler. This is certainly true for esoterica. But, you have also attacked the ond standby techniques as well. If I were writing a compiler for _reliability_ alone, I would certainly make a complete data flow graph and a complete analysis of control flow. These techniques have been around for decades, are stable, and much theoretical work (including correctness proofs) has been done: in short, they are the most reliable tool after automatic parser generators that are available in compiler work. Having done this, it is difficult (and therefore less reliable) _NOT_ to apply the obvious code generation - which would be code which has been optimized in the following ways (and probably more): Constant folding dead code elimination (given above: any branch _known_ not to be taken) common expression elimination loop invariant detection strength reduction ... The last three are all optimizations that you have strongly opposed in the past. Yet, in a modern compiler, it would be _less_ reliable not to apply them. So, don't pretend your objections are based soley on reliability. J. Giles