[lld] [lld][MachO] Add N_COLD_FUNC support (PR #183909)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 3 03:00:00 PST 2026
alx32 wrote:
> ICF should try to pick non-cold sections as the master so we don't accidentally merge hot code into a cold area.
Agree, but I don't think it matters which function we select as master as long as we don't mark the final master function as cold. I don't think we should coerce ICF to select a certain function as master. We just need to ensure that the attribute is set correctly on the master when merging non-hot functions into it.
> If a section has an explicit priority, we honor that and ignore the cold flag.
Wouldn't this mean if ordering for compression is enabled then basically everything will get a priority and the cold flag will not work? I would think that what we want to do is order the hot portions for compression and then order the cold portions for compression.
https://github.com/llvm/llvm-project/pull/183909
More information about the llvm-commits
mailing list