public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "sje at cup dot hp.com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/45781] [4.6 Regression] GCC incorrectly puts function in .text.unlikely Date: Thu, 30 Sep 2010 20:06:00 -0000 [thread overview] Message-ID: <20100930200600.D_sFCzEngyN2qDdnYQMpytzdTcX1gQlBW0gaxHukUps@z> (raw) In-Reply-To: <bug-45781-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45781 --- Comment #3 from Steve Ellcey <sje at cup dot hp.com> 2010-09-30 17:41:36 UTC --- (In reply to comment #1) > The decision is reasonable (I suppose partial inlining will inline the > if (!init) case) as the function is called exactly once then and thus > should be optimized for size and put into a separate section. But when I compile with -O2, partial inlining doesn't inline anything. All the calls still exist as they are in the code. Actually, the only reason I can see for moving init_target_chars to .text.unlikely is that there are 3 'early returns' in fold_builtin_snprintf_chk that could prevent the execution from ever getting to the init_target_chars call. Maybe that is why GCC put it in .text.unlikely. Very strange, I added: tree rewrite_call_expr() { return 0; } to my test case and recompiled to see if this new code went into .text.unlikely but for some reason that caused everything (including init_target_chars) to be put into .text. > > The question is thus, why does that break IA64 bootstrap? > > If IA64 doesn't support .text.unlikely it should define > UNLIKELY_EXECUTED_TEXT_SECTION_NAME appropriately. Yes, I think I need to define this for IA64 HP-UX.
next prev parent reply other threads:[~2010-09-30 17:41 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-09-24 18:42 [Bug tree-optimization/45781] New: " sje at cup dot hp.com 2010-09-24 19:13 ` [Bug tree-optimization/45781] [4.6 Regression] " rguenth at gcc dot gnu.org 2010-09-30 11:12 ` rguenth at gcc dot gnu.org 2010-09-30 19:24 ` hubicka at gcc dot gnu.org 2010-09-30 20:06 ` sje at cup dot hp.com [this message] [not found] ` <20100930174146.0DA51F0350@atrey.karlin.mff.cuni.cz> 2010-09-30 20:25 ` Jan Hubicka 2010-09-30 20:38 ` hubicka at ucw dot cz 2010-09-30 21:01 ` hubicka at gcc dot gnu.org 2010-10-14 21:28 ` hubicka at gcc dot gnu.org 2010-11-04 11:49 ` rguenth 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=20100930200600.D_sFCzEngyN2qDdnYQMpytzdTcX1gQlBW0gaxHukUps@z \ --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).