diff options
author | Sean Fertile <sfertile@ca.ibm.com> | 2017-11-04 17:04:39 +0000 |
---|---|---|
committer | Sean Fertile <sfertile@ca.ibm.com> | 2017-11-04 17:04:39 +0000 |
commit | 4595a915f6d1e782e3e297eb611cbcac46af9bcb (patch) | |
tree | f321413852ab6988810b3a4189ed82cebafb50f4 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | c91975807568a05d9b35438d96711bdd3e25a4b2 (diff) | |
download | bcm5719-llvm-4595a915f6d1e782e3e297eb611cbcac46af9bcb.tar.gz bcm5719-llvm-4595a915f6d1e782e3e297eb611cbcac46af9bcb.zip |
[LTO][ThinLTO] Use the linker resolutions to mark global values as dso_local.
Now that we have a way to mark GlobalValues as local we can use the symbol
resolutions that the linker plugin provides as part of lto/thinlto link
step to refine the compilers view on what symbols will end up being local.
Originally commited as r317374, but reverted in r317395 to update some missed
tests.
Differential Revision: https://reviews.llvm.org/D35702
llvm-svn: 317408
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index c2272260f44..d0f11db8f61 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -889,7 +889,9 @@ static GlobalValueSummary::GVFlags getDecodedGVSummaryFlags(uint64_t RawFlags, // to work correctly on earlier versions, we must conservatively treat all // values as live. bool Live = (RawFlags & 0x2) || Version < 3; - return GlobalValueSummary::GVFlags(Linkage, NotEligibleToImport, Live); + bool Local = (RawFlags & 0x4); + + return GlobalValueSummary::GVFlags(Linkage, NotEligibleToImport, Live, Local); } static GlobalValue::VisibilityTypes getDecodedVisibility(unsigned Val) { |