[all-commits] [llvm/llvm-project] 3228e8: [LowerTypeTests] Reorder CFI jump table entries ba...
Vitaly Buka via All-commits
all-commits at lists.llvm.org
Fri Sep 18 17:34:39 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3228e8f8c3abd58c02f8143d2a4f921f392146c6
https://github.com/llvm/llvm-project/commit/3228e8f8c3abd58c02f8143d2a4f921f392146c6
Author: Vitaly Buka <vitalybuka at google.com>
Date: 2026-09-18 (Fri, 18 Sep 2026)
Changed paths:
M llvm/lib/Transforms/IPO/LowerTypeTests.cpp
M llvm/test/Transforms/LowerTypeTests/cfi-jumptable-hotness-summary.ll
Log Message:
-----------
[LowerTypeTests] Reorder CFI jump table entries based on hotness (#221046)
Order CFI jump table entries by function hotness. We use `cfi.functions`
metadata in ThinLTO, or `BlockFrequencyInfo` / function entry counts in
full LTO.
We want the hottest function to be optimized by the last entry thing for
SHT_LLVM_CFI_JUMP_TABLE. The linker deletes the final branch in the jump
table and moves the table directly before that target function so it
falls through.
This also ensures the jump table lands in a hot section (.text.hot)
instead of a cold section (.text.unlikely). Type contiguity is
preserved.
This PR reliably improves the performance of our server binary by 0.2%,
and some smaller binaries up to 5%.
PR Stack:
* https://github.com/llvm/llvm-project/pull/220776
* https://github.com/llvm/llvm-project/pull/221043
* https://github.com/llvm/llvm-project/pull/221044
* https://github.com/llvm/llvm-project/pull/223843
* https://github.com/llvm/llvm-project/pull/223846
* https://github.com/llvm/llvm-project/pull/223848
* ➤ https://github.com/llvm/llvm-project/pull/221046
Assisted-by: Gemini
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list