mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
Mirror of https://github.com/RPCS3/llvm-mirror
0fd0684641
parallel_for_each_n splits a given task into small pieces of tasks and then passes them to background threads managed by a thread pool to process them in parallel. TaskGroup then waits for all tasks to be done, which is done by TaskGroup's destructor. In the previous code, all tasks were passed to background threads, and the main thread just waited for them to finish their jobs. This patch changes the logic so that the main thread processes a task just like other worker threads instead of just waiting for workers. This patch improves the performance of parallel_for_each_n for a task which is too small that we do not split it into multiple tasks. Previously, such task was submitted to another thread and the main thread waited for its completion. That involves multiple inter-thread synchronization which is not cheap for small tasks. Now, such task is processed by the main thread, so no inter-thread communication is necessary. Differential revision: https://reviews.llvm.org/D36607 llvm-svn: 311312 |
||
---|---|---|
bindings | ||
cmake | ||
docs | ||
examples | ||
include | ||
lib | ||
projects | ||
resources | ||
runtimes | ||
test | ||
tools | ||
unittests | ||
utils | ||
.arcconfig | ||
.clang-format | ||
.clang-tidy | ||
.gitignore | ||
CMakeLists.txt | ||
CODE_OWNERS.TXT | ||
configure | ||
CREDITS.TXT | ||
LICENSE.TXT | ||
llvm.spec.in | ||
LLVMBuild.txt | ||
README.txt | ||
RELEASE_TESTERS.TXT |
Low Level Virtual Machine (LLVM) ================================ This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments. LLVM is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt. Please see the documentation provided in docs/ for further assistance with LLVM, and in particular docs/GettingStarted.rst for getting started with LLVM and docs/README.txt for an overview of LLVM's documentation setup. If you are writing a package for LLVM, see docs/Packaging.rst for our suggestions.