public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "sen2403 at hotmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/91299] LTO inlines a weak definition in presence of a non-weak definition from an ELF file
Date: Thu, 25 Aug 2022 13:01:40 +0000	[thread overview]
Message-ID: <bug-91299-4-a4vYj6ylYT@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-91299-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #12 from Eason Lai <sen2403 at hotmail dot com> ---
Hope this information could help.

I added "-fopt-info-inline-optimized-missed=inline.txt" in the CFLAGS to see
what happens between -Os and -O1.

Here is the output when using "-O1":
missed:   not inlinable: main/5 -> get_t/4, function not inline candidate

Here is the output when using "-Os":
main.c:13:9: missed:   not inlinable: main/5 -> get_t/4, function body can be
overwritten at link time
optimized:  Inlined get_t/4 into main/5 which now has time 3.000000 and size 4,
net change of +0.

It happens in ipa-inline.c::inline_small_functions when using "-O2" or above.

  parent reply	other threads:[~2022-08-25 13:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-91299-4@http.gcc.gnu.org/bugzilla/>
2022-07-20  6:29 ` sen2403 at hotmail dot com
2022-07-20  7:23 ` amonakov at gcc dot gnu.org
2022-07-20 10:44 ` sen2403 at hotmail dot com
2022-07-26 12:27 ` amonakov at gcc dot gnu.org
2022-08-25 13:01 ` sen2403 at hotmail dot com [this message]
2022-08-25 13:22 ` sen2403 at hotmail dot com
2022-09-06  7:20 ` [Bug lto/91299] [10/11/12/13 Regression] " amonakov at gcc dot gnu.org
2022-10-18  7:50 ` rguenth at gcc dot gnu.org
2023-07-07 10:35 ` [Bug lto/91299] [11/12/13/14 " 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=bug-91299-4-a4vYj6ylYT@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).