This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -O2 versus -O1 (Was: Re: GCSE store motion)
- From: Brad Lucier <lucier at math dot purdue dot edu>
- To: gcc at gcc dot gnu dot org
- Cc: lucier at math dot purdue dot edu
- Date: Thu, 16 May 2002 10:29:21 -0500 (EST)
- Subject: Re: -O2 versus -O1 (Was: Re: GCSE store motion)
There was a long thread in 1999 about compile time versus -Ok, k=1,2,...
In the end, I suggested the following guidelines.
If an optimization takes O(N) or O(N log N) time, put it in -O1.
(Here N is the number of instructions or edges.) Otherwise, it should go in
-O2.
If an optimization can be computed using one bit per edge or per
register-basic block pair, then put it in -O1, otherwise put it in -O2.
The subject line was " How long should -O1 compiles take?" and it began
in October. My final suggestion had the subject line
"How much resources for -Ok, k=1,2,...?" on November 15.
Brad