[LTO][ThinLTO] Use the linker resolutions to mark global values as dso_local.
authorSean Fertile <sfertile@ca.ibm.com>
Sat, 4 Nov 2017 17:04:39 +0000 (17:04 +0000)
committerSean Fertile <sfertile@ca.ibm.com>
Sat, 4 Nov 2017 17:04:39 +0000 (17:04 +0000)
commit4595a915f6d1e782e3e297eb611cbcac46af9bcb
treef321413852ab6988810b3a4189ed82cebafb50f4
parentc91975807568a05d9b35438d96711bdd3e25a4b2
[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
28 files changed:
llvm/include/llvm/IR/ModuleSummaryIndex.h
llvm/include/llvm/IR/ModuleSummaryIndexYAML.h
llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
llvm/lib/LTO/LTO.cpp
llvm/lib/Transforms/Utils/FunctionImportUtils.cpp
llvm/test/Bitcode/thinlto-summary-local-5.0.ll [new file with mode: 0644]
llvm/test/Bitcode/thinlto-summary-local-5.0.ll.bc [new file with mode: 0644]
llvm/test/LTO/Resolution/X86/comdat-mixed-lto.ll
llvm/test/LTO/Resolution/X86/comdat.ll
llvm/test/LTO/Resolution/X86/commons.ll
llvm/test/ThinLTO/X86/deadstrip.ll
llvm/test/ThinLTO/X86/funcimport2.ll
llvm/test/ThinLTO/X86/internalize.ll
llvm/test/ThinLTO/X86/reference_non_importable.ll
llvm/test/Transforms/LowerTypeTests/import-unsat.ll
llvm/test/Transforms/PGOProfile/thinlto_samplepgo_icp2.ll
llvm/test/Transforms/WholeProgramDevirt/import-indir.ll
llvm/test/tools/gold/X86/asm_undefined2.ll
llvm/test/tools/gold/X86/coff.ll
llvm/test/tools/gold/X86/common.ll
llvm/test/tools/gold/X86/emit-llvm.ll
llvm/test/tools/gold/X86/global_with_section.ll
llvm/test/tools/gold/X86/parallel.ll
llvm/test/tools/gold/X86/thinlto_linkonceresolution.ll
llvm/test/tools/gold/X86/thinlto_weak_library.ll
llvm/test/tools/gold/X86/visibility.ll