[lld] [lld-macho] Include ICF safe thunks in balanced partitioning (PR #212096)

Karim Alweheshy via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 28 17:00:28 PDT 2026


karim-alweheshy wrote:

Good catch — the previous revision ordered the `_hot_b` thunk only, not the shared body.

Updated in 89c9d72b4534: each safe-thunk profile name now maps to both the live thunk and the body returned by `getBodyForThunkFoldedSym()`. The regression now verifies:

- BP reports 2 startup sections / 12 bytes (the 4-byte thunk plus the 8-byte body);
- final order keeps the `_hot_a` body adjacent to the `_hot_b` thunk;
- an unprofiled `_hot_c` sibling thunk remains outside startup order.

I built `ld64.lld` from the exact PR source and ran the lit-equivalent commands successfully. Could you take another look?

https://github.com/llvm/llvm-project/pull/212096


More information about the llvm-commits mailing list