Go to file
George Rimar d7305ef06c [Support/Parallel] - Do not use a task group for a very small task.
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
2017-08-21 08:00:54 +00:00
clang Allow thiscall attribute in test/Tooling/clang-diff-ast.cpp 2017-08-20 20:13:33 +00:00
clang-tools-extra [clang-tidy] Add modernize-use-equals-default.IgnoreMacros option 2017-08-17 23:07:59 +00:00
compiler-rt Remove "%T" from ASan Darwin tests. 2017-08-20 18:31:00 +00:00
debuginfo-tests Add a test for PR33166. 2017-05-25 19:33:16 +00:00
libclc amdgcn: rewrite barrier() using fence and clang __builtin_amdgcn_s_barrier 2017-08-16 17:09:00 +00:00
libcxx [NFC] remove trailing WS 2017-08-20 10:38:55 +00:00
libcxxabi Revert "[libcxxabi] When built with ASan, __cxa_throw calls __asan_handle_no_return" 2017-08-16 22:05:54 +00:00
libunwind [CMake] Allow overriding lib dir suffix independently from LLVM 2017-08-08 00:37:59 +00:00
lld [ELF] - Do not segfault when doing logical and/or operations on symbols that have no output sections. 2017-08-21 07:57:12 +00:00
lldb [Plugins/ObjC] Remove more semicolons to placate -Wpedantic. NFCI. 2017-08-19 16:32:19 +00:00
llgo irgen: Create functions instead of global variables for builtin hash and equal algorithms. 2017-06-04 22:11:28 +00:00
llvm [Support/Parallel] - Do not use a task group for a very small task. 2017-08-21 08:00:54 +00:00
openmp Use va_copy instead of __va_copy to fix building libomp against musl libc 2017-08-19 23:53:36 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly [MatMul] Make MatMul detection independent of internal isl representations. 2017-08-20 21:31:11 +00:00