Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
10-3: LLVM and BOLT comment
Browse files Browse the repository at this point in the history
aaupov committed Dec 28, 2023
1 parent 274e691 commit 64d5a02
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -53,4 +53,9 @@ if (__builtin_unpredictable(x == 3))
y = 1;
```
BOLT has an experimental CMOV conversion optimization[^1] that leverages LBR misprediction information available in recent microarchitectures (Skylake and higher). However, LLVM's CMOV conversion passes[^2][^4] that take dataflow and scheduling information into account are still generally more effective. A hybrid or cooperative approach might yield the best result but there has not been much progress in this area.
[^1]: BOLT CMOVConversion - [https://github.com/llvm/llvm-project/commit/687e4af1c05ae36af88900d41150e260d8f273c0](llvm/llvm-project@687e4af).
[^2]: LLVM cmov-vs-branch optimization - RFC [https://discourse.llvm.org/t/rfc-cmov-vs-branch-optimization/6040](https://discourse.llvm.org/t/rfc-cmov-vs-branch-optimization/6040), [https://github.com/llvm/llvm-project/commit/ca7c307d18160485ab30289dc1b14bd16ac35c52](llvm/llvm-project@ca7c307) `SelectOpti` commit.
[^3]: Discussion on branchless binary search - [https://stackoverflow.com/a/54273248](https://stackoverflow.com/a/54273248).
[^4]: LLVM `X86CmovConverterPass`.

0 comments on commit 64d5a02

Please sign in to comment.