[llvm-branch-commits] [llvm][misexpect] Enable diagnostics for profitable llvm.expect annotations (PR #96523)

Paul Kirth via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Jun 24 10:47:06 PDT 2024


https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/96523

Issue #56502 describes an enhancement related to the use of llvm.expect.
The request is for a diagnostic mode that can identify branches that
would benefit from the use of llvm.expect based on the branch_weights
assigned from a PGO or sample profile.

To support identify branches(or switches) that would benefit from the
use of an llvm.expect intrinsic, we follow a similar checking pattern to
that used in MisExpect, but only in cases where MisExpect diagnostics
would not be used (i.e., when an llvm.expect intrinsic has already been
used).





More information about the llvm-branch-commits mailing list