public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hubicka at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/93008] Need a way to make inlining heuristics ignore whether a function is inline
Date: Mon, 09 Nov 2020 07:26:50 +0000	[thread overview]
Message-ID: <bug-93008-4-DCigctqEm8@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-93008-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #6 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
I just noticed this PR and wonder if there is anything to do on inliner side. 
It uses DECL_DECLARED_INLINE that was invented to distinguish between implicit
inlines and explicit ones. So even if it would be bit misnamed it should mean
"this is an inline hint for inliner", so I guess frontend needs to distinguish
between constexpr and normal places where inline hint still means "inline
more"?

Inliner is really not on level to be able to completely ignore used inline
hints without regressing various code.

I made inline weaker for -O2 in GCC10 but for -O3 we still take it very
seriously and I do not see way out of that: in many cases it is very hard to
predict how much optimization will happen after inlining and a lot of code is
carefully crafted under assumption that some specific inline happens (and a lot
of such code is in C++)

       reply	other threads:[~2020-11-09  7:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-93008-4@http.gcc.gnu.org/bugzilla/>
2020-11-09  7:26 ` hubicka at gcc dot gnu.org [this message]
2021-11-29  1:52 ` pinskia at gcc dot gnu.org
2024-04-19 11:31 ` redi at gcc dot gnu.org
2024-04-22  8:28 ` hubicka at gcc dot gnu.org
2024-04-22  8:31 ` redi at gcc dot gnu.org
2024-04-22  8:33 ` redi at gcc dot gnu.org
2024-05-04 20:52 ` egallager at gcc dot gnu.org
2024-05-04 23:16 ` redi at gcc dot gnu.org
2024-05-06  1:02 ` egallager at gcc dot gnu.org
2024-05-06  2:23 ` elrodc at gmail dot com
2024-05-06  2:31 ` ldalessandro at gmail dot com

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-93008-4-DCigctqEm8@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).