Optimization (was Re: volatile)

Every system needs one terry at wsccs.UUCP
Tue May 17 13:57:22 AEST 1988


In article <4628 at ihlpf.ATT.COM>, nevin1 at ihlpf.ATT.COM (00704a-Liber) writes:
> In article <511 at wsccs.UUCP> terry at wsccs.UUCP (Every system needs one) writes:
> 
> >I didn't say they shouldn't effect the generated program, I said that they
> >shouldn't effect the OPERATION of the generated program.
> 
> What's the difference between your two statements?  Optimizers, almost by
> definition, do effect the operation of the generated program.

Not from a black-box point of view.  The only thing that's effected from the
user's point of view is execution speed and/or resource usage, not what the
user thinks of as "operation".  The same information in produces the same
information out.

My qualm is that badly written optimizers operating on "good code" (code not
dependant on side effects) sometimes change the shape of the black box, and
they should not.

				terry at wsccs



More information about the Comp.lang.c mailing list