[llvm] r317292 - Avoid PLT for external calls when attribute nonlazybind is used.

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 3 20:57:17 PDT 2017


Sriraman Tallam <tmsriram at google.com> writes:

> I could do it this way but I must add an arch check here as this is x86_64
> specific, atleast for now.  OTOH, I could keep this entirely in
> X86Subtarget.cpp and add a check like this:

I am not sure you need the arch check. If you return false for a target
that doesn't know about NonLazyBind it will use a plt. If the symbol is
external, that is what the linker would do anyway. If the symbol is
local, I think the linker can optimize it. Even if it cannot it is a
small cost.

Cheers,
Rafael


More information about the llvm-commits mailing list