public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Michael Matz <matz@suse.de>
To: Richard Biener <richard.guenther@gmail.com>
Cc: Georg-Johann Lay <avr@gjlay.de>,
	Paul Koning <paulkoning@comcast.net>,
	 gcc@gcc.gnu.org
Subject: Re: How to avoid some built-in expansions in gcc?
Date: Tue, 4 Jun 2024 19:43:40 +0200 (CEST)	[thread overview]
Message-ID: <2e3fd315-fd89-10ad-f375-cdf4d032fbe4@suse.de> (raw)
In-Reply-To: <B9AC78CE-73CD-4CB9-8841-9B0AA162247D@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1433 bytes --]

Hello,

On Tue, 4 Jun 2024, Richard Biener wrote:

> >> A pragmatic solution might be a new target hook, indicating a specified
> >> builtin is not to be folded into an open-coded form.
> > 
> > Well, that's what the mechanism behind -fno-builtin-foobar is supposed to
> > be IMHO.  Hopefully the newly added additional mechanism using optabs and
> > ifns (instead of builtins) heeds it.
> 
> -fno-builtin makes GCC not know semantics of the functions called 

Hmm, true.  Not expanding inline is orthogonal strictly speaking ...

> which is worse for optimization than just not inline expanding it.

... but on AVR expanding inline is probably worse than that lost 
knowledge.  So yeah, ideally we would devise a (simple/reasonable) way to 
at least disable inline expansion, without making it non-builtin.

(Well, and without reverse-recognition of isfinite-like idioms in the 
sources.  That's orthogonal as well.)


Ciao,
Michael.

> 
> Richard 
> 
> >> A good solution would base this on (size) costs, the perfect solution
> >> would re-discover the builtins late and undo inlining that didn’t turn
> >> out to enable further simplification.
> >> 
> >> How is inlined isdigit bad on AVR?  Is a call really that cheap
> >> considering possible register spilling around it?
> > 
> > On AVR with needing to use 8bit registers to do everything?  I'm pretty
> > sure the call is cheaper, yeah :)
> > 
> > 
> > Ciao,
> > Michael.
> 

  reply	other threads:[~2024-06-04 17:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-31 13:52 Georg-Johann Lay
2024-05-31 13:56 ` Jonathan Wakely
2024-05-31 14:53   ` Georg-Johann Lay
2024-05-31 14:53     ` Jonathan Wakely
2024-05-31 15:00 ` Paul Koning
2024-05-31 15:06   ` Georg-Johann Lay
2024-05-31 15:23     ` Paul Koning
2024-05-31 17:32       ` Richard Biener
2024-05-31 18:56         ` Georg-Johann Lay
2024-05-31 20:12           ` Richard Biener
2024-06-01 15:41             ` Georg-Johann Lay
2024-06-01 17:30               ` Richard Biener
2024-06-04 14:55                 ` Michael Matz
2024-06-04 16:43                   ` Richard Biener
2024-06-04 17:43                     ` Michael Matz [this message]
2024-06-04 17:48                       ` Jakub Jelinek
2024-06-05 13:52                         ` Michael Matz
2024-06-05 13:33                       ` David Brown
2024-06-05 14:08                         ` Michael Matz
2024-06-05 14:16                           ` Richard Biener

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=2e3fd315-fd89-10ad-f375-cdf4d032fbe4@suse.de \
    --to=matz@suse.de \
    --cc=avr@gjlay.de \
    --cc=gcc@gcc.gnu.org \
    --cc=paulkoning@comcast.net \
    --cc=richard.guenther@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).