Lines Matching refs:Stack

163   SmallVector<std::pair<StackTy, const FunctionScopeInfo *>, 4> Stack;  member in __anon45dbc4930111::DSAStackTy
182 return Stack.empty() || in isStackEmpty()
183 Stack.back().second != CurrentNonCapturingFunctionScope || in isStackEmpty()
184 Stack.back().first.empty(); in isStackEmpty()
212 if (Stack.empty() || in push()
213 Stack.back().second != CurrentNonCapturingFunctionScope) in push()
214 Stack.emplace_back(StackTy(), CurrentNonCapturingFunctionScope); in push()
215 Stack.back().first.emplace_back(DKind, DirName, CurScope, Loc); in push()
216 Stack.back().first.back().DefaultAttrLoc = Loc; in push()
220 assert(!Stack.back().first.empty() && in pop()
222 Stack.back().first.pop_back(); in pop()
229 Stack.back().first.back().LoopStart = true; in loopInit()
235 Stack.back().first.back().LoopStart = false; in loopStart()
241 return !Stack.back().first.back().LoopStart; in isLoopStarted()
245 Stack.back().first.back().PossiblyLoopCounter = in resetPossibleLoopCounter()
250 return Stack.back().first.back().PossiblyLoopCounter; in getPossiblyLoopCunter()
260 if (!Stack.empty() && Stack.back().second == OldFSI) { in popFunction()
261 assert(Stack.back().first.empty()); in popFunction()
262 Stack.pop_back(); in popFunction()
330 assert(Stack.back().first.back().Directive == OMPD_taskgroup && in getTaskgroupReductionRef()
333 return Stack.back().first.back().TaskgroupReductionRef; in getTaskgroupReductionRef()
338 return Stack.back().first[Level].TaskgroupReductionRef && in isTaskgroupReductionRef()
339 cast<DeclRefExpr>(Stack.back().first[Level].TaskgroupReductionRef) in isTaskgroupReductionRef()
385 return isStackEmpty() ? OMPD_unknown : Stack.back().first.back().Directive; in getCurrentDirective()
390 return Stack.back().first[Level].Directive; in getDirective()
394 if (isStackEmpty() || Stack.back().first.size() == 1) in getParentDirective()
396 return std::next(Stack.back().first.rbegin())->Directive; in getParentDirective()
429 Stack.back().first.back().DefaultAttr = DSA_none; in setDefaultDSANone()
430 Stack.back().first.back().DefaultAttrLoc = Loc; in setDefaultDSANone()
435 Stack.back().first.back().DefaultAttr = DSA_shared; in setDefaultDSAShared()
436 Stack.back().first.back().DefaultAttrLoc = Loc; in setDefaultDSAShared()
441 Stack.back().first.back().DefaultMapAttr = DMA_tofrom_scalar; in setDefaultDMAToFromScalar()
442 Stack.back().first.back().DefaultMapAttrLoc = Loc; in setDefaultDMAToFromScalar()
447 : Stack.back().first.back().DefaultAttr; in getDefaultDSA()
451 : Stack.back().first.back().DefaultAttrLoc; in getDefaultDSALocation()
455 : Stack.back().first.back().DefaultMapAttr; in getDefaultDMA()
458 return Stack.back().first[Level].DefaultMapAttr; in getDefaultDMAAtLevel()
462 : Stack.back().first.back().DefaultMapAttrLoc; in getDefaultDMALocation()
476 Stack.back().first.back().OrderedRegion.emplace(Param, Clause); in setOrderedRegion()
478 Stack.back().first.back().OrderedRegion.reset(); in setOrderedRegion()
485 return Stack.back().first.rbegin()->OrderedRegion.hasValue(); in isOrderedRegion()
490 !Stack.back().first.rbegin()->OrderedRegion.hasValue()) in getOrderedRegionParam()
492 return Stack.back().first.rbegin()->OrderedRegion.getValue(); in getOrderedRegionParam()
497 if (isStackEmpty() || Stack.back().first.size() == 1) in isParentOrderedRegion()
499 return std::next(Stack.back().first.rbegin())->OrderedRegion.hasValue(); in isParentOrderedRegion()
504 if (isStackEmpty() || Stack.back().first.size() == 1 || in getParentOrderedRegionParam()
505 !std::next(Stack.back().first.rbegin())->OrderedRegion.hasValue()) in getParentOrderedRegionParam()
507 return std::next(Stack.back().first.rbegin())->OrderedRegion.getValue(); in getParentOrderedRegionParam()
512 Stack.back().first.back().NowaitRegion = IsNowait; in setNowaitRegion()
517 if (isStackEmpty() || Stack.back().first.size() == 1) in isParentNowaitRegion()
519 return std::next(Stack.back().first.rbegin())->NowaitRegion; in isParentNowaitRegion()
523 if (!isStackEmpty() && Stack.back().first.size() > 1) { in setParentCancelRegion()
524 auto &StackElemRef = *std::next(Stack.back().first.rbegin()); in setParentCancelRegion()
530 return isStackEmpty() ? false : Stack.back().first.back().CancelRegion; in isCancelRegion()
536 Stack.back().first.back().AssociatedLoops = Val; in setAssociatedLoops()
540 return isStackEmpty() ? 0 : Stack.back().first.back().AssociatedLoops; in getAssociatedLoops()
546 if (!isStackEmpty() && Stack.back().first.size() > 1) { in setParentTeamsRegionLoc()
547 std::next(Stack.back().first.rbegin())->InnerTeamsRegionLoc = in setParentTeamsRegionLoc()
558 : Stack.back().first.back().InnerTeamsRegionLoc; in getInnerTeamsRegionLoc()
562 return isStackEmpty() ? nullptr : Stack.back().first.back().CurScope; in getCurScope()
566 : Stack.back().first.back().ConstructLoc; in getConstructLoc()
579 auto SI = Stack.back().first.rbegin(); in checkMappableExprComponentListsForDecl()
580 auto SE = Stack.back().first.rend(); in checkMappableExprComponentListsForDecl()
612 auto StartI = Stack.back().first.begin(); in checkMappableExprComponentListsForDeclAtLevel()
613 auto EndI = Stack.back().first.end(); in checkMappableExprComponentListsForDeclAtLevel()
636 Stack.back().first.back().MappedExprComponents[VD]; in addMappableExpressionComponents()
645 return Stack.back().first.size() - 1; in getNestingLevel()
649 assert(!isStackEmpty() && Stack.back().first.size() > 1); in addDoacrossDependClause()
650 SharingMapTy &StackElem = *std::next(Stack.back().first.rbegin()); in addDoacrossDependClause()
657 const SharingMapTy &StackElem = Stack.back().first.back(); in getDoacrossDependClauses()
668 SharingMapTy &StackElem = Stack.back().first.back(); in addMappedClassesQualTypes()
674 const SharingMapTy &StackElem = Stack.back().first.back(); in isClassPreviouslyMapped()
737 if (isStackEmpty() || Iter == Stack.back().first.rend()) { in getDSA()
812 iterator I = Iter, E = Stack.back().first.rend(); in getDSA()
844 SharingMapTy &StackElem = Stack.back().first.back(); in addUniqueAligned()
858 SharingMapTy &StackElem = Stack.back().first.back(); in addLoopControlVariable()
867 const SharingMapTy &StackElem = Stack.back().first.back(); in isLoopControlVariable()
876 assert(!isStackEmpty() && Stack.back().first.size() > 1 && in isParentLoopControlVariable()
879 const SharingMapTy &StackElem = *std::next(Stack.back().first.rbegin()); in isParentLoopControlVariable()
887 assert(!isStackEmpty() && Stack.back().first.size() > 1 && in getParentLoopControlVariable()
889 const SharingMapTy &StackElem = *std::next(Stack.back().first.rbegin()); in getParentLoopControlVariable()
908 DSAInfo &Data = Stack.back().first.back().SharingMap[D]; in addDSA()
924 Stack.back().first.back().SharingMap[PrivateCopy->getDecl()]; in addDSA()
969 Stack.back().first.back().SharingMap[D].Attributes == OMPC_reduction && in addTaskgroupReductionData()
971 ReductionData &ReductionData = Stack.back().first.back().ReductionMap[D]; in addTaskgroupReductionData()
973 Stack.back().first.back().Directive == OMPD_taskgroup && in addTaskgroupReductionData()
978 Stack.back().first.back().TaskgroupReductionRef; in addTaskgroupReductionData()
992 Stack.back().first.back().SharingMap[D].Attributes == OMPC_reduction && in addTaskgroupReductionData()
994 ReductionData &ReductionData = Stack.back().first.back().ReductionMap[D]; in addTaskgroupReductionData()
996 Stack.back().first.back().Directive == OMPD_taskgroup && in addTaskgroupReductionData()
1001 Stack.back().first.back().TaskgroupReductionRef; in addTaskgroupReductionData()
1015 if (Stack.back().first.empty()) in getTopMostTaskgroupReductionData()
1017 for (iterator I = std::next(Stack.back().first.rbegin(), 1), in getTopMostTaskgroupReductionData()
1018 E = Stack.back().first.rend(); in getTopMostTaskgroupReductionData()
1044 if (Stack.back().first.empty()) in getTopMostTaskgroupReductionData()
1046 for (iterator I = std::next(Stack.back().first.rbegin(), 1), in getTopMostTaskgroupReductionData()
1047 E = Stack.back().first.rend(); in getTopMostTaskgroupReductionData()
1071 iterator I = Iter, E = Stack.back().first.rend(); in isOpenMPLocal()
1171 std::find_if(Stack.back().first.rbegin(), Stack.back().first.rend(), in getTopDSA()
1175 if (IterTarget != Stack.back().first.rend()) { in getTopDSA()
1177 for (iterator Iter = Stack.back().first.rbegin(); in getTopDSA()
1187 if (!isClauseParsingMode() || IterTarget != Stack.back().first.rbegin()) { in getTopDSA()
1195 iterator End = Stack.back().first.rend(); in getTopDSA()
1255 iterator I = Stack.back().first.rbegin(); in getTopDSA()
1256 iterator EndI = Stack.back().first.rend(); in getTopDSA()
1279 iterator StartI = Stack.back().first.rbegin(); in getImplicitDSA()
1280 iterator EndI = Stack.back().first.rend(); in getImplicitDSA()
1294 iterator I = Stack.back().first.rbegin(); in hasDSA()
1295 iterator EndI = Stack.back().first.rend(); in hasDSA()
1316 iterator StartI = Stack.back().first.rbegin(); in hasInnermostDSA()
1317 iterator EndI = Stack.back().first.rend(); in hasInnermostDSA()
1333 auto StartI = Stack.back().first.begin(); in hasExplicitDSA()
1334 auto EndI = Stack.back().first.end(); in hasExplicitDSA()
1356 auto StartI = Stack.back().first.begin(); in hasExplicitDirective()
1357 auto EndI = Stack.back().first.end(); in hasExplicitDirective()
1372 auto StartI = std::next(Stack.back().first.rbegin()); in hasDirective()
1373 auto EndI = Stack.back().first.rend(); in hasDirective()
1821 Scope *S, DSAStackTy *Stack);
2129 static void reportOriginalDsa(Sema &SemaRef, const DSAStackTy *Stack, in reportOriginalDsa() argument
2179 << getOpenMPDirectiveName(Stack->getCurrentDirective()); in reportOriginalDsa()
2188 DSAStackTy *Stack; member in __anon45dbc4931311::DSAAttrChecker
2208 if (isOpenMPTargetExecutionDirective(Stack->getCurrentDirective()) && in VisitSubCaptures()
2209 Stack->checkMappableExprComponentListsForDecl( in VisitSubCaptures()
2232 DSAStackTy::DSAVarData DVar = Stack->getTopDSA(VD, /*FromParent=*/false); in VisitDeclRefExpr()
2245 OpenMPDirectiveKind DKind = Stack->getCurrentDirective(); in VisitDeclRefExpr()
2250 if (DVar.CKind == OMPC_unknown && Stack->getDefaultDSA() == DSA_none && in VisitDeclRefExpr()
2258 !Stack->isLoopControlVariable(VD).first) { in VisitDeclRefExpr()
2259 if (!Stack->checkMappableExprComponentListsForDecl( in VisitDeclRefExpr()
2288 Stack->getDefaultDMA() != DMA_tofrom_scalar && !Res); in VisitDeclRefExpr()
2301 DVar = Stack->hasInnermostDSA( in VisitDeclRefExpr()
2311 reportOriginalDsa(SemaRef, Stack, VD, DVar); in VisitDeclRefExpr()
2316 DVar = Stack->getImplicitDSA(VD, /*FromParent=*/false); in VisitDeclRefExpr()
2318 !Stack->isLoopControlVariable(VD).first) in VisitDeclRefExpr()
2327 OpenMPDirectiveKind DKind = Stack->getCurrentDirective(); in VisitMemberExpr()
2331 DSAStackTy::DSAVarData DVar = Stack->getTopDSA(FD, /*FromParent=*/false); in VisitMemberExpr()
2338 !Stack->isLoopControlVariable(FD).first && in VisitMemberExpr()
2339 !Stack->checkMappableExprComponentListsForDecl( in VisitMemberExpr()
2358 if (Stack->isClassPreviouslyMapped(TE->getType())) in VisitMemberExpr()
2370 DVar = Stack->hasInnermostDSA( in VisitMemberExpr()
2380 reportOriginalDsa(SemaRef, Stack, FD, DVar); in VisitMemberExpr()
2385 DVar = Stack->getImplicitDSA(FD, /*FromParent=*/false); in VisitMemberExpr()
2387 !Stack->isLoopControlVariable(FD).first) { in VisitMemberExpr()
2404 if (!Stack->checkMappableExprComponentListsForDecl( in VisitMemberExpr()
2477 : Stack(S), SemaRef(SemaRef), ErrorFound(false), CS(CS) {} in DSAAttrChecker()
3049 static bool checkNestingOfRegions(Sema &SemaRef, const DSAStackTy *Stack, in checkNestingOfRegions() argument
3054 if (Stack->getCurScope()) { in checkNestingOfRegions()
3055 OpenMPDirectiveKind ParentRegion = Stack->getParentDirective(); in checkNestingOfRegions()
3149 bool DeadLock = Stack->hasDirective( in checkNestingOfRegions()
3202 Stack->isParentOrderedRegion()); in checkNestingOfRegions()
3240 NestingProhibited = Stack->hasDirective( in checkNestingOfRegions()
10450 DSAStackTy *Stack; member in __anon45dbc4933011::DSARefChecker
10455 DSAStackTy::DSAVarData DVar = Stack->getTopDSA(VD, /*FromParent=*/false); in VisitDeclRefExpr()
10460 DSAStackTy::DSAVarData DVarPrivate = Stack->hasDSA( in VisitDeclRefExpr()
10474 explicit DSARefChecker(DSAStackTy *S) : Stack(S) {} in DSARefChecker()
10832 Sema &S, DSAStackTy *Stack, OpenMPClauseKind ClauseKind, in actOnOMPReductionKindClause() argument
10952 S, ELoc, ERange, Stack->getCurScope(), ReductionIdScopeSpec, in actOnOMPReductionKindClause()
10998 OpenMPDirectiveKind CurrDir = Stack->getCurrentDirective(); in actOnOMPReductionKindClause()
11006 DSARefChecker Check(Stack); in actOnOMPReductionKindClause()
11027 DSAStackTy::DSAVarData DVar = Stack->getTopDSA(D, /*FromParent=*/false); in actOnOMPReductionKindClause()
11039 reportOriginalDsa(S, Stack, D, DVar); in actOnOMPReductionKindClause()
11050 DVar = Stack->getImplicitDSA(D, true); in actOnOMPReductionKindClause()
11055 reportOriginalDsa(S, Stack, D, DVar); in actOnOMPReductionKindClause()
11065 S, ELoc, ERange, Stack->getCurScope(), ReductionIdScopeSpec, in actOnOMPReductionKindClause()
11334 Stack->getCurScope(), ReductionId.getBeginLoc(), BOK, LHSDRE, RHSDRE); in actOnOMPReductionKindClause()
11338 S.BuildBinOp(Stack->getCurScope(), ReductionId.getBeginLoc(), in actOnOMPReductionKindClause()
11345 S.BuildBinOp(Stack->getCurScope(), ReductionId.getBeginLoc(), in actOnOMPReductionKindClause()
11368 Stack->getTopMostTaskgroupReductionData(D, ParentSR, ParentBOK, in actOnOMPReductionKindClause()
11371 Stack->getTopMostTaskgroupReductionData( in actOnOMPReductionKindClause()
11425 S.BuildBinOp(Stack->getCurScope(), ELoc, BO_Assign, SimpleRefExpr, in actOnOMPReductionKindClause()
11429 if (isOpenMPTaskingDirective(Stack->getCurrentDirective()) || in actOnOMPReductionKindClause()
11430 Stack->getCurrentDirective() == OMPD_taskgroup) { in actOnOMPReductionKindClause()
11443 Stack->addDSA(D, RefExpr->IgnoreParens(), OMPC_reduction, Ref); in actOnOMPReductionKindClause()
11446 Stack->addTaskgroupReductionData(D, ReductionIdRange, in actOnOMPReductionKindClause()
11449 Stack->addTaskgroupReductionData(D, ReductionIdRange, BOK); in actOnOMPReductionKindClause()
11704 Scope *S, DSAStackTy *Stack) { in FinishOpenMPLinearClause() argument
11732 auto &&Info = Stack->isLoopControlVariable(D); in FinishOpenMPLinearClause()
11736 if (isOpenMPDistributeDirective(Stack->getCurrentDirective()) && in FinishOpenMPLinearClause()
11737 isOpenMPSimdDirective(Stack->getCurrentDirective()) && !Info.first) { in FinishOpenMPLinearClause()
12278 DSAStackTy *Stack, QualType QTy, in checkTypeMappable() argument
13672 Sema &SemaRef, DSAStackTy *Stack, in checkValueDeclInTarget() argument
13675 checkTypeMappable(SL, SR, SemaRef, Stack, VD->getType(), in checkValueDeclInTarget()