[all-commits] [llvm/llvm-project] 1113fb: [CodeGen] Improve likelihood branch weights
mordante via All-commits
all-commits at lists.llvm.org
Sun Oct 4 05:24:56 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 1113fbf44c2250621548e278d2a1e11ab2b2d63d
https://github.com/llvm/llvm-project/commit/1113fbf44c2250621548e278d2a1e11ab2b2d63d
Author: Mark de Wever <koraq at xs4all.nl>
Date: 2020-10-04 (Sun, 04 Oct 2020)
Changed paths:
M clang/lib/CodeGen/CGStmt.cpp
M clang/lib/CodeGen/CodeGenFunction.cpp
M clang/lib/CodeGen/CodeGenFunction.h
A clang/test/CodeGenCXX/attr-likelihood-if-vs-builtin-expect.cpp
Log Message:
-----------
[CodeGen] Improve likelihood branch weights
Bruno De Fraine discovered some issues with D85091. The branch weights
generated for `logical not` and `ternary conditional` were wrong. The
`logical and` and `logical or` differed from the code generated of
`__builtin_predict`.
Adjusted the generated code for the likelihood to match
`__builtin_predict`. The patch is based on Bruno's suggestions.
Differential Revision: https://reviews.llvm.org/D88363
More information about the All-commits
mailing list