libLTO: add a ThinLTOCodeGenerator on the model of LTOCodeGenerator.
authorMehdi Amini <mehdi.amini@apple.com>
Wed, 9 Mar 2016 01:37:22 +0000 (01:37 +0000)
committerMehdi Amini <mehdi.amini@apple.com>
Wed, 9 Mar 2016 01:37:22 +0000 (01:37 +0000)
commit7c4a1a8d48c9c52a000d5d9b514cba3f8e1fff7b
treed3501a98011e997653777d41a342bbb619275de7
parentbd04e8fed6e89edb6a1c7b9da6dfe6b39564d6f6
libLTO: add a ThinLTOCodeGenerator on the model of LTOCodeGenerator.

This is intended to provide a parallel (threaded) ThinLTO scheme
for linker plugin use through the libLTO C API.

The intent of this patch is to provide a first implementation as a
proof-of-concept and allows linker to start supporting ThinLTO by
definiing the libLTO C API. Some part of the libLTO API are left
unimplemented yet. Following patches will add support for these.

The current implementation can link all clang/llvm binaries.

Differential Revision: http://reviews.llvm.org/D17066

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 262977
13 files changed:
llvm/include/llvm-c/lto.h
llvm/include/llvm/ADT/STLExtras.h
llvm/include/llvm/LTO/LTOModule.h
llvm/include/llvm/LTO/ThinLTOCodeGenerator.h [new file with mode: 0644]
llvm/lib/LTO/CMakeLists.txt
llvm/lib/LTO/LLVMBuild.txt
llvm/lib/LTO/LTOModule.cpp
llvm/lib/LTO/ThinLTOCodeGenerator.cpp [new file with mode: 0644]
llvm/test/ThinLTO/Inputs/funcimport.ll [new file with mode: 0644]
llvm/test/ThinLTO/funcimport.ll [new file with mode: 0644]
llvm/tools/llvm-lto/llvm-lto.cpp
llvm/tools/lto/lto.cpp
llvm/tools/lto/lto.exports