[PATCH] D42224: Don't assume a null GV is local for ELF and MachO
Rafael Avila de Espindola via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 23 18:08:59 PST 2018
Reid Kleckner via Phabricator <reviews at reviews.llvm.org> writes:
> rnk added inline comments.
>
>
> ================
> Comment at: llvm/lib/Target/TargetMachine.cpp:140
>
> + // If GV is null we know that this is a call to an intrinsic. For ELF and
> + // MachO we don't need to assume those are local since the liker can trivially
> ----------------
> Do we ever synthesize references to globals? Those will need a GOT reference if the global turns out to be non-local.
If GV is null it is an intrinsic. As far as I know we only ever produce
calls to those.
Note that this patch can only make shouldAssumeDSOLocal return false in
a situation where it returned true before, so even if somehow a null GV
is used with a non-call, this instructs the caller to use a got where it
now produces a direct reference.
Cheers,
Rafael
More information about the llvm-commits
mailing list