summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTWriterStmt.cpp
diff options
context:
space:
mode:
authorAlexander Musman <alexander.musman@gmail.com>2014-12-15 07:07:06 +0000
committerAlexander Musman <alexander.musman@gmail.com>2014-12-15 07:07:06 +0000
commitc638868bdf239402120b2dc83c6ea0fc3bd0fac8 (patch)
tree0ef5c973d8773109715a9ab1ee6d442716c61010 /clang/lib/Serialization/ASTWriterStmt.cpp
parentecabbc52d51a737ae9964190933c7a0abcff3b21 (diff)
downloadbcm5719-llvm-c638868bdf239402120b2dc83c6ea0fc3bd0fac8.tar.gz
bcm5719-llvm-c638868bdf239402120b2dc83c6ea0fc3bd0fac8.zip
First patch with codegen of the 'omp for' directive. It implements
the simplest case, which is used when no chunk_size is specified in the schedule(static) or no 'schedule' clause is specified - the iteration space is divided by the library into chunks that are approximately equal in size, and at most one chunk is distributed to each thread. In this case, we do not need an outer loop in each thread - each thread requests once which iterations range it should handle (using __kmpc_for_static_init runtime call) and then runs the inner loop on this range. Differential Revision: http://reviews.llvm.org/D5865 llvm-svn: 224233
Diffstat (limited to 'clang/lib/Serialization/ASTWriterStmt.cpp')
-rw-r--r--clang/lib/Serialization/ASTWriterStmt.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp
index 38996ddd90a..eef4818267d 100644
--- a/clang/lib/Serialization/ASTWriterStmt.cpp
+++ b/clang/lib/Serialization/ASTWriterStmt.cpp
@@ -1882,6 +1882,15 @@ void ASTStmtWriter::VisitOMPLoopDirective(OMPLoopDirective *D) {
Writer.AddStmt(D->getCond(/* SeparateIter */ true));
Writer.AddStmt(D->getInit());
Writer.AddStmt(D->getInc());
+ if (isOpenMPWorksharingDirective(D->getDirectiveKind())) {
+ Writer.AddStmt(D->getIsLastIterVariable());
+ Writer.AddStmt(D->getLowerBoundVariable());
+ Writer.AddStmt(D->getUpperBoundVariable());
+ Writer.AddStmt(D->getStrideVariable());
+ Writer.AddStmt(D->getEnsureUpperBound());
+ Writer.AddStmt(D->getNextLowerBound());
+ Writer.AddStmt(D->getNextUpperBound());
+ }
for (auto I : D->counters()) {
Writer.AddStmt(I);
}
OpenPOWER on IntegriCloud