This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Need some opinions
At 22:28 +0000 3/6/99, craig@jcb-sc.com wrote:
>>I would prefer to do this. I think we should be doing just a tad
>>more work in "no optimization" mode, primarily in terms of getting
>>rid of unreachable code.
>>
> .
....
> My feeling is, if the optimization is likely to save as much (or more)
> overall compile/link time as, say, twice as much as it costs, it's
> probably worth turning on for -O0.
>
> E.g. folding constants, done for -O0, costs time up front, but saves
> all sorts of code-generation time down the line -- in later RTL
> phases, in generated the .s file, in running the assembler, the
> linker, and the loader, etc.
>
Measurement that the CMU BLISS-11 developers made bear this
out. They found that running with full optimization that the
total execution time was lower than with optimization off.
(That was for a DEC-10 hosted cross compiler (36 bit words
generating code for a 16 bit machine.
For Bliss32, the results were less conclusive, but that compiler
generated object code directly without emitting assembly
source as an intermediate.
The only fly in this ointment is that OCCASIONALLY even
the simple optimizations have bugs in 'em; so having a way
to force absolutely minimal optimization is still desirable.
-- Al Lehotsky
------------------------------------------------------------------------
Quality Software Management
http://www.tiac.net/users/lehotsky
lehotsky@tiac.net
(978)287-0435 Voice
(978)287-0436 Fax/Data
Software Process Improvement and Management Consulting
Language Design and Compiler Implementation