Optimization (was Re: volatile)
Every system needs one
terry at wsccs.UUCP
Tue May 17 13:48:47 AEST 1988
In article <310 at zinn.MV.COM>, mem at zinn.MV.COM (Mark E. Mallett) writes:
| In article <3938 at killer.UUCP>, chasm at killer.UUCP (Charles Marslett) writes:
| > In article <13074 at brl-adm.ARPA>, dsill at NSWC-OAS.arpa (Dave Sill) writes:
| > > Terry Lambert writes:
| > >
| > > This bears repeating. There should be no circumstances under which
| > > the semantics of the language are changed by a flag to the compiler.
|
| Avoiding the word "semantics", -O can change the way the program
| operates, which is what is important in this discussion.
|
| And if you don't think that the semantics of the language can be changed
| by a flag to the compiler, well... what about "-D" ??
Mark:
First: I am the one being repeated, not doing the repeating.
Second: The statement being repeated did NOT deal with all
options; only -O... it was:
|Basically, if it works without -O, it should work with -O, regardless of what
|the compiler writer's optimization does to achieve its goal. If this makes
|writing compilers harder, so what?
Third: The point was that while a transform based -O is most likely
a non-reversable one, no information should be lost due to
bad assumptions made by the compiler writer, and that ANSI
C was a cop-out by compiler writers who wanted the hard
work of determining volatility and aliases, as well as
other information useful for optimization, done by the
programmer. I simply suggested that I could not see one
instance of where it was conceptually impossible for a
compiler writer to determine these things; just damn hard.
My point was "better the compiler writer than the compiler
user".
| Terry Lambert UUCP: ...{ decvax, ihnp4 } ...utah-cs!century!terry |
| @ Century Software OR: ...utah-cs!uplherc!sp7040!obie!wsccs!terry |
| SLC, Utah |
| These opinions are not my companies, but if you find them |
| useful, send a $20.00 donation to Brisbane Australia... |
| 'Admit it! You're just harrasing me because of the quote in my signature!' |
More information about the Comp.lang.c
mailing list