]> granicus.if.org Git - clang/commit
[OpenMP] Prepare Sema for initial implementation for pragma 'distribute parallel...
authorCarlo Bertolli <cbertol@us.ibm.com>
Fri, 17 Feb 2017 21:29:13 +0000 (21:29 +0000)
committerCarlo Bertolli <cbertol@us.ibm.com>
Fri, 17 Feb 2017 21:29:13 +0000 (21:29 +0000)
commit833975cc39c19dec3bbbbb8c5f861113a1de3740
treead230401d15dc2331e0d4c72cadb41fa6d99a25c
parentb1eb45cd6d2491bd10c1cff34a56463f2c6bf6cd
[OpenMP] Prepare Sema for initial implementation for pragma 'distribute parallel for'

https://reviews.llvm.org/D29922

This patch adds two fields for use in the implementation of 'distribute parallel for':

The increment expression for the distribute loop. As the chunk assigned to a team is executed by multiple threads within the 'parallel for' region, the increment expression has to correspond to the value returned by the related runtime call (for_static_init).
The upper bound of the innermost loop ('for' in 'distribute parallel for') is not the globalUB expression normally used for pragma 'for' when found in isolation. It is instead the upper bound of the chunk assigned to the team ('distribute' loop). In this way, we prevent teams from executing chunks assigned to other teams.
The use of these two fields can be see in a related explanatory patch:
https://reviews.llvm.org/D29508

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295497 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/StmtOpenMP.h
lib/AST/StmtOpenMP.cpp
lib/Basic/OpenMPKinds.cpp
lib/Sema/SemaOpenMP.cpp
lib/Serialization/ASTReaderStmt.cpp
lib/Serialization/ASTWriterStmt.cpp