summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTWriterStmt.cpp
diff options
context:
space:
mode:
authorCarlo Bertolli <cbertol@us.ibm.com>2017-02-17 21:29:13 +0000
committerCarlo Bertolli <cbertol@us.ibm.com>2017-02-17 21:29:13 +0000
commit8429d81202b1ccac43a9a4e88430afea8be1a101 (patch)
tree4ca7ee38234716d0948e848eea42a25a48b70038 /clang/lib/Serialization/ASTWriterStmt.cpp
parent996f9b4cade428d4a8819d04c51652a7ccfa5310 (diff)
downloadbcm5719-llvm-8429d81202b1ccac43a9a4e88430afea8be1a101.tar.gz
bcm5719-llvm-8429d81202b1ccac43a9a4e88430afea8be1a101.zip
[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 llvm-svn: 295497
Diffstat (limited to 'clang/lib/Serialization/ASTWriterStmt.cpp')
-rw-r--r--clang/lib/Serialization/ASTWriterStmt.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp
index 9589914a813..3543016a3b1 100644
--- a/clang/lib/Serialization/ASTWriterStmt.cpp
+++ b/clang/lib/Serialization/ASTWriterStmt.cpp
@@ -2241,6 +2241,8 @@ void ASTStmtWriter::VisitOMPLoopDirective(OMPLoopDirective *D) {
if (isOpenMPLoopBoundSharingDirective(D->getDirectiveKind())) {
Record.AddStmt(D->getPrevLowerBoundVariable());
Record.AddStmt(D->getPrevUpperBoundVariable());
+ Record.AddStmt(D->getDistInc());
+ Record.AddStmt(D->getPrevEnsureUpperBound());
}
for (auto I : D->counters()) {
Record.AddStmt(I);
OpenPOWER on IntegriCloud