This is an archive of the discontinued LLVM Phabricator instance.

[BitcodeReader] Infer the correct runtime preemption for GlobalValue
AbandonedPublic

Authored by steven_wu on Jul 6 2018, 4:02 PM.

Details

Reviewers
None
Summary

To allow bitcode built by old compiler to pass the current verifer,
BitcodeReader needs to auto infer the correct runtime preemption from
linkage and visibility for GlobalValues.

Since llvm-6.0 bitcode already contains the new field but can be
incorrect in some cases, the attribute needs to be recomputed all the
time in BitcodeReader. This will make all the GVs has dso_local marked
correctly if read from bitcode, and it should still allow the verifier
to catch mistakes in optimization passes.

This should fix PR38009.

Diff Detail

Event Timeline

steven_wu created this revision.Jul 6 2018, 4:02 PM
steven_wu abandoned this revision.Jul 6 2018, 4:03 PM

oops, accidentally opened a new review. closing.