1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/lib
Mehdi Amini 54fc055738 Add a C++11 ThreadPool implementation in LLVM
This is a very simple implementation of a thread pool using C++11
thread. It accepts any std::function<void()> for asynchronous
execution. Individual task can be synchronize using the returned
future, or the client can block on the full queue completion.

In case LLVM is configured with Threading disabled, it falls back
to sequential execution using std::async with launch:deferred.

This is intended to support parallelism for ThinLTO processing in
linker plugin, but is generic enough for any other uses.

This is a recommit of r255444 ; trying to workaround a bug in the
MSVC 2013 standard library. I think I was hit by:

 http://connect.microsoft.com/VisualStudio/feedbackdetail/view/791185/std-packaged-task-t-where-t-is-void-or-a-reference-class-are-not-movable

Recommit of r255589, trying to please g++ as well.

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

From: mehdi_amini <mehdi_amini@91177308-0d34-0410-b5e6-96231b3b80d8>
llvm-svn: 255593
2015-12-15 00:59:19 +00:00
..
Analysis [IR] Remove terminatepad 2015-12-14 18:34:23 +00:00
AsmParser add fast-math-flags to 'call' instructions (PR21290) 2015-12-14 21:59:03 +00:00
Bitcode Use diagnostic handler in the LLVMContext 2015-12-14 23:17:03 +00:00
CodeGen [X86] Part 2 to fix x86-64 fp128 calling convention. 2015-12-14 22:08:36 +00:00
DebugInfo [llvm-dwp] Retrieve the DWOID from the CU for the cu_index entry 2015-12-04 17:20:04 +00:00
ExecutionEngine [Orc] Rename IndirectStubsManagerBase to IndirectStubsManager. 2015-12-06 19:44:45 +00:00
Fuzzer [LibFuzzer] Introducing FUZZER_FLAG_UNSIGNED and using it for seeding. 2015-12-10 20:41:53 +00:00
IR Add missing vtable anchor's. 2015-12-14 20:29:16 +00:00
IRReader Return a unique_ptr from getLazyBitcodeModule and parseBitcodeFile. NFC. 2015-06-16 22:27:55 +00:00
LibDriver [Option] Use an ArrayRef to store the Option Infos in OptTable. NFC 2015-10-21 16:30:42 +00:00
LineEditor
Linker Use diagnostic handler in the LLVMContext 2015-12-14 23:17:03 +00:00
LTO Use diagnostic handler in the LLVMContext 2015-12-14 23:17:03 +00:00
MC [X86][inline asm] support even directive 2015-12-13 17:07:23 +00:00
Object Use diagnostic handler in the LLVMContext 2015-12-14 23:17:03 +00:00
Option [Option] Use an ArrayRef to store the Option Infos in OptTable. NFC 2015-10-21 16:30:42 +00:00
Passes [PM] Port StripDeadPrototypes to the new pass manager 2015-10-30 23:28:12 +00:00
ProfileData [PGO] Value profiling text format reader/writer support 2015-12-14 18:44:01 +00:00
Support Add a C++11 ThreadPool implementation in LLVM 2015-12-15 00:59:19 +00:00
TableGen [TblGen] ArrayRefize TGParser. No functional change intended. 2015-10-24 12:46:45 +00:00
Target [X86] Add relaxtion logic for SBB instructions. 2015-12-15 00:09:23 +00:00
Transforms A better attempt to add a missing include 2015-12-14 23:34:35 +00:00
CMakeLists.txt LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00
LLVMBuild.txt Wrap some long lines in LLVMBuild files. NFC 2015-06-12 18:44:57 +00:00
Makefile LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00