https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26367
Andrew Pinski changed:
What|Removed |Added
Status|WAITING |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26367
Martin Sebor changed:
What|Removed |Added
Status|UNCONFIRMED |WAITING
Last reconfirmed|
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26367
--- Comment #7 from Andrew Pinski 2011-12-22
01:21:00 UTC ---
I think __builtin_unreachable resolved some of this already. Also probilities
to noreturn functions are marked as notlikely already.
--- Comment #6 from acahalan at gmail dot com 2006-02-22 03:18 ---
I don't think it is legit to extract any sort of certainty from this:
if (x == 0)
abort();
return x;
There may be a SIGABRT handler which allows the program to live.
--
http://gcc.gnu.org/bugzilla/show_bug.
--- Comment #5 from rguenth at gcc dot gnu dot org 2006-02-21 10:03 ---
With exception to 'certain' this doesn't really make sense. And the 'certain'
one
should be called __builtin_assert(). But then, VRP or DOM might already
extract information from
if (x == 0)
abort();
retur
--- Comment #4 from acahalan at gmail dot com 2006-02-20 04:11 ---
It's interesting that you say "__builtin_expect gives the same probability on
all targets". I'm not exactly sure what you mean, but I'll guess that you mean
it states that the condition will be true X% of the time.
If so
--- Comment #3 from pinskia at gcc dot gnu dot org 2006-02-20 03:51 ---
Oh, did I forgot __builtin_expect gives the same probability on all targets,
just some use it more than others.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26367
--- Comment #2 from acahalan at gmail dot com 2006-02-20 03:49 ---
I gave two examples. (you may assume I want code to run fast)
I first saw this feature proposed on the linux-kernel mailing list when there
was some argument over whether or not __builtin_expect() should be used in a
par
--- Comment #1 from pinskia at gcc dot gnu dot org 2006-02-20 02:15 ---
Can you give an example of why you need these builtins?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26367