diff options
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/AST/StmtOpenMP.cpp | 24 | ||||
-rw-r--r-- | clang/lib/AST/StmtPrinter.cpp | 6 | ||||
-rw-r--r-- | clang/lib/AST/StmtProfile.cpp | 5 | ||||
-rw-r--r-- | clang/lib/Basic/OpenMPKinds.cpp | 13 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGStmt.cpp | 3 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGStmtOpenMP.cpp | 5 | ||||
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 1 | ||||
-rw-r--r-- | clang/lib/Parse/ParseOpenMP.cpp | 8 | ||||
-rw-r--r-- | clang/lib/Sema/SemaOpenMP.cpp | 88 | ||||
-rw-r--r-- | clang/lib/Sema/TreeTransform.h | 11 | ||||
-rw-r--r-- | clang/lib/Serialization/ASTReaderStmt.cpp | 12 | ||||
-rw-r--r-- | clang/lib/Serialization/ASTWriterStmt.cpp | 8 | ||||
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | 1 |
13 files changed, 180 insertions, 5 deletions
diff --git a/clang/lib/AST/StmtOpenMP.cpp b/clang/lib/AST/StmtOpenMP.cpp index 4ac2ca2abd0..ba0b93c78a0 100644 --- a/clang/lib/AST/StmtOpenMP.cpp +++ b/clang/lib/AST/StmtOpenMP.cpp @@ -694,6 +694,30 @@ OMPTargetDirective *OMPTargetDirective::CreateEmpty(const ASTContext &C, return new (Mem) OMPTargetDirective(NumClauses); } +OMPTargetParallelDirective *OMPTargetParallelDirective::Create( + const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, + ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt) { + unsigned Size = llvm::alignTo(sizeof(OMPTargetParallelDirective), + llvm::alignOf<OMPClause *>()); + void *Mem = + C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *)); + OMPTargetParallelDirective *Dir = + new (Mem) OMPTargetParallelDirective(StartLoc, EndLoc, Clauses.size()); + Dir->setClauses(Clauses); + Dir->setAssociatedStmt(AssociatedStmt); + return Dir; +} + +OMPTargetParallelDirective * +OMPTargetParallelDirective::CreateEmpty(const ASTContext &C, + unsigned NumClauses, EmptyShell) { + unsigned Size = llvm::alignTo(sizeof(OMPTargetParallelDirective), + llvm::alignOf<OMPClause *>()); + void *Mem = + C.Allocate(Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *)); + return new (Mem) OMPTargetParallelDirective(NumClauses); +} + OMPTargetDataDirective *OMPTargetDataDirective::Create( const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt) { diff --git a/clang/lib/AST/StmtPrinter.cpp b/clang/lib/AST/StmtPrinter.cpp index d8f6fdb8632..7cc597dabe8 100644 --- a/clang/lib/AST/StmtPrinter.cpp +++ b/clang/lib/AST/StmtPrinter.cpp @@ -1083,6 +1083,12 @@ void StmtPrinter::VisitOMPTargetExitDataDirective( PrintOMPExecutableDirective(Node); } +void StmtPrinter::VisitOMPTargetParallelDirective( + OMPTargetParallelDirective *Node) { + Indent() << "#pragma omp target parallel "; + PrintOMPExecutableDirective(Node); +} + void StmtPrinter::VisitOMPTeamsDirective(OMPTeamsDirective *Node) { Indent() << "#pragma omp teams "; PrintOMPExecutableDirective(Node); diff --git a/clang/lib/AST/StmtProfile.cpp b/clang/lib/AST/StmtProfile.cpp index 0ddb928da27..f490a2aba33 100644 --- a/clang/lib/AST/StmtProfile.cpp +++ b/clang/lib/AST/StmtProfile.cpp @@ -594,6 +594,11 @@ void StmtProfiler::VisitOMPTargetExitDataDirective( VisitOMPExecutableDirective(S); } +void StmtProfiler::VisitOMPTargetParallelDirective( + const OMPTargetParallelDirective *S) { + VisitOMPExecutableDirective(S); +} + void StmtProfiler::VisitOMPTeamsDirective(const OMPTeamsDirective *S) { VisitOMPExecutableDirective(S); } diff --git a/clang/lib/Basic/OpenMPKinds.cpp b/clang/lib/Basic/OpenMPKinds.cpp index dec6524d461..e66a3e331e6 100644 --- a/clang/lib/Basic/OpenMPKinds.cpp +++ b/clang/lib/Basic/OpenMPKinds.cpp @@ -455,6 +455,16 @@ bool clang::isAllowedClauseForDirective(OpenMPDirectiveKind DKind, break; } break; + case OMPD_target_parallel: + switch (CKind) { +#define OPENMP_TARGET_PARALLEL_CLAUSE(Name) \ + case OMPC_##Name: \ + return true; +#include "clang/Basic/OpenMPKinds.def" + default: + break; + } + break; case OMPD_teams: switch (CKind) { #define OPENMP_TEAMS_CLAUSE(Name) \ @@ -562,7 +572,8 @@ bool clang::isOpenMPTaskLoopDirective(OpenMPDirectiveKind DKind) { bool clang::isOpenMPParallelDirective(OpenMPDirectiveKind DKind) { return DKind == OMPD_parallel || DKind == OMPD_parallel_for || DKind == OMPD_parallel_for_simd || - DKind == OMPD_parallel_sections; // TODO add next directives. + DKind == OMPD_parallel_sections || DKind == OMPD_target_parallel; + // TODO add next directives. } bool clang::isOpenMPTargetDirective(OpenMPDirectiveKind DKind) { diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp index bd4fa8b7a31..3a22a394847 100644 --- a/clang/lib/CodeGen/CGStmt.cpp +++ b/clang/lib/CodeGen/CGStmt.cpp @@ -262,6 +262,9 @@ void CodeGenFunction::EmitStmt(const Stmt *S) { case Stmt::OMPTargetExitDataDirectiveClass: EmitOMPTargetExitDataDirective(cast<OMPTargetExitDataDirective>(*S)); break; + case Stmt::OMPTargetParallelDirectiveClass: + EmitOMPTargetParallelDirective(cast<OMPTargetParallelDirective>(*S)); + break; case Stmt::OMPTaskLoopDirectiveClass: EmitOMPTaskLoopDirective(cast<OMPTaskLoopDirective>(*S)); break; diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp index 2ea9b0fa636..a43263d4a63 100644 --- a/clang/lib/CodeGen/CGStmtOpenMP.cpp +++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp @@ -2710,6 +2710,11 @@ void CodeGenFunction::EmitOMPTargetExitDataDirective( // TODO: codegen for target exit data. } +void CodeGenFunction::EmitOMPTargetParallelDirective( + const OMPTargetParallelDirective &S) { + // TODO: codegen for target parallel. +} + void CodeGenFunction::EmitOMPTaskLoopDirective(const OMPTaskLoopDirective &S) { // emit the code inside the construct for now auto CS = cast<CapturedStmt>(S.getAssociatedStmt()); diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 10bec3910e3..47c7ab28315 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -2343,6 +2343,7 @@ public: void EmitOMPTargetDataDirective(const OMPTargetDataDirective &S); void EmitOMPTargetEnterDataDirective(const OMPTargetEnterDataDirective &S); void EmitOMPTargetExitDataDirective(const OMPTargetExitDataDirective &S); + void EmitOMPTargetParallelDirective(const OMPTargetParallelDirective &S); void EmitOMPTeamsDirective(const OMPTeamsDirective &S); void EmitOMPCancellationPointDirective(const OMPCancellationPointDirective &S); diff --git a/clang/lib/Parse/ParseOpenMP.cpp b/clang/lib/Parse/ParseOpenMP.cpp index 28748dcac6b..2fb53d149cd 100644 --- a/clang/lib/Parse/ParseOpenMP.cpp +++ b/clang/lib/Parse/ParseOpenMP.cpp @@ -44,7 +44,8 @@ static OpenMPDirectiveKind ParseOpenMPDirectiveKind(Parser &P) { {OMPD_parallel, OMPD_for, OMPD_parallel_for}, {OMPD_parallel_for, OMPD_simd, OMPD_parallel_for_simd}, {OMPD_parallel, OMPD_sections, OMPD_parallel_sections}, - {OMPD_taskloop, OMPD_simd, OMPD_taskloop_simd}}; + {OMPD_taskloop, OMPD_simd, OMPD_taskloop_simd}, + {OMPD_target, OMPD_parallel, OMPD_target_parallel}}; auto Tok = P.getCurToken(); auto DKind = Tok.isAnnotation() @@ -153,6 +154,7 @@ Parser::DeclGroupPtrTy Parser::ParseOpenMPDeclarativeDirective() { case OMPD_target_data: case OMPD_target_enter_data: case OMPD_target_exit_data: + case OMPD_target_parallel: case OMPD_taskloop: case OMPD_taskloop_simd: case OMPD_distribute: @@ -177,7 +179,8 @@ Parser::DeclGroupPtrTy Parser::ParseOpenMPDeclarativeDirective() { /// 'barrier' | 'taskwait' | 'flush' | 'ordered' | 'atomic' | /// 'for simd' | 'parallel for simd' | 'target' | 'target data' | /// 'taskgroup' | 'teams' | 'taskloop' | 'taskloop simd' {clause} | -/// 'distribute' | 'target enter data' | 'target exit data' +/// 'distribute' | 'target enter data' | 'target exit data' | +/// 'target parallel' /// annot_pragma_openmp_end /// StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective( @@ -259,6 +262,7 @@ StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective( case OMPD_teams: case OMPD_taskgroup: case OMPD_target_data: + case OMPD_target_parallel: case OMPD_taskloop: case OMPD_taskloop_simd: case OMPD_distribute: { diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp index 6a5c1d9e126..577772301f0 100644 --- a/clang/lib/Sema/SemaOpenMP.cpp +++ b/clang/lib/Sema/SemaOpenMP.cpp @@ -1628,7 +1628,8 @@ void Sema::ActOnOpenMPRegionStart(OpenMPDirectiveKind DKind, Scope *CurScope) { break; } case OMPD_target_data: - case OMPD_target: { + case OMPD_target: + case OMPD_target_parallel: { Sema::CapturedParamNameType Params[] = { std::make_pair(StringRef(), QualType()) // __context with shared vars }; @@ -1804,6 +1805,7 @@ static bool CheckNestingOfRegions(Sema &SemaRef, DSAStackTy *Stack, // | parallel | ordered | + | // | parallel | atomic | * | // | parallel | target | * | + // | parallel | target parallel | * | // | parallel | target enter | * | // | | data | | // | parallel | target exit | * | @@ -1837,6 +1839,7 @@ static bool CheckNestingOfRegions(Sema &SemaRef, DSAStackTy *Stack, // | for | ordered | * (if construct is ordered) | // | for | atomic | * | // | for | target | * | + // | for | target parallel | * | // | for | target enter | * | // | | data | | // | for | target exit | * | @@ -1870,6 +1873,7 @@ static bool CheckNestingOfRegions(Sema &SemaRef, DSAStackTy *Stack, // | master | ordered | + | // | master | atomic | * | // | master | target | * | + // | master | target parallel | * | // | master | target enter | * | // | | data | | // | master | target exit | * | @@ -1902,6 +1906,7 @@ static bool CheckNestingOfRegions(Sema &SemaRef, DSAStackTy *Stack, // | critical | ordered | + | // | critical | atomic | * | // | critical | target | * | + // | critical | target parallel | * | // | critical | target enter | * | // | | data | | // | critical | target exit | * | @@ -1935,6 +1940,7 @@ static bool CheckNestingOfRegions(Sema &SemaRef, DSAStackTy *Stack, // | simd | ordered | + (with simd clause) | // | simd | atomic | | // | simd | target | | + // | simd | target parallel | | // | simd | target enter | | // | | data | | // | simd | target exit | | @@ -1968,6 +1974,7 @@ static bool CheckNestingOfRegions(Sema &SemaRef, DSAStackTy *Stack, // | for simd | ordered | + (with simd clause) | // | for simd | atomic | | // | for simd | target | | + // | for simd | target parallel | | // | for simd | target enter | | // | | data | | // | for simd | target exit | | @@ -2001,6 +2008,7 @@ static bool CheckNestingOfRegions(Sema &SemaRef, DSAStackTy *Stack, // | parallel for simd| ordered | + (with simd clause) | // | parallel for simd| atomic | | // | parallel for simd| target | | + // | parallel for simd| target parallel | | // | parallel for simd| target enter | | // | | data | | // | parallel for simd| target exit | | @@ -2034,6 +2042,7 @@ static bool CheckNestingOfRegions(Sema &SemaRef, DSAStackTy *Stack, // | sections | ordered | + | // | sections | atomic | * | // | sections | target | * | + // | sections | target parallel | * | // | sections | target enter | * | // | | data | | // | sections | target exit | * | @@ -2067,6 +2076,7 @@ static bool CheckNestingOfRegions(Sema &SemaRef, DSAStackTy *Stack, // | section | ordered | + | // | section | atomic | * | // | section | target | * | + // | section | target parallel | * | // | section | target enter | * | // | | data | | // | section | target exit | * | @@ -2100,6 +2110,7 @@ static bool CheckNestingOfRegions(Sema &SemaRef, DSAStackTy *Stack, // | single | ordered | + | // | single | atomic | * | // | single | target | * | + // | single | target parallel | * | // | single | target enter | * | // | | data | | // | single | target exit | * | @@ -2133,6 +2144,7 @@ static bool CheckNestingOfRegions(Sema &SemaRef, DSAStackTy *Stack, // | parallel for | ordered | * (if construct is ordered) | // | parallel for | atomic | * | // | parallel for | target | * | + // | parallel for | target parallel | * | // | parallel for | target enter | * | // | | data | | // | parallel for | target exit | * | @@ -2166,6 +2178,7 @@ static bool CheckNestingOfRegions(Sema &SemaRef, DSAStackTy *Stack, // | parallel sections| ordered | + | // | parallel sections| atomic | * | // | parallel sections| target | * | + // | parallel sections| target parallel | * | // | parallel sections| target enter | * | // | | data | | // | parallel sections| target exit | * | @@ -2199,6 +2212,7 @@ static bool CheckNestingOfRegions(Sema &SemaRef, DSAStackTy *Stack, // | task | ordered | + | // | task | atomic | * | // | task | target | * | + // | task | target parallel | * | // | task | target enter | * | // | | data | | // | task | target exit | * | @@ -2232,6 +2246,7 @@ static bool CheckNestingOfRegions(Sema &SemaRef, DSAStackTy *Stack, // | ordered | ordered | + | // | ordered | atomic | * | // | ordered | target | * | + // | ordered | target parallel | * | // | ordered | target enter | * | // | | data | | // | ordered | target exit | * | @@ -2265,6 +2280,7 @@ static bool CheckNestingOfRegions(Sema &SemaRef, DSAStackTy *Stack, // | atomic | ordered | | // | atomic | atomic | | // | atomic | target | | + // | atomic | target parallel | | // | atomic | target enter | | // | | data | | // | atomic | target exit | | @@ -2298,6 +2314,7 @@ static bool CheckNestingOfRegions(Sema &SemaRef, DSAStackTy *Stack, // | target | ordered | * | // | target | atomic | * | // | target | target | * | + // | target | target parallel | * | // | target | target enter | * | // | | data | | // | target | target exit | * | @@ -2310,6 +2327,40 @@ static bool CheckNestingOfRegions(Sema &SemaRef, DSAStackTy *Stack, // | target | taskloop simd | * | // | target | distribute | | // +------------------+-----------------+------------------------------------+ + // | target parallel | parallel | * | + // | target parallel | for | * | + // | target parallel | for simd | * | + // | target parallel | master | * | + // | target parallel | critical | * | + // | target parallel | simd | * | + // | target parallel | sections | * | + // | target parallel | section | * | + // | target parallel | single | * | + // | target parallel | parallel for | * | + // | target parallel |parallel for simd| * | + // | target parallel |parallel sections| * | + // | target parallel | task | * | + // | target parallel | taskyield | * | + // | target parallel | barrier | * | + // | target parallel | taskwait | * | + // | target parallel | taskgroup | * | + // | target parallel | flush | * | + // | target parallel | ordered | * | + // | target parallel | atomic | * | + // | target parallel | target | * | + // | target parallel | target parallel | * | + // | target parallel | target enter | * | + // | | data | | + // | target parallel | target exit | * | + // | | data | | + // | target parallel | teams | | + // | target parallel | cancellation | | + // | | point | ! | + // | target parallel | cancel | ! | + // | target parallel | taskloop | * | + // | target parallel | taskloop simd | * | + // | target parallel | distribute | | + // +------------------+-----------------+------------------------------------+ // | teams | parallel | * | // | teams | for | + | // | teams | for simd | + | @@ -2331,6 +2382,7 @@ static bool CheckNestingOfRegions(Sema &SemaRef, DSAStackTy *Stack, // | teams | ordered | + | // | teams | atomic | + | // | teams | target | + | + // | teams | target parallel | + | // | teams | target enter | + | // | | data | | // | teams | target exit | + | @@ -2364,6 +2416,7 @@ static bool CheckNestingOfRegions(Sema &SemaRef, DSAStackTy *Stack, // | taskloop | ordered | + | // | taskloop | atomic | * | // | taskloop | target | * | + // | taskloop | target parallel | * | // | taskloop | target enter | * | // | | data | | // | taskloop | target exit | * | @@ -2396,6 +2449,7 @@ static bool CheckNestingOfRegions(Sema &SemaRef, DSAStackTy *Stack, // | taskloop simd | ordered | + (with simd clause) | // | taskloop simd | atomic | | // | taskloop simd | target | | + // | taskloop simd | target parallel | | // | taskloop simd | target enter | | // | | data | | // | taskloop simd | target exit | | @@ -2429,6 +2483,7 @@ static bool CheckNestingOfRegions(Sema &SemaRef, DSAStackTy *Stack, // | distribute | ordered | + | // | distribute | atomic | * | // | distribute | target | | + // | distribute | target parallel | | // | distribute | target enter | | // | | data | | // | distribute | target exit | | @@ -2499,7 +2554,9 @@ static bool CheckNestingOfRegions(Sema &SemaRef, DSAStackTy *Stack, // OpenMP construct that matches the type specified in // construct-type-clause. NestingProhibited = - !((CancelRegion == OMPD_parallel && ParentRegion == OMPD_parallel) || + !((CancelRegion == OMPD_parallel && + (ParentRegion == OMPD_parallel || + ParentRegion == OMPD_target_parallel)) || (CancelRegion == OMPD_for && (ParentRegion == OMPD_for || ParentRegion == OMPD_parallel_for)) || (CancelRegion == OMPD_taskgroup && ParentRegion == OMPD_task) || @@ -2838,6 +2895,12 @@ StmtResult Sema::ActOnOpenMPExecutableDirective( EndLoc); AllowedNameModifiers.push_back(OMPD_target); break; + case OMPD_target_parallel: + Res = ActOnOpenMPTargetParallelDirective(ClausesWithImplicit, AStmt, + StartLoc, EndLoc); + AllowedNameModifiers.push_back(OMPD_target); + AllowedNameModifiers.push_back(OMPD_parallel); + break; case OMPD_cancellation_point: assert(ClausesWithImplicit.empty() && "No clauses are allowed for 'omp cancellation point' directive"); @@ -5603,6 +5666,27 @@ StmtResult Sema::ActOnOpenMPTargetDirective(ArrayRef<OMPClause *> Clauses, return OMPTargetDirective::Create(Context, StartLoc, EndLoc, Clauses, AStmt); } +StmtResult +Sema::ActOnOpenMPTargetParallelDirective(ArrayRef<OMPClause *> Clauses, + Stmt *AStmt, SourceLocation StartLoc, + SourceLocation EndLoc) { + if (!AStmt) + return StmtError(); + + CapturedStmt *CS = cast<CapturedStmt>(AStmt); + // 1.2.2 OpenMP Language Terminology + // Structured block - An executable statement with a single entry at the + // top and a single exit at the bottom. + // The point of exit cannot be a branch out of the structured block. + // longjmp() and throw() must not violate the entry/exit criteria. + CS->getCapturedDecl()->setNothrow(); + + getCurFunction()->setHasBranchProtectedScope(); + + return OMPTargetParallelDirective::Create(Context, StartLoc, EndLoc, Clauses, + AStmt); +} + /// \brief Check for existence of a map clause in the list of clauses. static bool HasMapClause(ArrayRef<OMPClause *> Clauses) { for (ArrayRef<OMPClause *>::iterator I = Clauses.begin(), E = Clauses.end(); diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h index 648a6c17425..e3272eec42c 100644 --- a/clang/lib/Sema/TreeTransform.h +++ b/clang/lib/Sema/TreeTransform.h @@ -7414,6 +7414,17 @@ StmtResult TreeTransform<Derived>::TransformOMPTargetExitDataDirective( } template <typename Derived> +StmtResult TreeTransform<Derived>::TransformOMPTargetParallelDirective( + OMPTargetParallelDirective *D) { + DeclarationNameInfo DirName; + getDerived().getSema().StartOpenMPDSABlock(OMPD_target_parallel, DirName, + nullptr, D->getLocStart()); + StmtResult Res = getDerived().TransformOMPExecutableDirective(D); + getDerived().getSema().EndOpenMPDSABlock(Res.get()); + return Res; +} + +template <typename Derived> StmtResult TreeTransform<Derived>::TransformOMPTeamsDirective(OMPTeamsDirective *D) { DeclarationNameInfo DirName; diff --git a/clang/lib/Serialization/ASTReaderStmt.cpp b/clang/lib/Serialization/ASTReaderStmt.cpp index 0b5ab4d7caa..a20b260184d 100644 --- a/clang/lib/Serialization/ASTReaderStmt.cpp +++ b/clang/lib/Serialization/ASTReaderStmt.cpp @@ -2482,6 +2482,13 @@ void ASTStmtReader::VisitOMPTargetExitDataDirective( VisitOMPExecutableDirective(D); } +void ASTStmtReader::VisitOMPTargetParallelDirective( + OMPTargetParallelDirective *D) { + VisitStmt(D); + ++Idx; + VisitOMPExecutableDirective(D); +} + void ASTStmtReader::VisitOMPTeamsDirective(OMPTeamsDirective *D) { VisitStmt(D); // The NumClauses field was read in ReadStmtFromStream. @@ -3135,6 +3142,11 @@ Stmt *ASTReader::ReadStmtFromStream(ModuleFile &F) { Context, Record[ASTStmtReader::NumStmtFields], Empty); break; + case STMT_OMP_TARGET_PARALLEL_DIRECTIVE: + S = OMPTargetParallelDirective::CreateEmpty( + Context, Record[ASTStmtReader::NumStmtFields], Empty); + break; + case STMT_OMP_TEAMS_DIRECTIVE: S = OMPTeamsDirective::CreateEmpty( Context, Record[ASTStmtReader::NumStmtFields], Empty); diff --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp index e93cfe5fd85..acba66a50ca 100644 --- a/clang/lib/Serialization/ASTWriterStmt.cpp +++ b/clang/lib/Serialization/ASTWriterStmt.cpp @@ -2238,6 +2238,14 @@ void ASTStmtWriter::VisitOMPTargetExitDataDirective( Code = serialization::STMT_OMP_TARGET_EXIT_DATA_DIRECTIVE; } +void ASTStmtWriter::VisitOMPTargetParallelDirective( + OMPTargetParallelDirective *D) { + VisitStmt(D); + Record.push_back(D->getNumClauses()); + VisitOMPExecutableDirective(D); + Code = serialization::STMT_OMP_TARGET_PARALLEL_DIRECTIVE; +} + void ASTStmtWriter::VisitOMPTaskyieldDirective(OMPTaskyieldDirective *D) { VisitStmt(D); VisitOMPExecutableDirective(D); diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp index 309caa50ea3..662122e8e64 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -832,6 +832,7 @@ void ExprEngine::Visit(const Stmt *S, ExplodedNode *Pred, case Stmt::OMPTargetDataDirectiveClass: case Stmt::OMPTargetEnterDataDirectiveClass: case Stmt::OMPTargetExitDataDirectiveClass: + case Stmt::OMPTargetParallelDirectiveClass: case Stmt::OMPTeamsDirectiveClass: case Stmt::OMPCancellationPointDirectiveClass: case Stmt::OMPCancelDirectiveClass: |