public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mkretz at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/108030] `std::experimental::simd` not inlined
Date: Fri, 09 Dec 2022 14:51:37 +0000	[thread overview]
Message-ID: <bug-108030-4-rIBfuzcNu0@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108030-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #3 from Matthias Kretz (Vir) <mkretz at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #2)
> I bet by adding too many always_inline functions that call normal inlines
> that is what is bound to happen, one runs into inline growth limits.  It is
> better to use always_inline on the leaf functions rather than on what calls
> them.

How is the inline growth limit determined? I mean, in the cases where it really
hurts, the resulting function compiles down to a single instruction (plus
parameter passing boilerplate). The optimizer cannot know about the number of
instructions, so what is the measure it uses?

Especially with the helper functions necessary to work with parameter packs /
index_sequence, it's not enough to use always_inline on the leaf functions.
E.g. any simd binary operator basically should be [[gnu::always_inline,
gnu::flatten]]. However, simd maybe shouldn't use 'flatten' for functions that
call a user-provided callable (e.g. the simd generator constructor).

  parent reply	other threads:[~2022-12-09 14:51 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-09 11:29 [Bug libstdc++/108030] New: " bernhardmgruber at gmail dot com
2022-12-09 12:15 ` [Bug libstdc++/108030] " mkretz at gcc dot gnu.org
2022-12-09 12:15 ` mkretz at gcc dot gnu.org
2022-12-09 14:13 ` jakub at gcc dot gnu.org
2022-12-09 14:51 ` mkretz at gcc dot gnu.org [this message]
2022-12-09 14:55 ` jakub at gcc dot gnu.org
2023-02-16 14:58 ` cvs-commit at gcc dot gnu.org
2023-02-19 14:39 ` mkretz at gcc dot gnu.org
2023-02-19 15:21 ` bernhardmgruber at gmail dot com
2023-02-23 14:03 ` cvs-commit at gcc dot gnu.org
2023-02-23 14:04 ` cvs-commit at gcc dot gnu.org
2023-02-23 16:31 ` cvs-commit at gcc dot gnu.org
2023-02-23 19:46 ` cvs-commit at gcc dot gnu.org
2023-02-24 18:40 ` cvs-commit at gcc dot gnu.org
2023-02-24 18:54 ` mkretz at gcc dot gnu.org
2023-04-26  6:57 ` rguenth at gcc dot gnu.org
2023-04-30  9:06 ` mkretz at gcc dot gnu.org
2023-05-23 10:02 ` cvs-commit at gcc dot gnu.org
2023-05-23 10:02 ` cvs-commit at gcc dot gnu.org
2023-05-23 10:02 ` cvs-commit at gcc dot gnu.org
2023-05-25  7:04 ` cvs-commit at gcc dot gnu.org
2023-05-25  7:04 ` cvs-commit at gcc dot gnu.org
2023-05-25  7:04 ` cvs-commit at gcc dot gnu.org
2023-05-25  7:08 ` mkretz 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-108030-4-rIBfuzcNu0@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).