HomePhabricator

[ORC] Add support for multithreaded compiles to LLJIT and LLLazyJIT.

Authored by lhames on Sep 25 2018, 7:39 PM.

Description

[ORC] Add support for multithreaded compiles to LLJIT and LLLazyJIT.

LLJIT and LLLazyJIT can now be constructed with an optional NumCompileThreads
arguments. If this is non-zero then a thread-pool will be created with the
given number of threads, and compile tasks will be dispatched to the thread
pool.

To enable testing of this feature, two new flags are added to lli:

(1) -compile-threads=N (N = 0 by default) controls the number of compile threads
to use.

(2) -thread-entry can be used to execute code on additional threads. For each
-thread-entry argument supplied (multiple are allowed) a new thread will be
created and the given symbol called. These additional thread entry points are
called after static constructors are run, but before main.

llvm-svn: 343058

Details

Committed
lhamesSep 25 2018, 7:39 PM
Parents
rG867587f88586: [ORC] Include-what-you-use fixes.
Branches
Unknown
Tags
Unknown