This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: criteria.html open issues
- To: zackw at Stanford dot EDU (Zack Weinberg)
- Subject: Re: criteria.html open issues
- From: Joern Rennecke <amylaar at redhat dot com>
- Date: Fri, 15 Jun 2001 15:22:31 +0100 (BST)
- Cc: dewar at gnat dot com, acahalan at cs dot uml dot edu, gcc at gcc dot gnu dot org
> I didn't mean to imply that there shouldn't be defaults, only that
> categorizing optimizations by _levels_ isn't useful. Keep -O and/or
> -O2 by all means, but let's not have -O3, -O4, ... -O9 the way some
> vendor compilers do. I might even suggest eliminating -O1 (make -O
> synonymous with -O2). It's never been clear what the difference is in
> terms of the tradeoffs I mentioned.
That is because -O1 has also another, even more important goal.
It provides reasonably fast compilation with optimization while
still generating code that is fairly easy to debug.
-O2 enables a number of more agressive optimizations that can
leave you completely lost, as instructions are out of order, or
split and / or combined with instructions from other statements, and
operate on different data with different lifetimes as in the source.