[all-commits] [llvm/llvm-project] c3e9d0: [lld-macho][LTO] Emit `__llvm_addrsig` for `--icf=...
alx32 via All-commits
all-commits at lists.llvm.org
Fri Jun 5 13:38:42 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c3e9d05ce8044612ecae2eb27dd5ca52b612a8ac
https://github.com/llvm/llvm-project/commit/c3e9d05ce8044612ecae2eb27dd5ca52b612a8ac
Author: alx32 <103613512+alx32 at users.noreply.github.com>
Date: 2026-06-05 (Fri, 05 Jun 2026)
Changed paths:
M lld/MachO/LTO.cpp
M lld/test/MachO/icf-safe-thunks.ll
Log Message:
-----------
[lld-macho][LTO] Emit `__llvm_addrsig` for `--icf=safe_thunks` (#188486)
LTO was emitting `__llvm_addrsig` metadata when `--icf=safe` was
specified, but not for `--icf=safe_thunks`. After the recent PR
https://github.com/llvm/llvm-project/pull/188400 that makes safe ICF
conservative without `__llvm_addrsig` (marking all symbols as
address-significant when the section is absent), this omission caused
safe_thunks to silently degrade for all LTO-compiled objects: every
symbol became `keepUnique`, preventing body folding entirely.
Fix this by also enabling `EmitAddrsig` when `icfLevel` is
`safe_thunks`. This allows the LTO backend to emit precise
address-significance metadata, so that only truly address-significant
functions get thunk treatment while non-address-significant identical
functions can still be body-folded.
Add a regression test that verifies LTO + `--icf=safe_thunks` correctly
body-folds non-address-significant identical functions, which would fail
without this fix due to missing addrsig metadata.
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