OSDN Git Service

[ThinLTO] Add an auto-hide feature
authorMehdi Amini <mehdi.amini@apple.com>
Fri, 3 Feb 2017 00:32:38 +0000 (00:32 +0000)
committerMehdi Amini <mehdi.amini@apple.com>
Fri, 3 Feb 2017 00:32:38 +0000 (00:32 +0000)
commitbd573457622a5f909a1ebc4b6ba3b5600f25674d
tree3df552f26c8f673c006d0a3bea62b00b7fd0c231
parent009a7ee816d38d6c01f72d5e8cf7e0b772dcd49e
[ThinLTO] Add an auto-hide feature

When a symbol is not exported outside of the
DSO, it is can be hidden. Usually we try to internalize
as much as possible, but it is not always possible, for
instance a symbol can be referenced outside of the LTO
unit, or there can be cross-module reference in ThinLTO.

This is a recommit of r293912 after fixing build failures,
and a recommit of r293918 after fixing LLD tests.

Differential Revision: https://reviews.llvm.org/D28978

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293970 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
include/llvm/IR/ModuleSummaryIndex.h
include/llvm/IR/ModuleSummaryIndexYAML.h
include/llvm/LTO/LTO.h
lib/Analysis/ModuleSummaryAnalysis.cpp
lib/Bitcode/Reader/BitcodeReader.cpp
lib/Bitcode/Writer/BitcodeWriter.cpp
lib/LTO/LTO.cpp
lib/LTO/ThinLTOCodeGenerator.cpp
lib/Transforms/IPO/FunctionImport.cpp
test/ThinLTO/X86/Inputs/weak_autohide.ll [new file with mode: 0644]
test/ThinLTO/X86/deadstrip.ll
test/ThinLTO/X86/weak_autohide.ll [new file with mode: 0644]