This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: What happens when -O1 flag is used?
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: ranjith kumar <ranjit_kumar_b4u at yahoo dot co dot uk>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Fri, 23 Feb 2007 14:27:08 +0100
- Subject: Re: What happens when -O1 flag is used?
- References: <20070223124029.67425.qmail@web27413.mail.ukl.yahoo.com>
1)Are -O and -O1 flags equal?
Yes.
2) What happens internally when -O1/-O flag is
used?
Lots of stuff, read the source code; gcc/opts.c is a
good starting point. The "optimize" variable is set
to the optimisation level.
I have been searching gcc internal manuals. But
I could not locate.
The internals manual is not a replacement for the source
code; the manual is meant to help understanding and modifying
the source code.
Have fun and good luck,
Segher