Resolution-based LTO API.
authorTeresa Johnson <tejohnson@google.com>
Thu, 11 Aug 2016 12:56:40 +0000 (12:56 +0000)
committerTeresa Johnson <tejohnson@google.com>
Thu, 11 Aug 2016 12:56:40 +0000 (12:56 +0000)
commitf99573b3ee6009494d431348ec92dcab7b6a218b
tree57c77754b9215a0e3429c659d9c5eb56b15f351d
parent5c91764af5d5dc27c4e52073c0361d7a452c5a8c
Resolution-based LTO API.

Summary:
This introduces a resolution-based LTO API. The main advantage of this API over
existing APIs is that it allows the linker to supply a resolution for each
symbol in each object, rather than the combined object as a whole. This will
become increasingly important for use cases such as ThinLTO which require us
to process symbol resolutions in a more complicated way than just adjusting
linkage.

Patch by Peter Collingbourne.

Reviewers: rafael, tejohnson, mehdi_amini

Subscribers: lhames, tejohnson, mehdi_amini, llvm-commits

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

Address review comments

llvm-svn: 278330
37 files changed:
llvm/include/llvm/LTO/Config.h [new file with mode: 0644]
llvm/include/llvm/LTO/LTO.h
llvm/include/llvm/LTO/LTOBackend.h [new file with mode: 0644]
llvm/lib/LTO/CMakeLists.txt
llvm/lib/LTO/LLVMBuild.txt
llvm/lib/LTO/LTO.cpp
llvm/lib/LTO/LTOBackend.cpp [new file with mode: 0644]
llvm/lib/Object/IRObjectFile.cpp
llvm/test/CMakeLists.txt
llvm/test/LTO/Resolution/X86/Inputs/alias-1.ll [new file with mode: 0644]
llvm/test/LTO/Resolution/X86/Inputs/comdat.ll [new file with mode: 0644]
llvm/test/LTO/Resolution/X86/alias.ll [new file with mode: 0644]
llvm/test/LTO/Resolution/X86/comdat.ll [new file with mode: 0644]
llvm/test/LTO/Resolution/X86/lit.local.cfg [new file with mode: 0644]
llvm/test/lit.cfg
llvm/test/tools/gold/X86/coff.ll
llvm/test/tools/gold/X86/comdat.ll
llvm/test/tools/gold/X86/common.ll
llvm/test/tools/gold/X86/emit-llvm.ll
llvm/test/tools/gold/X86/opt-level.ll
llvm/test/tools/gold/X86/parallel.ll
llvm/test/tools/gold/X86/slp-vectorize.ll
llvm/test/tools/gold/X86/start-lib-common.ll
llvm/test/tools/gold/X86/strip_names.ll
llvm/test/tools/gold/X86/thinlto.ll
llvm/test/tools/gold/X86/thinlto_alias.ll
llvm/test/tools/gold/X86/thinlto_internalize.ll
llvm/test/tools/gold/X86/thinlto_linkonceresolution.ll
llvm/test/tools/gold/X86/thinlto_weak_resolution.ll
llvm/test/tools/gold/X86/type-merge2.ll
llvm/test/tools/gold/X86/vectorize.ll
llvm/test/tools/gold/X86/visibility.ll
llvm/test/tools/llvm-lto2/errors.ll [new file with mode: 0644]
llvm/tools/gold/gold-plugin.cpp
llvm/tools/llvm-lto2/CMakeLists.txt [new file with mode: 0644]
llvm/tools/llvm-lto2/LLVMBuild.txt [new file with mode: 0644]
llvm/tools/llvm-lto2/llvm-lto2.cpp [new file with mode: 0644]