https://bugs.llvm.org/show_bug.cgi?id=39469
Bug ID: 39469
Summary: Support "__builtin_expect_with_probability" (C/C++)
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
The next GCC includes support for a new builtin ` ` [1] that is similar to
`__builtin_expect()`, except with support for real probabilities:
> (long exp, long c, long probability)
> The built-in has same semantics as __builtin_expect_with_probability,
> but user can provide expected probability (in percent) for value of exp.
> Last argument probability is of float type and valid values are in
> inclusive range 0.0f and 1.0f.
This builtin is useful in that it allows better specification of branch
probabilities, which in theory should be able to be used to make more informed
decisions regarding code block generation and organization.
[1]:
https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fexpect_005fwith_005fprobability
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs