* Optimizing compilers
@ 1988-01-21 22:25 Stanley Roger Allen, AdaDude
0 siblings, 0 replies; only message in thread
From: Stanley Roger Allen, AdaDude @ 1988-01-21 22:25 UTC (permalink / raw)
Naom Tene states:
>I am NOT saying that the optimized code is or should be legal I am
>saying that IF you want faster execution you must PAY for it. VAX
>ADA does NOT use the optimizer by default (unless the system manager
>interferes with it) if it had it would have been a bug.
Actually, the VAX Ada compiler has the OPTIMIZE switch ON by default
(read the documentation). Since a compiler is (supposedly) validated
with the default settings, it is natural to expect that this is how
the DEC Ada compiler passed the suite (can anyone out there speak on
the issue of compiler switches used at validation time?).
As touching the larger issue, however, it must be said that optimized
code STILL SHOULD BE LEGAL (of course, with a view toward the text
in LRM 11.6). The Ada language has many optimizable features which
are exploitable within the boundries of the standard. Certainly the
designers of Ada were aware that optimization was to be performed on
Ada code, and intended that the standard would define the EFFECTS that
a program would have, whatever optimizations were applied to it.
To "have to pay" for faster execution at the expense of legality is
dangerous and unnecessary.
Therefore, the legality of a program is to be considered independent of
optimization. Just because an implementation of the language has bugs
does not mean that Ada allows the kind of optimization that produces
the bugs. If the implementation does so, there is a bug in the
implementation.
One more thing concerning bugs: I read recently a ComputerWorld
article on cross-compilers in which someone (from the defense
community) said "There is an Ada validation suite which guarantees
that an Ada compiler has no bugs". This is a gross misundertanding of
the nature of the validation process. The validation suite has its
limits, and it DOES NOT indicate that a compiler is:
* good
* bug free
* useful for a particular application domain
* anything but a conformance to ANSI/MIL-STD 1815A-1983
Many Ada implementations are excellent, solid products with many
man-years of effort behind them. The fact that some bugs could exist
in such large and complex products is not at all suprising.
As for those products which pass validation but are of poor quality,
the only thing that can be said is "to the victor go the spoils" --
meaning of course that the bad compilers will be driven out of the
market.
Stanley Allen
allen_s%asd.span@jpl-vlsi.arpa
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1988-01-21 22:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1988-01-21 22:25 Optimizing compilers Stanley Roger Allen, AdaDude
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox