public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "elrodc at gmail dot com" <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, 06 May 2024 02:23:20 +0000	[thread overview]
Message-ID: <bug-93008-4-3g9LsFkpHZ@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 #14 from Chris Elrod <elrodc at gmail dot com> ---
To me, an "inline" function is one that the compiler inlines.
It just happens that the `inline` keyword also means both comdat semantics, and
possibly hiding the symbol to make it internal (-fvisibility-inlines-hidden).
It also just happens to be the case that the vast majority of the time I mark a
function `inline`, it is because of this, not because of the compiler hint.
`static` of course also specifies internal linkage, but I generally prefer the
comdat semantics: I'd rather merge than duplicate the definitions.

If there is a new keyword or pragma meaning comdat semantics (and preferably
also specifying internal linkage), I would rather have the name reference that.

I'd rather have a positive name about what it does, than negative:
"quasi_inline: like inline, except it does everything inline does except the
inline part".
Why define as a set diff -- naming it after the thing it does not do! -- if you
could define it in the affirmative, based on what it does in the first place?

  parent reply	other threads:[~2024-05-06  2:23 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
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 [this message]
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-3g9LsFkpHZ@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).