all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattiase@acm.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: __builtin_assume warnings
Date: Wed, 19 Aug 2020 10:01:04 +0200	[thread overview]
Message-ID: <538D98E3-DCE7-4A6C-B1AC-B00253E1CCA1@acm.org> (raw)
In-Reply-To: <25e394e9-0e6e-7794-3e90-5fbab3951678@cs.ucla.edu>

19 aug. 2020 kl. 00.53 skrev Paul Eggert <eggert@cs.ucla.edu>:

> No, it's the other way around at least for me: having 'assume' use Clang's __builtin_assume makes 'assume' slower. Without __builtin_assume, 'assume' falls back on __builtin_unreachable, and Clang generates better code for __builtin_unreachable than it does __builtin_assume.

Right you are; as far as I can tell, __builtin_assume is strictly less useful. There does not seem to be any point in using it at this time. The only advantage over if(!x)__builtin_unreachable() appears to be that the argument isn't actually evaluated, but I'm not sure when that property would be useful.

Thank you for clearing that up.




      reply	other threads:[~2020-08-19  8:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-12  9:38 __builtin_assume warnings Mattias Engdegård
2020-08-15  2:32 ` Paul Eggert
2020-08-16  8:23   ` Mattias Engdegård
2020-08-17 14:05     ` Mattias Engdegård
2020-08-17 22:11       ` Paul Eggert
2020-08-18  7:11         ` Mattias Engdegård
2020-08-18 22:53           ` Paul Eggert
2020-08-19  8:01             ` Mattias Engdegård [this message]

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=538D98E3-DCE7-4A6C-B1AC-B00253E1CCA1@acm.org \
    --to=mattiase@acm.org \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.