🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #1913

Re: Aggressive optimization

#1913
From: Jim Giles
Date: Mon, 05 Nov 1990 22:15
34 lines
2013 bytes
From article <PCG.90Nov2231021@athene.cs.aber.ac.uk>, 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
Technical Details
Message-ID: <5008@lanl.gov>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!yale!cmcl2!lanl!jlg
References: <PCG.90Nov2231021@athene.cs.aber.ac.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <PCG.90Nov2231021@athene.cs.aber.ac.uk>
Organization: Los Alamos Natl Lab, Los Alamos, N.M.
Lines: 34