OSDN Git Service

Revert r343058 "[ORC] Add support for multithreaded compiles to LLJIT and LLLazyJIT."
authorHans Wennborg <hans@hanshq.net>
Wed, 26 Sep 2018 12:15:23 +0000 (12:15 +0000)
committerHans Wennborg <hans@hanshq.net>
Wed, 26 Sep 2018 12:15:23 +0000 (12:15 +0000)
commit3fccee2ee8cce1b0a9d9b03d9ee9c0ccd3eeb430
treea1ba597095e3f7e4cc4b6fc218e342b1ea452a5c
parent5635aa9f41f68977b841387178962e16aac521d5
Revert r343058 "[ORC] Add support for multithreaded compiles to LLJIT and LLLazyJIT."

This doesn't work well in builds configured with LLVM_ENABLE_THREADS=OFF,
causing the following assert when running
ExecutionEngine/OrcLazy/multiple-compile-threads-basic.ll:

  lib/ExecutionEngine/Orc/Core.cpp:1748: Expected<llvm::JITEvaluatedSymbol>
  llvm::orc::lookup(const llvm::orc::JITDylibList &, llvm::orc::SymbolStringPtr):
  Assertion `ResultMap->size() == 1 && "Unexpected number of results"' failed.

> 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@343099 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ExecutionEngine/Orc/LLJIT.h
lib/ExecutionEngine/Orc/LLJIT.cpp
test/ExecutionEngine/OrcLazy/multiple-compile-threads-basic.ll [deleted file]
tools/lli/lli.cpp