CodeGen: Introduce splitCodeGen and teach LTOCodeGenerator to use it.
authorPeter Collingbourne <peter@pcc.me.uk>
Thu, 27 Aug 2015 23:37:36 +0000 (23:37 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Thu, 27 Aug 2015 23:37:36 +0000 (23:37 +0000)
commitdaf6885fa4d5cab11a589346091d23a1178e762a
tree52e9fc0fd99b7060a4d77c178f9d2480992dbfd6
parentc0e64ada5c1ec6bf44319403fc94a2f3612c02ae
CodeGen: Introduce splitCodeGen and teach LTOCodeGenerator to use it.

llvm::splitCodeGen is a function that implements the core of parallel LTO
code generation. It uses llvm::SplitModule to split the module into linkable
partitions and spawning one code generation thread per partition. The function
produces multiple object files which can be linked in the usual way.

This has been threaded through to LTOCodeGenerator (and llvm-lto for testing
purposes). Separate patches will add parallel LTO support to the gold plugin
and lld.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246236 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/ParallelCG.h [new file with mode: 0644]
include/llvm/LTO/LTOCodeGenerator.h
lib/CodeGen/CMakeLists.txt
lib/CodeGen/ParallelCG.cpp [new file with mode: 0644]
lib/LTO/LTOCodeGenerator.cpp
test/LTO/X86/parallel.ll [new file with mode: 0644]
tools/llvm-lto/llvm-lto.cpp