-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default flags enabled by GCC at -O3 by default appear to be out of sync with the GCC documentation #3
Comments
ArchLinux:
P.S. |
Whoops--copied in some extraneous spaces from my terminal that hid it. Thanks! |
That's interesting. I'll check GCC HEAD to see if it's enabled in there. |
Same for 6.4.0:
|
If the documentation changed between 4.9.4 and 5.1.0, then that doesn't explain why my GCC output for v4.9.4 is the same as v5.4.0, v6.4.0, and v7.2.0, e.g.,
i.e., the -c -Q -O3 --help=optimizers outputs are all identical --so the GCC documentation differs from the settings (unless this is due to a Gentoo patch on GCC --I didn't check). |
It is entirely possible that the graphite or some other Gentoo USE flag changes this setting. Checking with GCC pristine sources is the only definitive way to know for sure if the docs are out-of-sync. |
Per the GCC 7.2.0 sources, file
Note in that list, ftree_loop_distribution is not present. I think either the docs should be amended or the O3 options should be. |
Just built GCC 7.2.0 from scratch just to be sure there weren't any build time modifications that would change the state of the flag.
Unless someone has an objection, I'm going to go ahead and file a bug report upstream |
Bug report is here, for interested parties: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82197 |
Turns out this documentation is actually for GCC trunk. TIL! The behaviour is correct for 6.4.0 and 7.2.0. I'll make a note to revise the flags for the next GCC release. |
Hi everyone,
I was working on refining
make.conf
today and I noticed a bit of an oddity. On GCC's docs, they give a list of all optimizations enabled by default at O3:https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
Curiously, they list
-ftree-loop-distribution
as being enabled by default by O3, but in my own GCC it remains disabled:I was wondering if anyone could check if this is the case on their systems too? Please include your GCC version in your response. If I can get at least one person to reproduce this bug I'll make a bug report in GCC.
The text was updated successfully, but these errors were encountered: