Bob Wells Tel: +44/0 1865 272915 wrote:
>
> Dick Hendrickson wrote
> > In effect, optimizations which are not detectable
> > with something like PRINT statements are OK.
So, Dick, can you get J3 to officially get back to this position???
> As in a feature John Appleyard has just reported on c.l.f where
> an aggresive optimiser removed all the code from a program which
> did not contain any IO statements !
Absolutely. The Burroughs compiler did this in the '70s and
it took my a while to figure out why some loops I was benchmarking
ran so fast. Until I looked at the machine instructions for the
loop and discovered there weren't any.
> Perhaps the wording of the standard should reflect existing
> practice more closely rather than create a lawyers dream.
I often disagree with this sort of statement in a different
context 8^), but it certainly is right on for this situation.
But we all seem to be in violent agreement. But just to see:
Does anybody think a compiler should not be allowed to do
the kinds of optimizations we have been talking about:
moving invariant code out of loops, removing "dead" code,
inlining procedures, combining expressions in more than
one statement (Interp #1?) etc?
--
Walt Brainerd [log in to unmask]
Unicomp, Inc. +1-520-298-7212 298-7074 (fax)
7660 E. Broadway, Suite 308 888-330-6060
Tucson, AZ 85710 USA http://www.uni-comp.com
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|