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 libstdc++/108030] `std::experimental::simd` not inlined
Date: Fri, 09 Dec 2022 14:55:57 +0000	[thread overview]
Message-ID: <bug-108030-4-qlEzLhhmO7@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 #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Matthias Kretz (Vir) from comment #3)
> (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?

I've CCed Honza, who should know the answers.
The inliner can't know if say some builtin will fold into a single instruction
or not,
it uses some heuristics on GIMPLE IL sizes.  Bet -fdump-ipa-inline-details
contain
all the reasons, but at least for me those dumps are hard to read.

  parent reply	other threads:[~2022-12-09 14:55 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
2022-12-09 14:55 ` jakub at gcc dot gnu.org [this message]
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-qlEzLhhmO7@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).