diff options
author | Sean Fertile <sfertile@ca.ibm.com> | 2017-11-03 21:45:55 +0000 |
---|---|---|
committer | Sean Fertile <sfertile@ca.ibm.com> | 2017-11-03 21:45:55 +0000 |
commit | 36528c2a9b3d37d6692de5738697598abfb5d9c8 (patch) | |
tree | 2729d6a8bd507a1de66862d7869fb4ef8ade7868 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | 3fc9188fa8cb939539e568a0ef602892aa3fc59a (diff) | |
download | llvm-36528c2a9b3d37d6692de5738697598abfb5d9c8.zip llvm-36528c2a9b3d37d6692de5738697598abfb5d9c8.tar.gz llvm-36528c2a9b3d37d6692de5738697598abfb5d9c8.tar.bz2 |
[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.
Differential Revision: https://reviews.llvm.org/D35702
llvm-svn: 317374
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index 1e491aa..c5d376c 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -955,6 +955,8 @@ static uint64_t getEncodedGVSummaryFlags(GlobalValueSummary::GVFlags Flags) { RawFlags |= Flags.NotEligibleToImport; // bool RawFlags |= (Flags.Live << 1); + RawFlags |= (Flags.DSOLocal << 2); + // Linkage don't need to be remapped at that time for the summary. Any future // change to the getEncodedLinkage() function will need to be taken into // account here as well. |