[llvm] [BOLT][AArch64] Relax calls and branches with fragment clusters (PR #215825)
Adam Bzowski via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 23 06:50:30 PDT 2026
adam-bzowski-arm wrote:
I created draft PR [#225728](https://github.com/llvm/llvm-project/pull/225728) to demonstrate using the full emitted layout for clustered relaxation instead of coarse fragment-size estimates.
On Chromium, this produced materially better decisions:
- 11.7% fewer relaxed calls overall.
- 50.5% fewer long-thunk relaxations, partly because fixed/out-of-layout targets can be range-checked instead of automatically receiving `ADRP+ADD+BR` thunks.
- Roughly twice as many calls used short thunks.
- Almost no change in the number of created thunks: 29,588 versus 29,521.
- A 31.6% overestimate of required thunk bytes was eliminated.
Earlier measurements showed an average LongJmp runtime increase of approximately 4.8%, ranging from 2.6% to 6.7%. The PR is currently a proof of concept, but the results suggest that full-layout information can substantially improve relaxation quality at modest cost.
https://github.com/llvm/llvm-project/pull/215825
More information about the llvm-commits
mailing list