llvm-capstone/clang/tools
Carlo Bertolli 9925f15661 Resubmission of http://reviews.llvm.org/D21564 after fixes.
[OpenMP] Initial implementation of parse and sema for composite pragma 'distribute parallel for'

This patch is an initial implementation for #distribute parallel for.
The main differences that affect other pragmas are:

The implementation of 'distribute parallel for' requires blocking of the associated loop, where blocks are "distributed" to different teams and iterations within each block are scheduled to parallel threads within each team. To implement blocking, sema creates two additional worksharing directive fields that are used to pass the team assigned block lower and upper bounds through the outlined function resulting from 'parallel'. In this way, scheduling for 'for' to threads can use those bounds.
As a consequence of blocking, the stride of 'distribute' is not 1 but it is equal to the blocking size. This is returned by the runtime and sema prepares a DistIncrExpr variable to hold that value.
As a consequence of blocking, the global upper bound (EnsureUpperBound) expression of the 'for' is not the original loop upper bound (e.g. in for(i = 0 ; i < N; i++) this is 'N') but it is the team-assigned block upper bound. Sema creates a new expression holding the calculation of the actual upper bound for 'for' as UB = min(UB, PrevUB), where UB is the loop upper bound, and PrevUB is the team-assigned block upper bound.

llvm-svn: 273884
2016-06-27 14:55:37 +00:00
..
arcmt-test Update to match LLVM r272232. 2016-06-09 00:53:41 +00:00
c-arcmt-test Remove autoconf support 2016-01-26 21:30:40 +00:00
c-index-test Update to match LLVM r272232. 2016-06-09 00:53:41 +00:00
clang-check Update to match LLVM r272232. 2016-06-09 00:53:41 +00:00
clang-format Update to match LLVM r272232. 2016-06-09 00:53:41 +00:00
clang-format-vs clang-format sort include use the source file name to determine the 2016-02-10 12:42:58 +00:00
clang-fuzzer [libFuzzer] make LLVMFuzzerTestOneInput (the fuzzer target function) return int instead of void. (following llvm r249214) 2015-10-02 23:34:37 +00:00
diag-build
diagtool Remove autoconf support 2016-01-26 21:30:40 +00:00
driver cc1_main: Do not print statistics twice in -disable_free mode. 2016-06-15 19:24:55 +00:00
libclang Resubmission of http://reviews.llvm.org/D21564 after fixes. 2016-06-27 14:55:37 +00:00
scan-build [analyzer] Add --force-analyze-debug-code option to scan-build 2016-02-18 11:08:46 +00:00
scan-build-py [CMake] Update to requiring CMake 3.4.3 2016-05-31 20:21:38 +00:00
scan-view Remove autoconf support 2016-01-26 21:30:40 +00:00
CMakeLists.txt Tweak CMakeLists not for libclang to depend on the variable CLANG_TOOL_EXTRA_BUILD. 2016-03-03 11:09:43 +00:00