public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/94146] [10 Regression] Merging functions with same bodies stopped working
Date: Thu, 12 Mar 2020 08:57:55 +0000	[thread overview]
Message-ID: <bug-94146-4-F0cNb5tqFG@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-94146-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94146

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #3)
> If not already marked clearly as an ICF created thunk, I'd say it should be
> and then inliner should take it into account (and only inline if the
> function became very small or not at all).

It looks like ICF really creates a forwarding call:

ternary2 (int i)
{
  int retval.4;

  <bb 2> [local count: 1073741824]:
  retval.4_3 = ternary (i_2(D)); [tail call]
  return retval.4_3;

}

so IMHO for small functions the inlining is good (but why don't we create
an alias or an alternate entry symbol instead of a full (aligned) function?)

For big functions the inlining shouldn't happen indeed, possibly by detecting
this kind of forwarders?

So we're missing a testcase showing the regression IMHO.  It still works
with -Os for the testcase.

  parent reply	other threads:[~2020-03-12  8:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-11 16:11 [Bug middle-end/94146] New: " antoshkka at gmail dot com
2020-03-11 17:48 ` [Bug middle-end/94146] [10 Regression] " jakub at gcc dot gnu.org
2020-03-11 17:54 ` jakub at gcc dot gnu.org
2020-03-11 17:57 ` jakub at gcc dot gnu.org
2020-03-12  8:57 ` rguenth at gcc dot gnu.org [this message]
2020-03-12  9:07 ` jakub at gcc dot gnu.org
2020-03-12  9:18 ` marxin at gcc dot gnu.org
2020-03-12 10:38 ` pinskia 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-94146-4-F0cNb5tqFG@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: link
Be 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).