public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "yann.collet.73 at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/67435] Large performance drop on apparently unrelated changes (probable cause : strange inlining side-effect) Date: Thu, 03 Sep 2015 02:44:00 -0000 [thread overview] Message-ID: <bug-67435-4-Va5MMmAcGe@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-67435-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67435 --- Comment #6 from Yann Collet <yann.collet.73 at gmail dot com> --- The issue seems in fact related to _instruction alignment_. More precisely, to alignment of some critical loop. That's basically why adding some code in the file would just "pushes" some other code into another position, potentially into a less favorable path (hence the appearance of "random impact"). The following GCC command saved the day : -falign-loops=32 Note that -falign-loops=16 doesn't work. I'm suspecting it might be the default value, but can't be sure. I'm also suspecting that -falign-loops=32 is primarily useful for Broadwell cpu. Now, the problem is, `-falign-loops=32` is a gcc-only command line parameter. It seems not possible to apply this optimization from within the source file, such as using : #pragma GCC optimize ("align-loops=32") or the function targeted : __attribute__((optimize("align-loops=32"))) None of these alternatives does work.
next prev parent reply other threads:[~2015-09-03 2:44 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-09-02 13:24 [Bug c/67435] New: " yann.collet.73 at gmail dot com 2015-09-02 14:01 ` [Bug c/67435] " trippels at gcc dot gnu.org 2015-09-02 14:03 ` pinskia at gcc dot gnu.org 2015-09-02 14:51 ` yann.collet.73 at gmail dot com 2015-09-03 2:44 ` yann.collet.73 at gmail dot com [this message] 2015-09-03 7:19 ` [Bug c/67435] Large performance drop on apparently unrelated changes (potential cause : critical loop instruction alignment) trippels at gcc dot gnu.org 2015-09-03 18:47 ` yann.collet.73 at gmail dot com 2015-09-04 10:23 ` [Bug c/67435] Large performance drop on apparently unrelated changes (potential cause : hot loop alignment) trippels at gcc dot gnu.org 2015-09-04 10:34 ` [Bug c/67435] Feature request: Implement align-loops attribute trippels at gcc dot gnu.org 2015-10-20 13:09 ` yann.collet.73 at gmail dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-67435-4-Va5MMmAcGe@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).