callbr's indirect branches aren't expected to be taken, so reduce their
probabilities to 0 while increasing the default destination to 1. This
allows some code improvements through block placement.
Details
- Reviewers
nickdesaulniers - Commits
- rG6aebf0ee56e5: Specify branch probabilities for callbr dests
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 43866 Build 44900: arc lint + arc unit
Event Timeline
Cool, IIRC when upstream kernel devs took a look (via some objtool bug reports) they mentioned that our block placement was backwards. The callbr-asm-branch-folding.ll change makes the most sense to me; the indirect branch is moved out of the way. (Though I would have thought branch predictors assume forward branches are taken). Did this result in any measurable performance difference?
llvm/test/CodeGen/X86/callbr-asm.ll | ||
---|---|---|
81 | The top of this file mentions ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py. Did update_llc_test_checks.py really remove this .p2align? |
llvm/test/CodeGen/X86/callbr-asm.ll | ||
---|---|---|
81 | I don't know how this was removed. I've never had to deal with update_llc_test_checks.py. |
The top of this file mentions ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py. Did update_llc_test_checks.py really remove this .p2align?