reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

tools/clang/lib/Sema/SemaOpenMP.cpp
 1546   DSAStack->pushFunction();
 1550   DSAStack->popFunction(OldFSI);
 1731   if (DSAStack->hasExplicitDirective(isOpenMPTargetExecutionDirective, Level)) {
 1794     DSAStack->checkMappableExprComponentListsForDeclAtLevel(
 1838           (DSAStack->isForceCaptureByReferenceInTargetExecutable() &&
 1841           DSAStack->getDefaultDMAAtLevel(Level) == DMA_tofrom_scalar ||
 1842           DSAStack->hasExplicitDSA(
 1850           DSAStack->getCaptureRegion(Level, OpenMPCaptureLevel) ==
 1852          !DSAStack->hasExplicitDSA(
 1878   return DSAStack->getNestingLevel();
 1882   return (isOpenMPTargetExecutionDirective(DSAStack->getCurrentDirective()) &&
 1883           !DSAStack->isClauseParsingMode()) ||
 1884          DSAStack->hasDirective(
 1907       *DSAStack, CheckScopeInfo && DSAStack->isBodyComplete());
 1907       *DSAStack, CheckScopeInfo && DSAStack->isBodyComplete());
 1947   if (DSAStack->getCurrentDirective() != OMPD_unknown &&
 1948       (!DSAStack->isClauseParsingMode() ||
 1949        DSAStack->getParentDirective() != OMPD_unknown)) {
 1950     auto &&Info = DSAStack->isLoopControlVariable(D);
 1953          isImplicitOrExplicitTaskingRegion(DSAStack->getCurrentDirective())) ||
 1954         (VD && DSAStack->isForceVarCapturing()))
 1957         DSAStack->getTopDSA(D, DSAStack->isClauseParsingMode());
 1957         DSAStack->getTopDSA(D, DSAStack->isClauseParsingMode());
 1965     DVarPrivate = DSAStack->hasDSA(D, isOpenMPPrivate,
 1967                                    DSAStack->isClauseParsingMode());
 1969         (VD && DSAStack->getDefaultDSA() == DSA_none))
 1978   getOpenMPCaptureRegions(Regions, DSAStack->getDirective(Level));
 1984   if (isOpenMPLoopDirective(DSAStack->getCurrentDirective()))
 1985     DSAStack->loopInit();
 1990   if (isOpenMPLoopDirective(DSAStack->getCurrentDirective())) {
 1991     DSAStack->resetPossibleLoopCounter();
 1992     DSAStack->loopStart();
 1998   if (isOpenMPLoopDirective(DSAStack->getCurrentDirective())) {
 1999     if (DSAStack->getAssociatedLoops() > 0 &&
 2000         !DSAStack->isLoopStarted()) {
 2001       DSAStack->resetPossibleLoopCounter(D);
 2002       DSAStack->loopStart();
 2005     if ((DSAStack->getPossiblyLoopCunter() == D->getCanonicalDecl() ||
 2006          DSAStack->isLoopControlVariable(D).first) &&
 2007         !DSAStack->hasExplicitDSA(
 2009         !isOpenMPSimdDirective(DSAStack->getCurrentDirective()))
 2013     if (DSAStack->isThreadPrivate(const_cast<VarDecl *>(VD)) &&
 2014         DSAStack->isForceVarCapturing() &&
 2015         !DSAStack->hasExplicitDSA(
 2019   return DSAStack->hasExplicitDSA(
 2021          (DSAStack->isClauseParsingMode() &&
 2022           DSAStack->getClauseParsingMode() == OMPC_private) ||
 2025          (DSAStack->hasExplicitDirective(
 2028           DSAStack->isTaskgroupReductionRef(D, Level));
 2036   for (unsigned I = DSAStack->getNestingLevel() + 1; I > Level; --I) {
 2038     if (DSAStack->hasExplicitDSA(D,
 2048     if (DSAStack->checkMappableExprComponentListsForDeclAtLevel(
 2055     if (DSAStack->hasExplicitDirective(isOpenMPTargetExecutionDirective,
 2059           DSAStack->getDefaultDMAAtLevel(NewLevel) !=
 2076          DSAStack->hasExplicitDirective(isOpenMPTargetExecutionDirective,
 2080 void Sema::DestroyDataSharingAttributesStack() { delete DSAStack; }
 2133   DSAStack->push(DKind, DirName, CurScope, Loc);
 2139   DSAStack->setClauseParsingMode(K);
 2143   DSAStack->setClauseParsingMode(/*K=*/OMPC_unknown);
 2168               DSAStack->getTopDSA(VD, /*FromParent=*/false);
 2196       checkAllocateClauses(*this, DSAStack, D->clauses());
 2199   DSAStack->pop();
 2369       !DSAStack->isThreadPrivate(VD)) {
 2488     DSAStack->addDSA(VD, DE, OMPC_threadprivate);
 2607         !DSAStack->hasRequiresDeclWithClause<OMPDynamicAllocatorsClause>())
 2613       getAllocatorKind(*this, DSAStack, Allocator);
 2628     if (checkPreviousOMPAllocateAttribute(*this, DSAStack, RefExpr, VD,
 2674       DSAStack->addRequiresDecl(D);
 2686       DSAStack->getEncounteredTargetLocs();
 2703   if (!DSAStack->hasDuplicateRequiresClause(ClauseList))
 3108     ActOnCapturedRegionStart(DSAStack->getConstructLoc(), CurScope, CR_OpenMP,
 3136     ActOnCapturedRegionStart(DSAStack->getConstructLoc(), CurScope, CR_OpenMP,
 3148     ActOnCapturedRegionStart(DSAStack->getConstructLoc(), CurScope, CR_OpenMP,
 3157     ActOnCapturedRegionStart(DSAStack->getConstructLoc(), CurScope, CR_OpenMP,
 3181     ActOnCapturedRegionStart(DSAStack->getConstructLoc(), CurScope, CR_OpenMP,
 3189     ActOnCapturedRegionStart(DSAStack->getConstructLoc(), CurScope, CR_OpenMP,
 3211     ActOnCapturedRegionStart(DSAStack->getConstructLoc(), CurScope, CR_OpenMP,
 3234     ActOnCapturedRegionStart(DSAStack->getConstructLoc(), CurScope, CR_OpenMP,
 3279     ActOnCapturedRegionStart(DSAStack->getConstructLoc(), CurScope, CR_OpenMP,
 3308     ActOnCapturedRegionStart(DSAStack->getConstructLoc(), CurScope, CR_OpenMP,
 3329     ActOnCapturedRegionStart(DSAStack->getConstructLoc(), CurScope, CR_OpenMP,
 3351     ActOnCapturedRegionStart(DSAStack->getConstructLoc(), CurScope, CR_OpenMP,
 3376     ActOnCapturedRegionStart(DSAStack->getConstructLoc(), CurScope, CR_OpenMP,
 3388     ActOnCapturedRegionStart(DSAStack->getConstructLoc(), CurScope, CR_OpenMP,
 3397     ActOnCapturedRegionStart(DSAStack->getConstructLoc(), CurScope, CR_OpenMP,
 3409     ActOnCapturedRegionStart(DSAStack->getConstructLoc(), CurScope, CR_OpenMP,
 3426     ActOnCapturedRegionStart(DSAStack->getConstructLoc(), CurScope, CR_OpenMP,
 3438     ActOnCapturedRegionStart(DSAStack->getConstructLoc(), CurScope, CR_OpenMP,
 3463     ActOnCapturedRegionStart(DSAStack->getConstructLoc(), CurScope, CR_OpenMP,
 3495   return getOpenMPCaptureLevels(DSAStack->getDirective(Level));
 3598       (isOpenMPTargetExecutionDirective(DSAStack->getCurrentDirective()) ||
 3600            DSAStack->getCurrentDirective()))) {
 3606           DSAStack->isForceCaptureByReferenceInTargetExecutable();
 3607       DSAStack->setForceCaptureByReferenceInTargetExecutable(
 3628       DSAStack->setForceCaptureByReferenceInTargetExecutable(
 3638       *this, ErrorFound, DSAStack->getCurrentDirective());
 3645   getOpenMPCaptureRegions(CaptureRegions, DSAStack->getCurrentDirective());
 3652     if (isOpenMPTaskingDirective(DSAStack->getCurrentDirective()) &&
 3666       DSAStack->setForceVarCapturing(Clause->getClauseKind() == OMPC_copyin);
 3673       DSAStack->setForceVarCapturing(/*V=*/false);
 3712   if (isOpenMPWorksharingDirective(DSAStack->getCurrentDirective()) &&
 3713       isOpenMPSimdDirective(DSAStack->getCurrentDirective()) && OC &&
 3716         << getOpenMPDirectiveName(DSAStack->getCurrentDirective());
 3746       DSAStack->setBodyComplete();
 4241       checkNestingOfRegions(*this, DSAStack, Kind, DirName, CancelRegion,
 4253     DSAAttrChecker DSAChecker(DSAStack, *this, cast<CapturedStmt>(AStmt));
 4586   if (DSAStack->getDefaultDSA() == DSA_none) {
 4587     DSAAttrChecker DSAChecker(DSAStack, *this, nullptr);
 4593         if (isOpenMPTeamsDirective(DSAStack->getCurrentDirective()))
 4597         if (isOpenMPTeamsDirective(DSAStack->getCurrentDirective()) &&
 4608         if (isOpenMPParallelDirective(DSAStack->getCurrentDirective()))
 4680     Diag(DSAStack->getDefaultDSALocation(), diag::note_omp_default_dsa_none);
 4698       !(DSAStack->hasRequiresDeclWithClause<OMPUnifiedSharedMemoryClause>() ||
 4699         DSAStack->hasRequiresDeclWithClause<OMPUnifiedAddressClause>() ||
 4700         DSAStack->hasRequiresDeclWithClause<OMPReverseOffloadClause>() ||
 4701         DSAStack->hasRequiresDeclWithClause<OMPDynamicAllocatorsClause>())) {
 4703     DSAStack->addTargetDirLocation(StartLoc);
 5234                                       DSAStack->isCancelRegion());
 6468   unsigned AssociatedLoops = DSAStack->getAssociatedLoops();
 6470       isOpenMPLoopDirective(DSAStack->getCurrentDirective())) {
 6471     DSAStack->loopStart();
 6472     OpenMPIterationSpaceChecker ISC(*this, *DSAStack, ForLoc);
 6486         DSAStack->addLoopControlVariable(D, VD);
 6487         const Decl *LD = DSAStack->getPossiblyLoopCunter();
 6489           DSAStack->resetPossibleLoopCounter();
 6496         OpenMPDirectiveKind DKind = DSAStack->getCurrentDirective();
 6505             DSAStack->getTopDSA(D, /*FromParent=*/false);
 6511                 ? (DSAStack->hasMutipleLoops() ? OMPC_lastprivate : OMPC_linear)
 6530           reportOriginalDsa(*this, DSAStack, D, DVar,
 6538             DSAStack->addDSA(D, LoopDeclRefExpr, PredeterminedCKind,
 6543     DSAStack->setAssociatedLoops(AssociatedLoops - 1);
 7657       AStmt, *this, *DSAStack, VarsWithImplicitDSA, B);
 7670                                      DSAStack))
 7696       AStmt, *this, *DSAStack, VarsWithImplicitDSA, B);
 7709                                      DSAStack))
 7716                                  Clauses, AStmt, B, DSAStack->isCancelRegion());
 7731                       getOrderedNumberExpr(Clauses), AStmt, *this, *DSAStack,
 7745                                      DSAStack))
 7783           ->setHasCancel(DSAStack->isCancelRegion());
 7793                                       DSAStack->isCancelRegion());
 7805   DSAStack->setParentCancelRegion(DSAStack->isCancelRegion());
 7805   DSAStack->setParentCancelRegion(DSAStack->isCancelRegion());
 7808                                      DSAStack->isCancelRegion());
 7885   const auto Pair = DSAStack->getCriticalWithHint(DirName);
 7910     DSAStack->addCriticalWithHint(Dir, Hint);
 7933                       getOrderedNumberExpr(Clauses), AStmt, *this, *DSAStack,
 7947                                      DSAStack))
 7955                                          DSAStack->isCancelRegion());
 7977                       getOrderedNumberExpr(Clauses), AStmt, *this, *DSAStack,
 7988                                      DSAStack))
 8026           ->setHasCancel(DSAStack->isCancelRegion());
 8037       Context, StartLoc, EndLoc, Clauses, AStmt, DSAStack->isCancelRegion());
 8057                                   DSAStack->isCancelRegion());
 8088                                        DSAStack->getTaskgroupReductionRef());
 8140       isOpenMPSimdDirective(DSAStack->getParentDirective())) {
 8150   } else if (DependFound && !DSAStack->getParentOrderedRegionParam().first) {
 8155     if (const Expr *Param = DSAStack->getParentOrderedRegionParam().first) {
 8879   if (DSAStack->hasInnerTeamsRegion()) {
 8902       Diag(DSAStack->getInnerTeamsRegionLoc(),
 8975                       getOrderedNumberExpr(Clauses), CS, *this, *DSAStack,
 8989                                      DSAStack))
 8997                                                B, DSAStack->isCancelRegion());
 9160   DSAStack->setParentTeamsRegionLoc(StartLoc);
 9169   if (DSAStack->isParentNowaitRegion()) {
 9173   if (DSAStack->isParentOrderedRegion()) {
 9185   if (DSAStack->isParentNowaitRegion()) {
 9189   if (DSAStack->isParentOrderedRegion()) {
 9193   DSAStack->setParentCancelRegion(/*Cancel=*/true);
 9261                       /*OrderedLoopCountExpr=*/nullptr, AStmt, *this, *DSAStack,
 9297                       /*OrderedLoopCountExpr=*/nullptr, AStmt, *this, *DSAStack,
 9311                                      DSAStack))
 9346                       /*OrderedLoopCountExpr=*/nullptr, AStmt, *this, *DSAStack,
 9382                       /*OrderedLoopCountExpr=*/nullptr, AStmt, *this, *DSAStack,
 9396                                      DSAStack))
 9450       /*OrderedLoopCountExpr=*/nullptr, CS, *this, *DSAStack,
 9487                       *this, *DSAStack, VarsWithImplicitDSA, B);
 9529       nullptr /*ordered not a clause on distribute*/, CS, *this, *DSAStack,
 9540       DSAStack->isCancelRegion());
 9573       nullptr /*ordered not a clause on distribute*/, CS, *this, *DSAStack,
 9587                                      DSAStack))
 9630                       *DSAStack, VarsWithImplicitDSA, B);
 9643                                      DSAStack))
 9685       getOrderedNumberExpr(Clauses), CS, *this, *DSAStack,
 9699                                      DSAStack))
 9740                       getOrderedNumberExpr(Clauses), CS, *this, *DSAStack,
 9754                                      DSAStack))
 9797                       *DSAStack, VarsWithImplicitDSA, B);
 9806   DSAStack->setParentTeamsRegionLoc(StartLoc);
 9843       nullptr /*ordered not a clause on distribute*/, CS, *this, *DSAStack,
 9858                                      DSAStack))
 9868   DSAStack->setParentTeamsRegionLoc(StartLoc);
 9905       nullptr /*ordered not a clause on distribute*/, CS, *this, *DSAStack,
 9920                                      DSAStack))
 9930   DSAStack->setParentTeamsRegionLoc(StartLoc);
 9967       nullptr /*ordered not a clause on distribute*/, CS, *this, *DSAStack,
 9978   DSAStack->setParentTeamsRegionLoc(StartLoc);
 9982       DSAStack->isCancelRegion());
10046       nullptr /*ordered not a clause on distribute*/, CS, *this, *DSAStack,
10089       nullptr /*ordered not a clause on distribute*/, CS, *this, *DSAStack,
10103                                      DSAStack))
10111       DSAStack->isCancelRegion());
10146                       *DSAStack, VarsWithImplicitDSA, B);
10160                                      DSAStack))
10203       nullptr /*ordered not a clause on distribute*/, CS, *this, *DSAStack,
10217                                      DSAStack))
10990     OpenMPDirectiveKind DKind = DSAStack->getCurrentDirective();
11022     OpenMPDirectiveKind DKind = DSAStack->getCurrentDirective();
11133   OpenMPDirectiveKind DKind = DSAStack->getCurrentDirective();
11171   if (CKind == OMPC_collapse && DSAStack->getAssociatedLoops() == 1)
11172     DSAStack->setAssociatedLoops(Result.getExtValue());
11174     DSAStack->setAssociatedLoops(Result.getExtValue());
11253   if (!findOMPAllocatorHandleT(*this, A->getExprLoc(), DSAStack))
11260                                         DSAStack->getOMPAllocatorHandleT(),
11305       Context, NumForLoops, NumForLoops ? DSAStack->getAssociatedLoops() : 0,
11307   DSAStack->setOrderedRegion(/*IsOrdered=*/true, NumForLoops, Clause);
11431     DSAStack->setDefaultDSANone(KindKwLoc);
11434     DSAStack->setDefaultDSAShared(KindKwLoc);
11666                      DSAStack->getCurrentDirective(), OMPC_schedule) !=
11786   DSAStack->setNowaitRegion();
12060     DSAStackTy::DSAVarData DVar = DSAStack->getTopDSA(D, /*FromParent=*/false);
12064       reportOriginalDsa(*this, DSAStack, D, DVar);
12068     OpenMPDirectiveKind CurrDir = DSAStack->getCurrentDirective();
12095       if (DSAStack->checkMappableExprComponentListsForDecl(
12106         reportOriginalDsa(*this, DSAStack, D, DVar);
12134     DSAStack->addDSA(D, RefExpr->IgnoreParens(), OMPC_private, Ref);
12181   SourceLocation ImplicitClauseLoc = DSAStack->getConstructLoc();
12221           DSAStack->getTopDSA(D, /*FromParent=*/false);
12223       OpenMPDirectiveKind CurrDir = DSAStack->getCurrentDirective();
12239         reportOriginalDsa(*this, DSAStack, D, DVar);
12259         reportOriginalDsa(*this, DSAStack, D, DVar);
12282         DVar = DSAStack->getImplicitDSA(D, true);
12290           reportOriginalDsa(*this, DSAStack, D, DVar);
12306         DVar = DSAStack->hasInnermostDSA(
12320           reportOriginalDsa(*this, DSAStack, D, DVar);
12337         if (DSAStack->checkMappableExprComponentListsForDecl(
12348               << getOpenMPDirectiveName(DSAStack->getCurrentDirective());
12349           reportOriginalDsa(*this, DSAStack, D, DVar);
12357         isOpenMPTaskingDirective(DSAStack->getCurrentDirective())) {
12360           << getOpenMPDirectiveName(DSAStack->getCurrentDirective());
12433     DSAStack->addDSA(D, RefExpr->IgnoreParens(), OMPC_firstprivate, Ref);
12498     OpenMPDirectiveKind CurrDir = DSAStack->getCurrentDirective();
12507     DSAStackTy::DSAVarData DVar = DSAStack->getTopDSA(D, /*FromParent=*/false);
12515       reportOriginalDsa(*this, DSAStack, D, DVar);
12529       DVar = DSAStack->getImplicitDSA(D, true);
12534         reportOriginalDsa(*this, DSAStack, D, DVar);
12584             BuildBinOp(DSAStack->getCurScope(), ELoc, BO_Assign, SimpleRefExpr,
12592     DSAStack->addDSA(D, RefExpr->IgnoreParens(), OMPC_lastprivate, Ref);
12637     DSAStackTy::DSAVarData DVar = DSAStack->getTopDSA(D, /*FromParent=*/false);
12642       reportOriginalDsa(*this, DSAStack, D, DVar);
12649     DSAStack->addDSA(D, RefExpr->IgnoreParens(), OMPC_shared, Ref);
13689   if (actOnOMPReductionKindClause(*this, DSAStack, OMPC_reduction, VarList,
13709   if (actOnOMPReductionKindClause(*this, DSAStack, OMPC_task_reduction, VarList,
13729   if (actOnOMPReductionKindClause(*this, DSAStack, OMPC_in_reduction, VarList,
13828     DSAStackTy::DSAVarData DVar = DSAStack->getTopDSA(D, /*FromParent=*/false);
13832       reportOriginalDsa(*this, DSAStack, D, DVar);
13859               BuildBinOp(DSAStack->getCurScope(), ELoc, BO_Assign,
13876     DSAStack->addDSA(D, RefExpr->IgnoreParens(), OMPC_linear, Ref);
14072     if (const Expr *PrevRef = DSAStack->addUniqueAligned(D, SimpleRefExpr)) {
14152     if (!DSAStack->isThreadPrivate(VD)) {
14186     DSAStack->addDSA(VD, DE, OMPC_copyin);
14231     if (!VD || !DSAStack->isThreadPrivate(VD)) {
14233           DSAStack->getTopDSA(D, /*FromParent=*/false);
14239         reportOriginalDsa(*this, DSAStack, D, DVar);
14247         DVar = DSAStack->getImplicitDSA(D, false);
14252           reportOriginalDsa(*this, DSAStack, D, DVar);
14262           << getOpenMPDirectiveName(DSAStack->getCurrentDirective());
14287         DSAStack->getCurScope(), ELoc, BO_Assign, PseudoDstExpr, PseudoSrcExpr);
14328   if (DSAStack->getCurrentDirective() == OMPD_ordered &&
14334   if (DSAStack->getCurrentDirective() != OMPD_ordered &&
14350             DSAStack->getParentOrderedRegionParam().first) {
14366       if (DSAStack->getParentOrderedRegionParam().first &&
14431           DSAStack->getParentOrderedRegionParam().first &&
14432           DepCounter != DSAStack->isParentLoopControlVariable(D).first) {
14434             DSAStack->getParentLoopControlVariable(DepCounter.getZExtValue());
14471       DSAStack->getParentOrderedRegionParam().first &&
14472       DSAStack->getParentLoopControlVariable(VarList.size() + 1)) {
14474         << 1 << DSAStack->getParentLoopControlVariable(VarList.size() + 1);
14484       DSAStack->isParentOrderedRegion())
14485     DSAStack->addDoacrossDependClause(C, OpsOffs);
14501   OpenMPDirectiveKind DKind = DSAStack->getCurrentDirective();
15533   checkMappableExpressionList(*this, DSAStack, OMPC_map, MVLI, Locs.StartLoc,
15953   OpenMPDirectiveKind DKind = DSAStack->getCurrentDirective();
15980   OpenMPDirectiveKind DKind = DSAStack->getCurrentDirective();
16007           DSAStack->getCurrentDirective(), &CaptureRegion, &HelperValStmt))
16028           DSAStack->getCurrentDirective(), &CaptureRegion, &HelperValStmt))
16049           DSAStack->getCurrentDirective(), &CaptureRegion, &HelperValStmt))
16107                      DSAStack->getCurrentDirective(), OMPC_dist_schedule) !=
16146   DSAStack->setDefaultDMAToFromScalar(StartLoc);
16299     if (DSAStack->isThreadPrivate(VD)) {
16301       reportOriginalDsa(*this, DSAStack, VD, DSAStack->getTopDSA(VD, false));
16301       reportOriginalDsa(*this, DSAStack, VD, DSAStack->getTopDSA(VD, false));
16329         !checkValueDeclInTarget(SL, SR, *this, DSAStack, VD))
16356   checkMappableExpressionList(*this, DSAStack, OMPC_to, MVLI, Locs.StartLoc,
16373   checkMappableExpressionList(*this, DSAStack, OMPC_from, MVLI, Locs.StartLoc,
16451     DSAStack->addDSA(D, RefExpr->IgnoreParens(), OMPC_firstprivate, Ref);
16497     DSAStackTy::DSAVarData DVar = DSAStack->getTopDSA(D, /*FromParent=*/false);
16502           << getOpenMPDirectiveName(DSAStack->getCurrentDirective());
16503       reportOriginalDsa(*this, DSAStack, D, DVar);
16508     if (DSAStack->checkMappableExprComponentListsForDecl(
16525     DSAStack->addMappableExpressionComponents(
16557     if (!findOMPAllocatorHandleT(*this, Allocator->getExprLoc(), DSAStack))
16564                                              DSAStack->getOMPAllocatorHandleT(),
16577         !DSAStack->hasRequiresDeclWithClause<OMPDynamicAllocatorsClause>())