]> granicus.if.org Git - clang/commit
[LTO] Add option to enable LTOUnit splitting, and disable unless needed
authorTeresa Johnson <tejohnson@google.com>
Fri, 11 Jan 2019 18:32:07 +0000 (18:32 +0000)
committerTeresa Johnson <tejohnson@google.com>
Fri, 11 Jan 2019 18:32:07 +0000 (18:32 +0000)
commit05aaf6c929cb1df38620383bc9d79d1fd1a2e571
tree5a39b2c807dbaefd2bd352c56cac71c9501e491f
parent3b2a1561c8a51e3472ab74643ccdbd8155a35477
[LTO] Add option to enable LTOUnit splitting, and disable unless needed

Summary:
Adds a new -f[no]split-lto-unit flag that is disabled by default to
control module splitting during ThinLTO. It is automatically enabled
for -fsanitize=cfi and -fwhole-program-vtables.

The new EnableSplitLTOUnit codegen flag is passed down to llvm
via a new module flag of the same name.

Depends on D53890.

Reviewers: pcc

Subscribers: ormris, mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, cfe-commits, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350949 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
include/clang/Basic/CodeGenOptions.def
include/clang/Driver/Options.td
include/clang/Driver/SanitizerArgs.h
lib/CodeGen/BackendUtil.cpp
lib/Driver/SanitizerArgs.cpp
lib/Driver/ToolChains/Clang.cpp
lib/Frontend/CompilerInvocation.cpp
test/CodeGen/thinlto-distributed-cfi-devirt.ll
test/CodeGen/thinlto-distributed-cfi.ll
test/CodeGenCXX/no-lto-unit.cpp
test/CodeGenCXX/type-metadata-thinlto.cpp
test/Driver/split-lto-unit.c [new file with mode: 0644]