diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2015-12-28 07:25:51 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2015-12-28 07:25:51 +0000 |
commit | 6402bcad714d776a9ee2e6d427e0dfb363915032 (patch) | |
tree | 571204e42c6d32b251c44b528eb2f92630a33fa7 /clang/lib/Serialization | |
parent | 401675ce5b6231606b1333fa0d228a440b1e747d (diff) | |
download | bcm5719-llvm-6402bcad714d776a9ee2e6d427e0dfb363915032.tar.gz bcm5719-llvm-6402bcad714d776a9ee2e6d427e0dfb363915032.zip |
[OPENMP 4.5] Sema/parsing support for extended format of 'schedule' clause.
OpenMP 4.0-3.1 supports the next format of ‘schedule’ clause: schedule(kind[, chunk_size])
Where kind can be one of ‘static’, ‘dynamic’, ‘guided’, ‘auto’ or ‘runtime’.
OpenMP 4.5 defines the format: schedule([modifier [, modifier]:]kind[, chunk_size])
Modifier can be one of ‘monotonic’, ‘nonmonotonic’ or ‘simd’.
llvm-svn: 256487
Diffstat (limited to 'clang/lib/Serialization')
-rw-r--r-- | clang/lib/Serialization/ASTReaderStmt.cpp | 6 | ||||
-rw-r--r-- | clang/lib/Serialization/ASTWriterStmt.cpp | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTReaderStmt.cpp b/clang/lib/Serialization/ASTReaderStmt.cpp index 638d6ee0266..109ef1fa9b2 100644 --- a/clang/lib/Serialization/ASTReaderStmt.cpp +++ b/clang/lib/Serialization/ASTReaderStmt.cpp @@ -1929,9 +1929,15 @@ void OMPClauseReader::VisitOMPProcBindClause(OMPProcBindClause *C) { void OMPClauseReader::VisitOMPScheduleClause(OMPScheduleClause *C) { C->setScheduleKind( static_cast<OpenMPScheduleClauseKind>(Record[Idx++])); + C->setFirstScheduleModifier( + static_cast<OpenMPScheduleClauseModifier>(Record[Idx++])); + C->setSecondScheduleModifier( + static_cast<OpenMPScheduleClauseModifier>(Record[Idx++])); C->setChunkSize(Reader->Reader.ReadSubExpr()); C->setHelperChunkSize(Reader->Reader.ReadSubExpr()); C->setLParenLoc(Reader->ReadSourceLocation(Record, Idx)); + C->setFirstScheduleModifierLoc(Reader->ReadSourceLocation(Record, Idx)); + C->setSecondScheduleModifierLoc(Reader->ReadSourceLocation(Record, Idx)); C->setScheduleKindLoc(Reader->ReadSourceLocation(Record, Idx)); C->setCommaLoc(Reader->ReadSourceLocation(Record, Idx)); } diff --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp index 562858561fc..8a4e9ab0176 100644 --- a/clang/lib/Serialization/ASTWriterStmt.cpp +++ b/clang/lib/Serialization/ASTWriterStmt.cpp @@ -1811,9 +1811,13 @@ void OMPClauseWriter::VisitOMPProcBindClause(OMPProcBindClause *C) { void OMPClauseWriter::VisitOMPScheduleClause(OMPScheduleClause *C) { Record.push_back(C->getScheduleKind()); + Record.push_back(C->getFirstScheduleModifier()); + Record.push_back(C->getSecondScheduleModifier()); Writer->Writer.AddStmt(C->getChunkSize()); Writer->Writer.AddStmt(C->getHelperChunkSize()); Writer->Writer.AddSourceLocation(C->getLParenLoc(), Record); + Writer->Writer.AddSourceLocation(C->getFirstScheduleModifierLoc(), Record); + Writer->Writer.AddSourceLocation(C->getSecondScheduleModifierLoc(), Record); Writer->Writer.AddSourceLocation(C->getScheduleKindLoc(), Record); Writer->Writer.AddSourceLocation(C->getCommaLoc(), Record); } |