[PATCH] D15390: [ThinLTO] Launch importing backends in parallel threads from gold plugin

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 11 07:18:55 PST 2015


tejohnson updated this revision to Diff 42520.
tejohnson added a comment.

Biggest change in this update is due to gold not being thread-safe
by default, requiring lots of refactoring to make gold callbacks in
single-threaded mode.

Also changed from std::thread to the thread wrapper in LLVM, which
handles !LLVM_ENABLE_THREADS.

Some test updates to test both single and multi-threaded handling.

I have not refactored any of the code out of gold yet. Doing so will
require refactoring out other routines, such as codegenImpl and
its callees such as runLTOPasses, or invoking via a callback.
There is some overlap between the handling in these routines and
handling that exists currently in LTOCodeGenerator, which we could
refactor out of both. I'm not sure where the best place to put the
refactored code is, maybe lib/CodeGen (which is where splitCodeGen lives)?


http://reviews.llvm.org/D15390

Files:
  include/llvm/Support/thread.h
  test/tools/gold/X86/thinlto.ll
  tools/gold/gold-plugin.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15390.42520.patch
Type: text/x-patch
Size: 18699 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151211/1f78da71/attachment.bin>


More information about the llvm-commits mailing list