[lld] r301438 - LTO: Mark undefined module asm symbols as used.

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 27 11:56:08 PDT 2017


> Right, although I'd expect that taking the address in llvm.compiler.used
> would have already prevented those sorts of optimizations.
>
> The other thing is that we may be using linkage in the midend as an
> optimization hint (for example, we may use a higher inlining threshold for
> functions with internal linkage). But I'd expect those kinds of hints to
> only apply to functions whose address is not taken (i.e. by
> llvm.compiler.used). So we should be in the same position as before.

True, so it was really just saving a symbol from the symbol table.
That helps the dynamic linker a bit, but it is hard to imagine a case
with so many of these that it would make a difference.

Was this the last use of llvm.compiler_used?

Thanks,
Rafael


More information about the llvm-commits mailing list