public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/61588] New: Optimization defaults are not what documentation say they should be
@ 2014-06-23 17:08 af300wsm at gmail dot com
2014-06-23 17:09 ` [Bug c/61588] " af300wsm at gmail dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: af300wsm at gmail dot com @ 2014-06-23 17:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61588
Bug ID: 61588
Summary: Optimization defaults are not what documentation say
they should be
Product: gcc
Version: 4.4.7
Status: UNCONFIRMED
Severity: critical
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: af300wsm at gmail dot com
Created attachment 32988
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32988&action=edit
Os settings for gcc 4.4.7
The default settings for optimization levels O2 and Os are not what the
documentation say they should be. This is true for gcc 4.4.7 on CentOS 6.5 (it
is also true for gcc 4.4.4 on CentOS 6.0).
The documentation found here:
https://gcc.gnu.org/onlinedocs/gcc-4.4.7/gcc/Optimize-Options.html#Optimize-Options
shows what is turned on/off between O2 and Os optimization options.
Specifically, the documentation implies that Os is O2 but favoring size of the
binary over speed. The following are the noted exceptions between Os (off) and
O2 (on):
- falign-functions
- falign-jumps
- falign-loops
- falign-labels
- freorder-blocks
- freorder-blocks-and-partition
- fprefetch-loop-arrays
- ftree-vect-loop-version
There are attachments to this bug for the O2 and Os settings for 4.4.4 (CentOS
6.0) and 4.4.7 (CentOS 6.5). As you'll notice with diffing between OS
versions, the list is identical (except that in CentOS 6.5, gcc 4.4.7,
fstrict-enums exists), and diffing between gcc versions shows only 1
difference: finline-functions.
Contrary to the gcc documentation for 4.4.7, all values noted above are enabled
except falign-loops, freorder-blocks-and-partition and fprefetch-loop-arrays.
Most concerning, however, is that all listed optimization settings between O2
and Os are identical with one exception. The one difference between these two
is finline-functions. Oddly, this is *disabled* in O2 and *enabled* in Os.
This seems contrary to the stated goal of Os.
The attached files were generated with this command:
$ gcc -Q -Ox --help=optimizers > <output_file> # where x is either 2 or s
This link,
https://gcc.gnu.org/onlinedocs/gcc-4.4.7/gcc/Overall-Options.html#Overall-Options
, shows the use of the -c option as well. However, I noted this made no
difference to the output.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/61588] Optimization defaults are not what documentation say they should be
2014-06-23 17:08 [Bug c/61588] New: Optimization defaults are not what documentation say they should be af300wsm at gmail dot com
2014-06-23 17:09 ` [Bug c/61588] " af300wsm at gmail dot com
2014-06-23 17:09 ` af300wsm at gmail dot com
@ 2014-06-23 17:09 ` af300wsm at gmail dot com
2014-06-25 8:49 ` mpolacek at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: af300wsm at gmail dot com @ 2014-06-23 17:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61588
--- Comment #2 from af300wsm at gmail dot com ---
Created attachment 32990
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32990&action=edit
O2 settings for 4.4.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/61588] Optimization defaults are not what documentation say they should be
2014-06-23 17:08 [Bug c/61588] New: Optimization defaults are not what documentation say they should be af300wsm at gmail dot com
@ 2014-06-23 17:09 ` af300wsm at gmail dot com
2014-06-23 17:09 ` af300wsm at gmail dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: af300wsm at gmail dot com @ 2014-06-23 17:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61588
--- Comment #1 from af300wsm at gmail dot com ---
Created attachment 32989
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32989&action=edit
O2 settings for 4.4.7
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/61588] Optimization defaults are not what documentation say they should be
2014-06-23 17:08 [Bug c/61588] New: Optimization defaults are not what documentation say they should be af300wsm at gmail dot com
2014-06-23 17:09 ` [Bug c/61588] " af300wsm at gmail dot com
@ 2014-06-23 17:09 ` af300wsm at gmail dot com
2014-06-23 17:09 ` af300wsm at gmail dot com
2014-06-25 8:49 ` mpolacek at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: af300wsm at gmail dot com @ 2014-06-23 17:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61588
--- Comment #3 from af300wsm at gmail dot com ---
Created attachment 32991
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32991&action=edit
Os settings for gcc 4.4.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/61588] Optimization defaults are not what documentation say they should be
2014-06-23 17:08 [Bug c/61588] New: Optimization defaults are not what documentation say they should be af300wsm at gmail dot com
` (2 preceding siblings ...)
2014-06-23 17:09 ` af300wsm at gmail dot com
@ 2014-06-25 8:49 ` mpolacek at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-06-25 8:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61588
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
Severity|critical |normal
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-06-25 8:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-23 17:08 [Bug c/61588] New: Optimization defaults are not what documentation say they should be af300wsm at gmail dot com
2014-06-23 17:09 ` [Bug c/61588] " af300wsm at gmail dot com
2014-06-23 17:09 ` af300wsm at gmail dot com
2014-06-23 17:09 ` af300wsm at gmail dot com
2014-06-25 8:49 ` mpolacek at gcc dot gnu.org
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).