diff options
author | Zhi Zhuang <Zhi.Zhuang@mediatek.com> | 2020-06-22 10:20:42 -0700 |
---|---|---|
committer | Erich Keane <erich.keane@intel.com> | 2020-06-22 10:21:28 -0700 |
commit | 37fb860301272d8138d289da5b606115b3fe5a13 (patch) | |
tree | f32b0b47de9a9e7ed9ce1ede6112d67fc8010b83 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 9e1decf7434641411b78a5c140ee1f2eff7f0d50 (diff) | |
download | llvm-37fb860301272d8138d289da5b606115b3fe5a13.zip llvm-37fb860301272d8138d289da5b606115b3fe5a13.tar.gz llvm-37fb860301272d8138d289da5b606115b3fe5a13.tar.bz2 |
Add support of __builtin_expect_with_probability
Add a new builtin-function __builtin_expect_with_probability and
intrinsic llvm.expect.with.probability.
The interface is __builtin_expect_with_probability(long expr, long
expected, double probability).
It is mainly the same as __builtin_expect besides one more argument
indicating the probability of expression equal to expected value. The
probability should be a constant floating-point expression and be in
range [0.0, 1.0] inclusive.
It is similar to builtin-expect-with-probability function in GCC
built-in functions.
Differential Revision: https://reviews.llvm.org/D79830
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions