This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -O1 & -O2
- To: Rob Emanuele <rje at cyan dot com>
- Subject: Re: -O1 & -O2
- From: Raimund Kirner <raimund at vmars dot tuwien dot ac dot at>
- Date: Fri, 14 Jul 2000 13:11:35 +0200 (MET DST)
- cc: Gcc <gcc at gcc dot gnu dot org>
Hi,
> If anyone could point me to where I can get a list of the
> optimizations that -O1, -O2, and -O3 turn on, I'd appreciate
> it.
The following table was derived by me from the source code of GCC 2.95.1.
The meaning of the several stages (like rtl, jump, ...) are described
in more detail in the book "Using and Porting GNU CC", available on
several GNU Documentation sites online in postscribt format.
The Y/N for Ox indicates, whether this stage is performing on default,
when optimization Ox is activated. The Flag-column describes the command
line parameter for activating this stage separately.
%%---------------BEGIN LATEX SOURCE -------------------------------------
\begin{tabular}{|l|c|c|c|c || c|c|l|}
\hline
Ext. & O0 & O1 & O2 & O3 & -da & Opt. & Flag \\
\hline\hline
rtl & \Y & \Y & \Y & \Y & \Y & dr & rtl\_dump \\ \hline
jump & \Y & \Y & \Y & \Y & \Y & dj & jump\_opt\_dump \\ \hline
cse & \N & \Y & \Y & \Y & \Y & ds & cse\_dump \\ \hline
addressof & \Y & \Y & \Y & \Y & \Y & dF & addressof\_dump \\ \hline
gcse & \N & \N & \Y & \Y & \Y & dG & gcse\_dump \\ \hline
loop & \N & \Y & \Y & \Y & \Y & dL & loop\_dump \\ \hline
cse2 & \N & \Y & \Y & \Y & \Y & dt & cse2\_dump \\ \hline
bp & \Y & \Y & \Y & \Y & \Y & db & branch\_prob\_dump \\ \hline
flow & \Y & \Y & \Y & \Y & \Y & df & flow\_dump \\ \hline
combine & \Y & \Y & \Y & \Y & \Y & dc & combine\_dump \\ \hline
regmove & \N & \N & \Y & \Y & \Y & dN & regmove\_dump \\ \hline
sched & \N & \N & \N & \N & \Y & dS & sched\_dump \\ \hline
lreg & \Y & \Y & \Y & \Y & \Y & dl & local\_reg\_dump \\ \hline
greg & \Y & \Y & \Y & \Y & \Y & dg & global\_reg\_dump \\ \hline
flow2 & \Y & \Y & \Y & \Y & \Y & dw & flow2\_dump \\ \hline
sched2 & \N & \N & \N & \N & \Y & dR & sched2\_dump \\ \hline
jump2 & \N & \Y & \Y & \Y & \Y & dJ & jump2\_opt\_dump \\ \hline
\hline
mach & \N & \N & \N & \N & \N & dM & mach\_dep\_reorg\_dump \\
\hline
dbr & \N & \N & \N & \N & \N & dd & dbr\_sched\_dump \\ \hline
stack & \N & \N & \N & \N & \N & dk & stack\_reg\_dump \\ \hline
\end{tabular}
%%----------------END LATEX SOURCE --------------------------------------
Raimund