This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gcc optimization flag breakdown
- From: Andrew Haley <aph-gcc at littlepinkcloud dot COM>
- To: Nathan Thomas <nthomas at cs dot tamu dot edu>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Fri, 20 Jul 2007 10:44:22 +0100
- Subject: Re: gcc optimization flag breakdown
- References: <f7lkhr$alu$1@sea.gmane.org>
Nathan Thomas writes:
> Hi all,
>
> ===> gcc 4.1.1 (release), AIX 5.3
>
> What else does the -O1 flag turn on besides the options listed in the following
> document? Is there any way to turn these on/off incrementally?
>
> http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Optimize-Options.html#Optimize-Options
>
> I'm trying to isolate the cause of excessively long compile times for a c++ code
> when both debug information (-g) and any optimization level (O1/O2/O3) are enabled.
>
> The compile time is fine when I explicitly pass all the flags that -O1 is
> documented to engage along with -g. However, it blows up (in the assembler, up
> to 10x) when I call -O1 directly.
Unless you use -O, you get no optimization. Turning the indivisual
flags on does nothing.
Andrew.