[PATCH] D49039: [BitcodeReader] Infer the correct runtime preemption for GlobalValue
Vedant Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 6 16:12:54 PDT 2018
vsk added a comment.
In https://reviews.llvm.org/D49039#1154893, @steven_wu wrote:
> > In that case, we can enable verification on checked-in bitcode files as a follow-up. How about testing this by round-tripping textual IR through llvm-as and llvm-dis? You just need a function, alias, and global var with local linkage and without dso_local set, right?
>
> Nope. dso_local is even implicit in assembly which is a completely different from bitcode reader/writer.
>
> static void PrintDSOLocation(const GlobalValue &GV,
> formatted_raw_ostream &Out) {
> // GVs with local linkage or non default visibility are implicitly dso_local,
> // so we don't print it.
> bool Implicit = GV.hasLocalLinkage() ||
> (!GV.hasExternalWeakLinkage() && !GV.hasDefaultVisibility());
> if (GV.isDSOLocal() && !Implicit)
> Out << "dso_local ";
> }
>
>
> I guess this patch is unifying the behavior, sort of.
Hm, if there's no simpler option, what about checking in bitcode produced by 6.0 which would have triggered the verifier?
Repository:
rL LLVM
https://reviews.llvm.org/D49039
More information about the llvm-commits
mailing list