[PATCH] D17529: ELF: Implement ICF.
Rafael Espíndola via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 23 14:32:49 PST 2016
> I think the "take the address" part is the crucial hint. Can't you tell
> from the combination of visibility and relocations what functions are
> safe to merge? The only tricky part I can imagine is identifying
> vtables, as they do not classify as pointer leak.
Somewhat. Gold has that on its list of heuristics, but it is pretty
nasty. In particular, using files compiled with -fPIC to produce
regular executables breaks the heuristic.
Lets focus on the non-safe version for now. When time comes I think
the correct thing to do is to implement the nop padding as it is
always safe and then propose adding a flag to ELF to say that a
particular section/symbol doesn't need an unique address.
More information about the llvm-commits