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 middle-end/94146] [10 Regression] Merging functions with same bodies stopped working
Date: Thu, 12 Mar 2020 09:07:53 +0000	[thread overview]
Message-ID: <bug-94146-4-jx9WNBI9dk@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 #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #4)
> (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?)

ICF has I think 3 options, one is adjust all callers if they can be adjusted,
another one is to use alias and another one to use a thunk.  Whether to use an
alias or thunk depends on whether something might perform function address
comparisons.

  parent reply	other threads:[~2020-03-12  9:07 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
2020-03-12  9:07 ` jakub at gcc dot gnu.org [this message]
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-jx9WNBI9dk@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).