* Optimisation options turned on at a certain level
@ 2003-12-21 18:30 jgrant
2003-12-21 18:36 ` Ian Lance Taylor
0 siblings, 1 reply; 8+ messages in thread
From: jgrant @ 2003-12-21 18:30 UTC (permalink / raw)
To: gcc
Hello,
I'm trying to find where in the gcc documentation the list of optimisations
that are implied by specifying -O3 and -Os with my gcc3.2 install. I could
not find anything yet other than the following:
-O[number] Set optimisation level to [number]
-Os Optimise for space rather than speed
from gcc -v --help
Could someone direct me to where I should be looking for this list of
optimisations that are turned on with the different levels please?
Kind regards
Jonathan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Optimisation options turned on at a certain level
2003-12-21 18:30 Optimisation options turned on at a certain level jgrant
@ 2003-12-21 18:36 ` Ian Lance Taylor
0 siblings, 0 replies; 8+ messages in thread
From: Ian Lance Taylor @ 2003-12-21 18:36 UTC (permalink / raw)
To: jgrant; +Cc: gcc
jgrant@reflectionsinteractive.com writes:
> I'm trying to find where in the gcc documentation the list of optimisations
> that are implied by specifying -O3 and -Os with my gcc3.2 install. I could
> not find anything yet other than the following:
>
> -O[number] Set optimisation level to [number]
> -Os Optimise for space rather than speed
>
> from gcc -v --help
>
> Could someone direct me to where I should be looking for this list of
> optimisations that are turned on with the different levels please?
See the manual under ``Options That Control Optimization,'' or look
here (this is the 3.2.3 manual):
http://gcc.gnu.org/onlinedocs/gcc-3.2.3/gcc/Optimize-Options.html#Optimize%20Options
Ian
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: Optimisation options turned on at a certain level
@ 2004-01-18 19:31 jgrant
0 siblings, 0 replies; 8+ messages in thread
From: jgrant @ 2004-01-18 19:31 UTC (permalink / raw)
To: pinskia; +Cc: gcc, ian
Hi Andrew,
> No, the online docs comes from the info pages.
> What you are seeing is a newer version of the info pages.
> The latest and greatest version of the info page on a web page is
> located here: http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
Ok, thank you both for your replies.
Jonathan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Optimisation options turned on at a certain level
2004-01-18 18:26 jgrant
2004-01-18 19:08 ` Ian Lance Taylor
@ 2004-01-18 19:29 ` Andrew Pinski
1 sibling, 0 replies; 8+ messages in thread
From: Andrew Pinski @ 2004-01-18 19:29 UTC (permalink / raw)
To: jgrant; +Cc: gcc, ian, Andrew Pinski
On Jan 18, 2004, at 10:28, jgrant@reflectionsinteractive.com wrote:
> Hi Ian
>
> Thanks for the info.
>
>>> Could this be added the documentation? so its clear exactly what is
>>> being done by which options are being passed.
>>
>> My two comments are:
>>
>> 1) Documentation patches are always welcome.
>
> I noticed the info gcc pages were in some ways more detailed, for
> instance
> this optimisation page:
> http://www-es.fernuni-hagen.de/cgi-bin/info2html?
> (gcc)Optimize%20Options
>
> Are the gcc online manual documents maintained by different people
> from the
> gcc info pages? Perhaps some aspects could be combined.
No, the online docs comes from the info pages.
What you are seeing is a newer version of the info pages.
The latest and greatest version of the info page on a web page is
located here:
http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
Thanks,
Andrew Pinski
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Optimisation options turned on at a certain level
2004-01-18 18:26 jgrant
@ 2004-01-18 19:08 ` Ian Lance Taylor
2004-01-18 19:29 ` Andrew Pinski
1 sibling, 0 replies; 8+ messages in thread
From: Ian Lance Taylor @ 2004-01-18 19:08 UTC (permalink / raw)
To: jgrant; +Cc: gcc
jgrant@reflectionsinteractive.com writes:
> > 1) Documentation patches are always welcome.
>
> I noticed the info gcc pages were in some ways more detailed, for instance
> this optimisation page:
> http://www-es.fernuni-hagen.de/cgi-bin/info2html?(gcc)Optimize%20Options
>
> Are the gcc online manual documents maintained by different people from the
> gcc info pages? Perhaps some aspects could be combined.
Actually, the online manual and the info pages are generated from the
same source files. So if there are discrepancies, you must be looking
at different versions of the manual. Perhaps the documentation has
gotten better since your info files were generated. Hopefully it
hasn't gotten worse.
Ian
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: Optimisation options turned on at a certain level
@ 2004-01-18 18:26 jgrant
2004-01-18 19:08 ` Ian Lance Taylor
2004-01-18 19:29 ` Andrew Pinski
0 siblings, 2 replies; 8+ messages in thread
From: jgrant @ 2004-01-18 18:26 UTC (permalink / raw)
To: ian, jgrant; +Cc: gcc
Hi Ian
Thanks for the info.
> > Could this be added the documentation? so its clear exactly what is
> > being done by which options are being passed.
>
> My two comments are:
>
> 1) Documentation patches are always welcome.
I noticed the info gcc pages were in some ways more detailed, for instance
this optimisation page:
http://www-es.fernuni-hagen.de/cgi-bin/info2html?(gcc)Optimize%20Options
Are the gcc online manual documents maintained by different people from the
gcc info pages? Perhaps some aspects could be combined.
> 2) But note that the precise meaning of the optimization levels
> changes for different architectures. See the OPTIMIZATION_OPTIONS
> macro as defined in various gcc/config/*/*.h files.
Ok, am doing. Thank you for the direction.
Jonathan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Optimisation options turned on at a certain level
2003-12-22 11:00 jgrant
@ 2003-12-22 19:31 ` Ian Lance Taylor
0 siblings, 0 replies; 8+ messages in thread
From: Ian Lance Taylor @ 2003-12-22 19:31 UTC (permalink / raw)
To: jgrant; +Cc: gcc
jgrant@reflectionsinteractive.com writes:
> Could this be added the documentation? so its clear exactly what is being
> done by which options are being passed.
My two comments are:
1) Documentation patches are always welcome.
2) But note that the precise meaning of the optimization levels
changes for different architectures. See the OPTIMIZATION_OPTIONS
macro as defined in various gcc/config/*/*.h files.
Ian
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: Optimisation options turned on at a certain level
@ 2003-12-22 11:00 jgrant
2003-12-22 19:31 ` Ian Lance Taylor
0 siblings, 1 reply; 8+ messages in thread
From: jgrant @ 2003-12-22 11:00 UTC (permalink / raw)
To: ian; +Cc: gcc
Hello Ian,
Thank you for the link. Very useful.
I was hoping for a list of the options as well as the text describing the
different levels.
Could this be added the documentation? so its clear exactly what is being
done by which options are being passed. Perhaps something like:
Optimisation level -O1
-fomit-frame-pointer When possible do not
generate stack frames
-fdefer-pop Defer popping functions args
from stack until later
-fthread-jumps Perform jump threading
optimisations
-fdelayed-branch Attempt to fill delay slots
of branch instructions
Optimisation level -O3
-funroll-loops
etc
(I these may not be accurate, just for illustration)
What do you think?
Kind regards
Jonathan
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-01-18 19:31 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-21 18:30 Optimisation options turned on at a certain level jgrant
2003-12-21 18:36 ` Ian Lance Taylor
2003-12-22 11:00 jgrant
2003-12-22 19:31 ` Ian Lance Taylor
2004-01-18 18:26 jgrant
2004-01-18 19:08 ` Ian Lance Taylor
2004-01-18 19:29 ` Andrew Pinski
2004-01-18 19:31 jgrant
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).