]> granicus.if.org Git - clang/commit
[ThinLTO] Option to invoke ThinLTO backend passes and importing
authorTeresa Johnson <tejohnson@google.com>
Mon, 7 Dec 2015 19:21:34 +0000 (19:21 +0000)
committerTeresa Johnson <tejohnson@google.com>
Mon, 7 Dec 2015 19:21:34 +0000 (19:21 +0000)
commitf735405854d0b5eec01aecaf831bec9b2a545478
tree6977e8f8d2c701183c29fad9948411bba5b87717
parent6c025d834d07d8354c0ed156b8a4b9e18d8c8230
[ThinLTO] Option to invoke ThinLTO backend passes and importing

Summary:
Adds new option -fthinlto-index=<file> to invoke the LTO pipeline
along with function importing via clang using the supplied function
summary index file. This supports invoking the parallel ThinLTO
backend processes in a distributed build environment via clang.

Additionally, this causes the module linker to be invoked on the bitcode
file being compiled to perform any necessary promotion and renaming of
locals that are exported via the function summary index file.

Add a couple tests that confirm we get expected errors when we try to
use the new option on a file that isn't bitcode, or specify an invalid
index file. The tests also confirm that we trigger the expected function
import pass.

Depends on D15024

Reviewers: joker.eph, dexonsmith

Subscribers: joker.eph, davidxl, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254927 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
include/clang/CodeGen/BackendUtil.h
include/clang/Driver/Options.td
include/clang/Driver/Types.h
include/clang/Frontend/CodeGenOptions.h
lib/CodeGen/BackendUtil.cpp
lib/CodeGen/CodeGenAction.cpp
lib/Driver/Tools.cpp
lib/Driver/Types.cpp
lib/Frontend/CompilerInvocation.cpp
test/CMakeLists.txt
test/CodeGen/thinlto_backend.c [new file with mode: 0644]
test/Driver/thinlto_backend.c [new file with mode: 0644]