Lines Matching refs:DSAStack
840 #define DSAStack static_cast<DSAStackTy *>(VarDataSharingAttributesStack) macro
851 if (DSAStack->hasExplicitDirective(isOpenMPTargetExecutionDirective, Level)) { in IsOpenMPCapturedByRef()
916 DSAStack->checkMappableExprComponentListsForDecl( in IsOpenMPCapturedByRef()
956 IsByRef = !DSAStack->hasExplicitDSA( in IsOpenMPCapturedByRef()
977 return DSAStack->getNestingLevel(); in getOpenMPNestingLevel()
993 if (DSAStack->getCurrentDirective() == OMPD_target && in IsOpenMPCapturedDecl()
994 !DSAStack->isClauseParsingMode()) in IsOpenMPCapturedDecl()
996 if (DSAStack->hasDirective( in IsOpenMPCapturedDecl()
1005 if (DSAStack->getCurrentDirective() != OMPD_unknown && in IsOpenMPCapturedDecl()
1006 (!DSAStack->isClauseParsingMode() || in IsOpenMPCapturedDecl()
1007 DSAStack->getParentDirective() != OMPD_unknown)) { in IsOpenMPCapturedDecl()
1008 auto &&Info = DSAStack->isLoopControlVariable(D); in IsOpenMPCapturedDecl()
1011 isParallelOrTaskRegion(DSAStack->getCurrentDirective())) || in IsOpenMPCapturedDecl()
1012 (VD && DSAStack->isForceVarCapturing())) in IsOpenMPCapturedDecl()
1014 auto DVarPrivate = DSAStack->getTopDSA(D, DSAStack->isClauseParsingMode()); in IsOpenMPCapturedDecl()
1017 DVarPrivate = DSAStack->hasDSA( in IsOpenMPCapturedDecl()
1019 DSAStack->isClauseParsingMode()); in IsOpenMPCapturedDecl()
1028 return DSAStack->hasExplicitDSA( in isOpenMPPrivateDecl()
1038 DSAStack->hasExplicitDirective(isOpenMPTargetExecutionDirective, in isOpenMPTargetCapturedDecl()
1042 void Sema::DestroyDataSharingAttributesStack() { delete DSAStack; } in DestroyDataSharingAttributesStack()
1047 DSAStack->push(DKind, DirName, CurScope, Loc); in StartOpenMPDSABlock()
1052 DSAStack->setClauseParsingMode(K); in StartOpenMPClause()
1056 DSAStack->setClauseParsingMode(/*K=*/OMPC_unknown); in EndOpenMPClause()
1077 auto DVar = DSAStack->getTopDSA(VD, false); in EndOpenMPDSABlock()
1105 DSAStack->pop(); in EndOpenMPDSABlock()
1264 if (VD->isUsed() && !DSAStack->isThreadPrivate(VD)) { in ActOnOpenMPIdExpression()
1382 DSAStack->addDSA(VD, DE, OMPC_threadprivate); in CheckOMPThreadPrivateDecl()
1599 ActOnCapturedRegionStart(DSAStack->getConstructLoc(), CurScope, CR_OpenMP, in ActOnOpenMPRegionStart()
1623 ActOnCapturedRegionStart(DSAStack->getConstructLoc(), CurScope, CR_OpenMP, in ActOnOpenMPRegionStart()
1642 ActOnCapturedRegionStart(DSAStack->getConstructLoc(), CurScope, CR_OpenMP, in ActOnOpenMPRegionStart()
1677 ActOnCapturedRegionStart(DSAStack->getConstructLoc(), CurScope, CR_OpenMP, in ActOnOpenMPRegionStart()
1699 ActOnCapturedRegionStart(DSAStack->getConstructLoc(), CurScope, CR_OpenMP, in ActOnOpenMPRegionStart()
1799 DSAStack->setForceVarCapturing(Clause->getClauseKind() == OMPC_copyin); in ActOnOpenMPRegionEnd()
1806 DSAStack->setForceVarCapturing(/*V=*/false); in ActOnOpenMPRegionEnd()
1807 } else if (isParallelOrTaskRegion(DSAStack->getCurrentDirective())) { in ActOnOpenMPRegionEnd()
1852 if (isOpenMPWorksharingDirective(DSAStack->getCurrentDirective()) && in ActOnOpenMPRegionEnd()
1853 isOpenMPSimdDirective(DSAStack->getCurrentDirective()) && OC && in ActOnOpenMPRegionEnd()
1856 << getOpenMPDirectiveName(DSAStack->getCurrentDirective()); in ActOnOpenMPRegionEnd()
3384 if (CheckNestingOfRegions(*this, DSAStack, Kind, DirName, CancelRegion, in ActOnOpenMPExecutableDirective()
3396 DSAAttrChecker DSAChecker(DSAStack, *this, cast<CapturedStmt>(AStmt)); in ActOnOpenMPExecutableDirective()
3894 DSAStack->isCancelRegion()); in ActOnOpenMPParallelDirective()
4584 unsigned AssociatedLoops = DSAStack->getAssociatedLoops(); in ActOnOpenMPLoopInitialization()
4586 isOpenMPLoopDirective(DSAStack->getCurrentDirective())) { in ActOnOpenMPLoopInitialization()
4600 DSAStack->addLoopControlVariable(D, VD); in ActOnOpenMPLoopInitialization()
4603 DSAStack->setAssociatedLoops(AssociatedLoops - 1); in ActOnOpenMPLoopInitialization()
5466 AStmt, *this, *DSAStack, VarsWithImplicitDSA, B); in ActOnOpenMPSimdDirective()
5479 DSAStack)) in ActOnOpenMPSimdDirective()
5520 AStmt, *this, *DSAStack, VarsWithImplicitDSA, B); in ActOnOpenMPForDirective()
5533 DSAStack)) in ActOnOpenMPForDirective()
5540 Clauses, AStmt, B, DSAStack->isCancelRegion()); in ActOnOpenMPForDirective()
5556 getOrderedNumberExpr(Clauses), AStmt, *this, *DSAStack, in ActOnOpenMPForSimdDirective()
5570 DSAStack)) in ActOnOpenMPForSimdDirective()
5623 ->setHasCancel(DSAStack->isCancelRegion()); in ActOnOpenMPSectionsDirective()
5633 DSAStack->isCancelRegion()); in ActOnOpenMPSectionsDirective()
5645 DSAStack->setParentCancelRegion(DSAStack->isCancelRegion()); in ActOnOpenMPSectionDirective()
5648 DSAStack->isCancelRegion()); in ActOnOpenMPSectionDirective()
5725 auto Pair = DSAStack->getCriticalWithHint(DirName); in ActOnOpenMPCriticalDirective()
5749 DSAStack->addCriticalWithHint(Dir, Hint); in ActOnOpenMPCriticalDirective()
5773 getOrderedNumberExpr(Clauses), AStmt, *this, *DSAStack, in ActOnOpenMPParallelForDirective()
5787 DSAStack)) in ActOnOpenMPParallelForDirective()
5795 DSAStack->isCancelRegion()); in ActOnOpenMPParallelForDirective()
5818 getOrderedNumberExpr(Clauses), AStmt, *this, *DSAStack, in ActOnOpenMPParallelForSimdDirective()
5829 DSAStack)) in ActOnOpenMPParallelForSimdDirective()
5882 ->setHasCancel(DSAStack->isCancelRegion()); in ActOnOpenMPParallelSectionsDirective()
5893 Context, StartLoc, EndLoc, Clauses, AStmt, DSAStack->isCancelRegion()); in ActOnOpenMPParallelSectionsDirective()
5913 DSAStack->isCancelRegion()); in ActOnOpenMPTaskDirective()
5991 isOpenMPSimdDirective(DSAStack->getParentDirective())) { in ActOnOpenMPOrderedDirective()
6001 } else if (DependFound && !DSAStack->getParentOrderedRegionParam()) { in ActOnOpenMPOrderedDirective()
6006 if (auto *Param = DSAStack->getParentOrderedRegionParam()) { in ActOnOpenMPOrderedDirective()
6716 if (DSAStack->hasInnerTeamsRegion()) { in ActOnOpenMPTargetDirective()
6737 Diag(DSAStack->getInnerTeamsRegionLoc(), in ActOnOpenMPTargetDirective()
6791 getOrderedNumberExpr(Clauses), AStmt, *this, *DSAStack, in ActOnOpenMPTargetParallelForDirective()
6805 DSAStack)) in ActOnOpenMPTargetParallelForDirective()
6813 B, DSAStack->isCancelRegion()); in ActOnOpenMPTargetParallelForDirective()
6926 if (DSAStack->isParentNowaitRegion()) { in ActOnOpenMPCancellationPointDirective()
6930 if (DSAStack->isParentOrderedRegion()) { in ActOnOpenMPCancellationPointDirective()
6948 if (DSAStack->isParentNowaitRegion()) { in ActOnOpenMPCancelDirective()
6952 if (DSAStack->isParentOrderedRegion()) { in ActOnOpenMPCancelDirective()
6956 DSAStack->setParentCancelRegion(/*Cancel=*/true); in ActOnOpenMPCancelDirective()
6998 /*OrderedLoopCountExpr=*/nullptr, AStmt, *this, *DSAStack, in ActOnOpenMPTaskLoopDirective()
7030 /*OrderedLoopCountExpr=*/nullptr, AStmt, *this, *DSAStack, in ActOnOpenMPTaskLoopSimdDirective()
7044 DSAStack)) in ActOnOpenMPTaskLoopSimdDirective()
7074 *this, *DSAStack, VarsWithImplicitDSA, B); in ActOnOpenMPDistributeDirective()
7106 nullptr /*ordered not a clause on distribute*/, AStmt, *this, *DSAStack, in ActOnOpenMPDistributeParallelForDirective()
7139 nullptr /*ordered not a clause on distribute*/, AStmt, *this, *DSAStack, in ActOnOpenMPDistributeParallelForSimdDirective()
7173 *this, *DSAStack, VarsWithImplicitDSA, B); in ActOnOpenMPDistributeSimdDirective()
7205 getOrderedNumberExpr(Clauses), AStmt, *this, *DSAStack, in ActOnOpenMPTargetParallelForSimdDirective()
7219 DSAStack)) in ActOnOpenMPTargetParallelForSimdDirective()
7482 if (CKind == OMPC_collapse && DSAStack->getAssociatedLoops() == 1) in VerifyPositiveIntegerConstantInClause()
7483 DSAStack->setAssociatedLoops(Result.getExtValue()); in VerifyPositiveIntegerConstantInClause()
7485 DSAStack->setAssociatedLoops(Result.getExtValue()); in VerifyPositiveIntegerConstantInClause()
7549 DSAStack->setOrderedRegion(/*IsOrdered=*/true, NumForLoops); in ActOnOpenMPOrderedClause()
7660 DSAStack->setDefaultDSANone(KindKwLoc); in ActOnOpenMPDefaultClause()
7663 DSAStack->setDefaultDSAShared(KindKwLoc); in ActOnOpenMPDefaultClause()
7868 } else if (isParallelOrTaskRegion(DSAStack->getCurrentDirective()) && in ActOnOpenMPScheduleClause()
7967 DSAStack->setNowaitRegion(); in ActOnOpenMPNowaitClause()
8239 DSAStackTy::DSAVarData DVar = DSAStack->getTopDSA(D, false); in ActOnOpenMPPrivateClause()
8243 ReportOriginalDSA(*this, DSAStack, D, DVar); in ActOnOpenMPPrivateClause()
8249 isOpenMPTaskingDirective(DSAStack->getCurrentDirective())) { in ActOnOpenMPPrivateClause()
8252 << getOpenMPDirectiveName(DSAStack->getCurrentDirective()); in ActOnOpenMPPrivateClause()
8265 if (DSAStack->getCurrentDirective() == OMPD_target) { in ActOnOpenMPPrivateClause()
8266 if (DSAStack->checkMappableExprComponentListsForDecl( in ActOnOpenMPPrivateClause()
8272 << getOpenMPDirectiveName(DSAStack->getCurrentDirective()); in ActOnOpenMPPrivateClause()
8273 ReportOriginalDSA(*this, DSAStack, D, DVar); in ActOnOpenMPPrivateClause()
8299 DSAStack->addDSA(D, RefExpr->IgnoreParens(), OMPC_private, Ref); in ActOnOpenMPPrivateClause()
8346 auto ImplicitClauseLoc = DSAStack->getConstructLoc(); in ActOnOpenMPFirstprivateClause()
8385 DSAStackTy::DSAVarData DVar = DSAStack->getTopDSA(D, false); in ActOnOpenMPFirstprivateClause()
8397 ReportOriginalDSA(*this, DSAStack, D, DVar); in ActOnOpenMPFirstprivateClause()
8417 ReportOriginalDSA(*this, DSAStack, D, DVar); in ActOnOpenMPFirstprivateClause()
8421 OpenMPDirectiveKind CurrDir = DSAStack->getCurrentDirective(); in ActOnOpenMPFirstprivateClause()
8429 DVar = DSAStack->getImplicitDSA(D, true); in ActOnOpenMPFirstprivateClause()
8436 ReportOriginalDSA(*this, DSAStack, D, DVar); in ActOnOpenMPFirstprivateClause()
8452 DVar = DSAStack->hasInnermostDSA( in ActOnOpenMPFirstprivateClause()
8464 ReportOriginalDSA(*this, DSAStack, D, DVar); in ActOnOpenMPFirstprivateClause()
8483 DVar = DSAStack->hasInnermostDSA( in ActOnOpenMPFirstprivateClause()
8491 ReportOriginalDSA(*this, DSAStack, D, DVar); in ActOnOpenMPFirstprivateClause()
8494 DVar = DSAStack->hasInnermostDSA( in ActOnOpenMPFirstprivateClause()
8503 ReportOriginalDSA(*this, DSAStack, D, DVar); in ActOnOpenMPFirstprivateClause()
8506 DVar = DSAStack->getTopDSA(D, false); in ActOnOpenMPFirstprivateClause()
8509 ReportOriginalDSA(*this, DSAStack, D, DVar); in ActOnOpenMPFirstprivateClause()
8517 if (DSAStack->checkMappableExprComponentListsForDecl( in ActOnOpenMPFirstprivateClause()
8523 << getOpenMPDirectiveName(DSAStack->getCurrentDirective()); in ActOnOpenMPFirstprivateClause()
8524 ReportOriginalDSA(*this, DSAStack, D, DVar); in ActOnOpenMPFirstprivateClause()
8532 isOpenMPTaskingDirective(DSAStack->getCurrentDirective())) { in ActOnOpenMPFirstprivateClause()
8535 << getOpenMPDirectiveName(DSAStack->getCurrentDirective()); in ActOnOpenMPFirstprivateClause()
8606 DSAStack->addDSA(D, RefExpr->IgnoreParens(), OMPC_firstprivate, Ref); in ActOnOpenMPFirstprivateClause()
8665 DSAStackTy::DSAVarData DVar = DSAStack->getTopDSA(D, false); in ActOnOpenMPLastprivateClause()
8672 ReportOriginalDSA(*this, DSAStack, D, DVar); in ActOnOpenMPLastprivateClause()
8676 OpenMPDirectiveKind CurrDir = DSAStack->getCurrentDirective(); in ActOnOpenMPLastprivateClause()
8686 DVar = DSAStack->getImplicitDSA(D, true); in ActOnOpenMPLastprivateClause()
8691 ReportOriginalDSA(*this, DSAStack, D, DVar); in ActOnOpenMPLastprivateClause()
8700 DSAStackTy::DSAVarData DVar = DSAStack->getTopDSA(D, false); in ActOnOpenMPLastprivateClause()
8703 ReportOriginalDSA(*this, DSAStack, D, DVar); in ActOnOpenMPLastprivateClause()
8753 BuildBinOp(DSAStack->getCurScope(), ELoc, BO_Assign, SimpleRefExpr, in ActOnOpenMPLastprivateClause()
8761 DSAStack->addDSA(D, RefExpr->IgnoreParens(), OMPC_lastprivate, Ref); in ActOnOpenMPLastprivateClause()
8806 DSAStackTy::DSAVarData DVar = DSAStack->getTopDSA(D, false); in ActOnOpenMPSharedClause()
8811 ReportOriginalDSA(*this, DSAStack, D, DVar); in ActOnOpenMPSharedClause()
8818 DSAStack->addDSA(D, RefExpr->IgnoreParens(), OMPC_shared, Ref); in ActOnOpenMPSharedClause()
9117 *this, ELoc, ERange, DSAStack->getCurScope(), ReductionIdScopeSpec, in ActOnOpenMPReductionClause()
9174 DSARefChecker Check(DSAStack); in ActOnOpenMPReductionClause()
9195 DVar = DSAStack->getTopDSA(D, false); in ActOnOpenMPReductionClause()
9205 ReportOriginalDSA(*this, DSAStack, D, DVar); in ActOnOpenMPReductionClause()
9213 OpenMPDirectiveKind CurrDir = DSAStack->getCurrentDirective(); in ActOnOpenMPReductionClause()
9216 DVar = DSAStack->getImplicitDSA(D, true); in ActOnOpenMPReductionClause()
9221 ReportOriginalDSA(*this, DSAStack, D, DVar); in ActOnOpenMPReductionClause()
9230 *this, ELoc, ERange, DSAStack->getCurScope(), ReductionIdScopeSpec, in ActOnOpenMPReductionClause()
9479 ReductionOp = BuildBinOp(DSAStack->getCurScope(), in ActOnOpenMPReductionClause()
9484 BuildBinOp(DSAStack->getCurScope(), ReductionId.getLocStart(), in ActOnOpenMPReductionClause()
9491 BuildBinOp(DSAStack->getCurScope(), ReductionId.getLocStart(), in ActOnOpenMPReductionClause()
9519 BuildBinOp(DSAStack->getCurScope(), ELoc, BO_Assign, in ActOnOpenMPReductionClause()
9528 DSAStack->addDSA(D, RefExpr->IgnoreParens(), OMPC_reduction, Ref); in ActOnOpenMPReductionClause()
9640 DSAStackTy::DSAVarData DVar = DSAStack->getTopDSA(D, false); in ActOnOpenMPLinearClause()
9644 ReportOriginalDSA(*this, DSAStack, D, DVar); in ActOnOpenMPLinearClause()
9669 BuildBinOp(DSAStack->getCurScope(), ELoc, BO_Assign, in ActOnOpenMPLinearClause()
9686 DSAStack->addDSA(D, RefExpr->IgnoreParens(), OMPC_linear, Ref); in ActOnOpenMPLinearClause()
9868 if (Expr *PrevRef = DSAStack->addUniqueAligned(D, SimpleRefExpr)) { in ActOnOpenMPAlignedClause()
9948 if (!DSAStack->isThreadPrivate(VD)) { in ActOnOpenMPCopyinClause()
9981 DSAStack->addDSA(VD, DE, OMPC_copyin); in ActOnOpenMPCopyinClause()
10027 if (!VD || !DSAStack->isThreadPrivate(VD)) { in ActOnOpenMPCopyprivateClause()
10028 auto DVar = DSAStack->getTopDSA(D, false); in ActOnOpenMPCopyprivateClause()
10034 ReportOriginalDSA(*this, DSAStack, D, DVar); in ActOnOpenMPCopyprivateClause()
10042 DVar = DSAStack->getImplicitDSA(D, false); in ActOnOpenMPCopyprivateClause()
10047 ReportOriginalDSA(*this, DSAStack, D, DVar); in ActOnOpenMPCopyprivateClause()
10057 << getOpenMPDirectiveName(DSAStack->getCurrentDirective()); in ActOnOpenMPCopyprivateClause()
10082 auto AssignmentOp = BuildBinOp(DSAStack->getCurScope(), ELoc, BO_Assign, in ActOnOpenMPCopyprivateClause()
10124 if (DSAStack->getCurrentDirective() == OMPD_ordered && in ActOnOpenMPDependClause()
10130 if (DSAStack->getCurrentDirective() != OMPD_ordered && in ActOnOpenMPDependClause()
10145 if (auto *OrderedCountExpr = DSAStack->getParentOrderedRegionParam()) { in ActOnOpenMPDependClause()
10151 DSAStack->getParentOrderedRegionParam()) { in ActOnOpenMPDependClause()
10228 DSAStack->getParentOrderedRegionParam() && in ActOnOpenMPDependClause()
10229 DepCounter != DSAStack->isParentLoopControlVariable(D).first) { in ActOnOpenMPDependClause()
10231 << DSAStack->getParentLoopControlVariable( in ActOnOpenMPDependClause()
10262 DSAStack->getParentOrderedRegionParam()) { in ActOnOpenMPDependClause()
10264 << DSAStack->getParentLoopControlVariable(VarList.size() + 1); in ActOnOpenMPDependClause()
10273 DSAStack->addDoacrossDependClause(C, OpsOffs); in ActOnOpenMPDependClause()
11047 checkMappableExpressionList(*this, DSAStack, OMPC_map, MVLI, StartLoc, in ActOnOpenMPMapClause()
11423 } else if (isParallelOrTaskRegion(DSAStack->getCurrentDirective()) && in ActOnOpenMPDistScheduleClause()
11623 if (DSAStack->isThreadPrivate(VD)) { in checkDeclIsAllowedInOpenMPTarget()
11625 ReportOriginalDSA(*this, DSAStack, VD, DSAStack->getTopDSA(VD, false)); in checkDeclIsAllowedInOpenMPTarget()
11633 !checkValueDeclInTarget(SL, SR, *this, DSAStack, VD)) { in checkDeclIsAllowedInOpenMPTarget()
11665 checkMappableExpressionList(*this, DSAStack, OMPC_to, MVLI, StartLoc); in ActOnOpenMPToClause()
11679 checkMappableExpressionList(*this, DSAStack, OMPC_from, MVLI, StartLoc); in ActOnOpenMPFromClause()