public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug other/49194] Trivially stupid inlining decisions Date: Fri, 27 May 2011 16:12:00 -0000 [thread overview] Message-ID: <bug-49194-4-1I3japhKVV@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-49194-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49194 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2011.05.27 16:02:09 CC| |hubicka at gcc dot gnu.org, | |jakub at gcc dot gnu.org Ever Confirmed|0 |1 --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-05-27 16:02:09 UTC --- I agree if the called function is big and it is very unlikely (most probably just in PROB_VERY_UNLIKELY cases) -finline-functions-called-once shouldn't inline. E.g. void baz (void); static void foo (int x) { char buf[65536]; int a, b, c, d, e, f, g, h, i, j, k, l, m; #define A asm volatile ("nop" : "+r" (x), "=r" (a), "=r" (b), "=r" (c), \ "=r" (d), "=r" (e), "=r" (f), "=r" (g), "=r" (h), \ "=r" (i), "=r" (j), "=r" (k), "=r" (l), "=r" (m) \ : "r" (buf)); #define B A A A A A A A A A A A #define C B B B B B B B B B B B C } int bar (int x) { if (__builtin_expect (x > 65, 0)) foo (x + 6); baz (); return x; } inlines foo at -O2.
next prev parent reply other threads:[~2011-05-27 16:02 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-05-27 15:32 [Bug other/49194] New: " torvalds@linux-foundation.org 2011-05-27 16:12 ` jakub at gcc dot gnu.org [this message] 2011-05-27 16:15 ` [Bug other/49194] " matz at gcc dot gnu.org 2011-05-27 16:20 ` hubicka at ucw dot cz 2011-05-27 16:25 ` hubicka at gcc dot gnu.org 2011-05-27 16:32 ` jakub at gcc dot gnu.org 2011-05-27 16:45 ` torvalds@linux-foundation.org 2011-05-27 18:52 ` hubicka at ucw dot cz 2012-03-25 9:57 ` hubicka at gcc dot gnu.org
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-49194-4-1I3japhKVV@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).