diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2019-10-14 17:17:41 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2019-10-14 17:17:41 +0000 |
commit | 5bbceadfc89dda6ff11195aaa3043b2eaaadad25 (patch) | |
tree | 87b9a3ddb073f6b595290b26a44d96841084ebf6 /clang/lib/Serialization | |
parent | 5c6ab2a0b1f2da22c8ce4fbfc022f599aaa4a2a6 (diff) | |
download | bcm5719-llvm-5bbceadfc89dda6ff11195aaa3043b2eaaadad25.tar.gz bcm5719-llvm-5bbceadfc89dda6ff11195aaa3043b2eaaadad25.zip |
[OPENMP50]Add support for 'parallel master taskloop' construct.
Added parsing/sema/codegen support for 'parallel master taskloop'
constructs. Some of the clauses, like 'grainsize', 'num_tasks', 'final'
and 'priority' are not supported in full, only constant expressions can
be used currently in these clauses.
llvm-svn: 374791
Diffstat (limited to 'clang/lib/Serialization')
-rw-r--r-- | clang/lib/Serialization/ASTReaderStmt.cpp | 13 | ||||
-rw-r--r-- | clang/lib/Serialization/ASTWriterStmt.cpp | 6 |
2 files changed, 19 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTReaderStmt.cpp b/clang/lib/Serialization/ASTReaderStmt.cpp index 8ee359646ff..0c802a6b098 100644 --- a/clang/lib/Serialization/ASTReaderStmt.cpp +++ b/clang/lib/Serialization/ASTReaderStmt.cpp @@ -2281,6 +2281,11 @@ void ASTStmtReader::VisitOMPMasterTaskLoopDirective( VisitOMPLoopDirective(D); } +void ASTStmtReader::VisitOMPParallelMasterTaskLoopDirective( + OMPParallelMasterTaskLoopDirective *D) { + VisitOMPLoopDirective(D); +} + void ASTStmtReader::VisitOMPDistributeDirective(OMPDistributeDirective *D) { VisitOMPLoopDirective(D); } @@ -3080,6 +3085,14 @@ Stmt *ASTReader::ReadStmtFromStream(ModuleFile &F) { break; } + case STMT_OMP_PARALLEL_MASTER_TASKLOOP_DIRECTIVE: { + unsigned NumClauses = Record[ASTStmtReader::NumStmtFields]; + unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1]; + S = OMPParallelMasterTaskLoopDirective::CreateEmpty(Context, NumClauses, + CollapsedNum, Empty); + break; + } + case STMT_OMP_DISTRIBUTE_DIRECTIVE: { unsigned NumClauses = Record[ASTStmtReader::NumStmtFields]; unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1]; diff --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp index 7cf4ab80722..387ed44f1ab 100644 --- a/clang/lib/Serialization/ASTWriterStmt.cpp +++ b/clang/lib/Serialization/ASTWriterStmt.cpp @@ -2229,6 +2229,12 @@ void ASTStmtWriter::VisitOMPMasterTaskLoopDirective( Code = serialization::STMT_OMP_MASTER_TASKLOOP_DIRECTIVE; } +void ASTStmtWriter::VisitOMPParallelMasterTaskLoopDirective( + OMPParallelMasterTaskLoopDirective *D) { + VisitOMPLoopDirective(D); + Code = serialization::STMT_OMP_PARALLEL_MASTER_TASKLOOP_DIRECTIVE; +} + void ASTStmtWriter::VisitOMPDistributeDirective(OMPDistributeDirective *D) { VisitOMPLoopDirective(D); Code = serialization::STMT_OMP_DISTRIBUTE_DIRECTIVE; |