public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Luca Bacci <luca.bacci982@gmail.com>
Cc: "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
Subject: Re: Checking for built-in functions from build systems
Date: Wed, 10 Aug 2022 23:27:43 +0200	[thread overview]
Message-ID: <CAH6eHdQ-N0kGm6VaWCzb1b7ncN6gN6AJ0nMaMtFxdM0-SgzLWA@mail.gmail.com> (raw)
In-Reply-To: <CAJSEPt1Fab81gBq6zA8LkshGYyp-oKZXm=fLUYQPgz_PY56GZw@mail.gmail.com>

On Wed, 10 Aug 2022, 23:12 Luca Bacci via Gcc, <gcc@gcc.gnu.org> wrote:

>
> 1. Is inlining of built-ins dependant only on the target architecture and
> command-line arguments?
>

No, I think it can depend on the arguments to the built-in as well.


2. If the answer to 1 is yes, could a __is_builtin_inlined (func) macro be
> added to GCC? It should tell whether func is going to be substituted inline
> for the given compiler invocation


I don't think that can work for some built-ins, e.g. in a single
translation unit memcmp can be inlined for constant arguments of small
size, and not inlined for other calls.

  reply	other threads:[~2022-08-10 21:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-10 21:11 Luca Bacci
2022-08-10 21:27 ` Jonathan Wakely [this message]
2022-08-10 22:16   ` Luca Bacci

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=CAH6eHdQ-N0kGm6VaWCzb1b7ncN6gN6AJ0nMaMtFxdM0-SgzLWA@mail.gmail.com \
    --to=jwakely.gcc@gmail.com \
    --cc=gcc@gcc.gnu.org \
    --cc=luca.bacci982@gmail.com \
    /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).