[PATCH] D43029: Fix PR36268

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 7 12:21:03 PST 2018


I see. lgtm then.

On Wed, Feb 7, 2018 at 8:25 PM, Rafael Avila de Espindola via
llvm-commits <llvm-commits at lists.llvm.org> wrote:
> Hans Wennborg via Phabricator <reviews at reviews.llvm.org> writes:
>
>> hans added inline comments.
>>
>>
>> ================
>> Comment at: llvm/include/llvm/IR/GlobalValue.h:118
>> +        (!hasDefaultVisibility() && !hasExternalWeakLinkage()))
>> +      setDSOLocal(true);
>> +  }
>> ----------------
>> Can this flip back and forth? That is, if setDSOLocal(true) was set before, do we need to handle the else-branch here and do setDSOLocal(false)?
>
> I don't think we can. The main reason for having dso_local is to allow
> local access to a GV that we would no normally access that way.
>
> Given that it is reasonable for LLVM to set dso_local in GVs the
> existing code would access as local, but to clear it would invalidate
> user changes.
>
> Cheers,
> Rafael
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list