Commit 6157c375 by Sandra Loosemore Committed by Sandra Loosemore

re PR c/26366 (__builtin_expect needs better documentation)

2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>

	PR c/26366

	gcc/
	* doc/extend.texi (Other Builtins): Document probability associated
	with __builtin_expect.

From-SVN: r266017
parent bd5d3961
2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
PR c/26366
* doc/extend.texi (Other Builtins): Document probability associated
with __builtin_expect.
2018-11-11 Uros Bizjak <ubizjak@gmail.com> 2018-11-11 Uros Bizjak <ubizjak@gmail.com>
PR target/87928 PR target/87928
...@@ -12121,6 +12121,12 @@ if (__builtin_expect (ptr != NULL, 1)) ...@@ -12121,6 +12121,12 @@ if (__builtin_expect (ptr != NULL, 1))
@noindent @noindent
when testing pointer or floating-point values. when testing pointer or floating-point values.
For the purposes of branch prediction optimizations, the probability that
a @code{__builtin_expect} expression is true is controlled by GCC's
@code{builtin-expect-probability} parameter, which defaults to 90%.
You can also use @code{__builtin_expect_with_probability} to explicitly
assign a probability value to individual expressions.
@end deftypefn @end deftypefn
@deftypefn {Built-in Function} long __builtin_expect_with_probability @deftypefn {Built-in Function} long __builtin_expect_with_probability
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment