Skip to content

Commit

Permalink
2018-11-11 Sandra Loosemore <[email protected]>
Browse files Browse the repository at this point in the history
	PR c/26366

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


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@266017 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
sandra committed Nov 11, 2018
1 parent e8e852d commit faa4091
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gcc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2018-11-11 Sandra Loosemore <[email protected]>

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

2018-11-11 Uros Bizjak <[email protected]>

PR target/87928
Expand Down
6 changes: 6 additions & 0 deletions gcc/doc/extend.texi
Original file line number Diff line number Diff line change
Expand Up @@ -12121,6 +12121,12 @@ if (__builtin_expect (ptr != NULL, 1))

@noindent
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

@deftypefn {Built-in Function} long __builtin_expect_with_probability
Expand Down

0 comments on commit faa4091

Please sign in to comment.