[PATCH] D30365: ELF ICF: Merge only functions.
Rafael Avila de Espindola via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 27 09:17:48 PST 2017
Rui Ueyama <ruiu at google.com> writes:
> On Sun, Feb 26, 2017 at 5:14 PM, Rafael Avila de Espindola <
> rafael.espindola at gmail.com> wrote:
>
>> Rui Ueyama <ruiu at google.com> writes:
>>
>> > We can define this as -icf=everything or something (as opposed to the
>> > current -icf=all), but do you want that now?
>>
>> No, it doesn't have to be now.
>>
>> Thinking a bit more about it it is not even clear if we should have
>> it. The logic in ICF is not that different and once we have a way of
>> representing unnamed_addr in ELF, --icf=all will just mean icf
>> executable sections even if they are not know to be safe.
>>
>
> Can you elaborate a bit on why you want to propagate unnamed_addr and how
> you use that in the linker?
The idea is that by default symbol addresses are significant. By some
way (flag, metadata section), a symbol can be marked as having non
significant address.
If a section has no address-significant symbol, it can be merged.
That could be also used to hide linkonce_odr symbols like we do in lto,
but in a regular link.
Cheers,
Rafael
More information about the llvm-commits
mailing list