14 #ifndef LLVM_CLANG_AST_STMTOPENMP_H 15 #define LLVM_CLANG_AST_STMTOPENMP_H 42 const unsigned NumClauses;
44 const unsigned NumChildren;
49 const unsigned ClausesOffset;
54 reinterpret_cast<char *
>(
this) + ClausesOffset);
69 unsigned NumClauses,
unsigned NumChildren)
70 :
Stmt(SC), Kind(K), StartLoc(
std::move(StartLoc)),
71 EndLoc(
std::move(EndLoc)), NumClauses(NumClauses),
72 NumChildren(NumChildren),
93 :
public llvm::iterator_adaptor_base<
94 used_clauses_child_iterator, ArrayRef<OMPClause *>::iterator,
95 std::forward_iterator_tag, Stmt *, ptrdiff_t, Stmt *, Stmt *> {
100 if (ChildI != ChildEnd)
102 while (this->I != End) {
104 if (this->I != End) {
107 if (ChildI != ChildEnd)
117 if (this->I != End) {
128 if (ChildI != ChildEnd)
130 if (this->I != End) {
132 if (this->I != End) {
142 static llvm::iterator_range<used_clauses_child_iterator>
152 template <
typename SpecificClause>
154 :
public llvm::iterator_adaptor_base<
155 specific_clause_iterator<SpecificClause>,
156 ArrayRef<OMPClause *>::const_iterator, std::forward_iterator_tag,
157 const SpecificClause *, ptrdiff_t, const SpecificClause *,
158 const SpecificClause *> {
161 void SkipToNextClause() {
162 while (this->I != End && !isa<SpecificClause>(*this->I))
174 return cast<SpecificClause>(*this->I);
185 template <
typename SpecificClause>
186 static llvm::iterator_range<specific_clause_iterator<SpecificClause>>
190 llvm::makeArrayRef(Clauses.end(), 0))};
193 template <
typename SpecificClause>
194 llvm::iterator_range<specific_clause_iterator<SpecificClause>>
196 return getClausesOfKind<SpecificClause>(
clauses());
204 template <
typename SpecificClause>
206 auto Clauses = getClausesOfKind<SpecificClause>();
208 if (Clauses.begin() != Clauses.end()) {
209 assert(std::next(Clauses.begin()) == Clauses.end() &&
210 "There are at least 2 clauses of the specified kind");
211 return *Clauses.begin();
218 template <
typename SpecificClause>
220 auto Clauses = getClausesOfKind<SpecificClause>();
221 return Clauses.begin() != Clauses.end();
270 CaptureRegions.begin(), CaptureRegions.end(),
272 "RegionKind not found in OpenMP CaptureRegions.");
274 for (
auto ThisCaptureRegion : CaptureRegions) {
275 if (ThisCaptureRegion == RegionKind)
277 CS = cast<CapturedStmt>(CS->getCapturedStmt());
279 llvm_unreachable(
"Incorrect RegionKind specified for directive.");
285 "Must have associated statement.");
288 assert(!CaptureRegions.empty() &&
289 "At least one captured statement must be provided.");
292 CS = cast<CapturedStmt>(CS->getCapturedStmt());
304 return S->
getStmtClass() >= firstOMPExecutableDirectiveConstant &&
305 S->
getStmtClass() <= lastOMPExecutableDirectiveConstant;
311 Stmt **ChildStorage =
reinterpret_cast<Stmt **
>(getClauses().end());
314 return child_range(ChildStorage, ChildStorage + 1);
320 Stmt **ChildStorage =
reinterpret_cast<Stmt **
>(
343 return const_cast<Stmt *
>(
370 llvm::omp::OMPD_parallel, StartLoc, EndLoc,
385 void setHasCancel(
bool Has) { HasCancel = Has; }
423 unsigned CollapsedNum;
442 AssociatedStmtOffset = 0,
443 IterationVariableOffset = 1,
444 LastIterationOffset = 2,
445 CalcLastIterationOffset = 3,
446 PreConditionOffset = 4,
457 IsLastIterVariableOffset = 9,
458 LowerBoundVariableOffset = 10,
459 UpperBoundVariableOffset = 11,
460 StrideVariableOffset = 12,
461 EnsureUpperBoundOffset = 13,
462 NextLowerBoundOffset = 14,
463 NextUpperBoundOffset = 15,
464 NumIterationsOffset = 16,
467 PrevLowerBoundVariableOffset = 17,
468 PrevUpperBoundVariableOffset = 18,
470 PrevEnsureUpperBoundOffset = 20,
471 CombinedLowerBoundVariableOffset = 21,
472 CombinedUpperBoundVariableOffset = 22,
473 CombinedEnsureUpperBoundOffset = 23,
474 CombinedInitOffset = 24,
475 CombinedConditionOffset = 25,
476 CombinedNextLowerBoundOffset = 26,
477 CombinedNextUpperBoundOffset = 27,
478 CombinedDistConditionOffset = 28,
479 CombinedParForInDistConditionOffset = 29,
483 CombinedDistributeEnd = 30,
488 Expr **Storage =
reinterpret_cast<Expr **
>(
495 Expr **Storage =
reinterpret_cast<Expr **
>(&*std::next(
502 Expr **Storage =
reinterpret_cast<Expr **
>(
510 Expr **Storage =
reinterpret_cast<Expr **
>(
518 Expr **Storage =
reinterpret_cast<Expr **
>(
526 Expr **Storage =
reinterpret_cast<Expr **
>(
534 Expr **Storage =
reinterpret_cast<Expr **
>(
542 Expr **Storage =
reinterpret_cast<Expr **
>(
559 template <
typename T>
562 unsigned CollapsedNum,
unsigned NumClauses,
563 unsigned NumSpecialChildren = 0)
565 numLoopChildren(CollapsedNum, Kind) +
567 CollapsedNum(CollapsedNum) {}
572 return CombinedDistributeEnd;
575 return WorksharingEnd;
582 return getArraysOffset(Kind) +
589 *std::next(
child_begin(), IterationVariableOffset) = IV;
592 *std::next(
child_begin(), LastIterationOffset) = LI;
595 *std::next(
child_begin(), CalcLastIterationOffset) = CLI;
598 *std::next(
child_begin(), PreConditionOffset) = PC;
606 *std::next(
child_begin(), PreInitsOffset) = PreInits;
612 "expected worksharing loop directive");
613 *std::next(
child_begin(), IsLastIterVariableOffset) = IL;
619 "expected worksharing loop directive");
620 *std::next(
child_begin(), LowerBoundVariableOffset) = LB;
626 "expected worksharing loop directive");
627 *std::next(
child_begin(), UpperBoundVariableOffset) = UB;
633 "expected worksharing loop directive");
634 *std::next(
child_begin(), StrideVariableOffset) = ST;
640 "expected worksharing loop directive");
641 *std::next(
child_begin(), EnsureUpperBoundOffset) = EUB;
647 "expected worksharing loop directive");
648 *std::next(
child_begin(), NextLowerBoundOffset) = NLB;
654 "expected worksharing loop directive");
655 *std::next(
child_begin(), NextUpperBoundOffset) = NUB;
661 "expected worksharing loop directive");
662 *std::next(
child_begin(), NumIterationsOffset) = NI;
666 "expected loop bound sharing directive");
667 *std::next(
child_begin(), PrevLowerBoundVariableOffset) = PrevLB;
671 "expected loop bound sharing directive");
672 *std::next(
child_begin(), PrevUpperBoundVariableOffset) = PrevUB;
676 "expected loop bound sharing directive");
677 *std::next(
child_begin(), DistIncOffset) = DistInc;
681 "expected loop bound sharing directive");
682 *std::next(
child_begin(), PrevEnsureUpperBoundOffset) = PrevEUB;
686 "expected loop bound sharing directive");
687 *std::next(
child_begin(), CombinedLowerBoundVariableOffset) = CombLB;
691 "expected loop bound sharing directive");
692 *std::next(
child_begin(), CombinedUpperBoundVariableOffset) = CombUB;
696 "expected loop bound sharing directive");
697 *std::next(
child_begin(), CombinedEnsureUpperBoundOffset) = CombEUB;
701 "expected loop bound sharing directive");
702 *std::next(
child_begin(), CombinedInitOffset) = CombInit;
706 "expected loop bound sharing directive");
707 *std::next(
child_begin(), CombinedConditionOffset) = CombCond;
711 "expected loop bound sharing directive");
712 *std::next(
child_begin(), CombinedNextLowerBoundOffset) = CombNLB;
716 "expected loop bound sharing directive");
717 *std::next(
child_begin(), CombinedNextUpperBoundOffset) = CombNUB;
721 "expected loop bound distribute sharing directive");
722 *std::next(
child_begin(), CombinedDistConditionOffset) = CombDistCond;
726 "expected loop bound distribute sharing directive");
728 CombinedParForInDistConditionOffset) = CombParForInDistCond;
851 return IterationVarRef !=
nullptr && LastIteration !=
nullptr &&
852 NumIterations !=
nullptr && PreCond !=
nullptr &&
853 Cond !=
nullptr && Init !=
nullptr && Inc !=
nullptr;
861 IterationVarRef =
nullptr;
862 LastIteration =
nullptr;
863 CalcLastIteration =
nullptr;
875 NumIterations =
nullptr;
880 Counters.resize(Size);
881 PrivateCounters.resize(Size);
883 Updates.resize(Size);
885 DependentCounters.resize(Size);
886 DependentInits.resize(Size);
887 FinalsConditions.resize(Size);
888 for (
unsigned i = 0; i < Size; ++i) {
889 Counters[i] =
nullptr;
890 PrivateCounters[i] =
nullptr;
892 Updates[i] =
nullptr;
894 DependentCounters[i] =
nullptr;
895 DependentInits[i] =
nullptr;
896 FinalsConditions[i] =
nullptr;
899 DistCombinedFields.
LB =
nullptr;
900 DistCombinedFields.
UB =
nullptr;
901 DistCombinedFields.
EUB =
nullptr;
902 DistCombinedFields.
Init =
nullptr;
903 DistCombinedFields.
Cond =
nullptr;
904 DistCombinedFields.
NLB =
nullptr;
905 DistCombinedFields.
NUB =
nullptr;
906 DistCombinedFields.
DistCond =
nullptr;
915 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
916 *std::next(
child_begin(), IterationVariableOffset)));
919 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
923 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
924 *std::next(
child_begin(), CalcLastIterationOffset)));
927 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
931 return const_cast<Expr *
>(
932 reinterpret_cast<const Expr *
>(*std::next(
child_begin(), CondOffset)));
935 return const_cast<Expr *
>(
936 reinterpret_cast<const Expr *
>(*std::next(
child_begin(), InitOffset)));
939 return const_cast<Expr *
>(
950 "expected worksharing loop directive");
951 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
952 *std::next(
child_begin(), IsLastIterVariableOffset)));
958 "expected worksharing loop directive");
959 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
960 *std::next(
child_begin(), LowerBoundVariableOffset)));
966 "expected worksharing loop directive");
967 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
968 *std::next(
child_begin(), UpperBoundVariableOffset)));
974 "expected worksharing loop directive");
975 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
982 "expected worksharing loop directive");
983 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
984 *std::next(
child_begin(), EnsureUpperBoundOffset)));
990 "expected worksharing loop directive");
991 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
998 "expected worksharing loop directive");
999 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
1000 *std::next(
child_begin(), NextUpperBoundOffset)));
1006 "expected worksharing loop directive");
1007 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
1012 "expected loop bound sharing directive");
1013 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
1014 *std::next(
child_begin(), PrevLowerBoundVariableOffset)));
1018 "expected loop bound sharing directive");
1019 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
1020 *std::next(
child_begin(), PrevUpperBoundVariableOffset)));
1024 "expected loop bound sharing directive");
1025 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
1030 "expected loop bound sharing directive");
1031 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
1032 *std::next(
child_begin(), PrevEnsureUpperBoundOffset)));
1036 "expected loop bound sharing directive");
1037 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
1038 *std::next(
child_begin(), CombinedLowerBoundVariableOffset)));
1042 "expected loop bound sharing directive");
1043 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
1044 *std::next(
child_begin(), CombinedUpperBoundVariableOffset)));
1048 "expected loop bound sharing directive");
1049 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
1050 *std::next(
child_begin(), CombinedEnsureUpperBoundOffset)));
1054 "expected loop bound sharing directive");
1055 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
1060 "expected loop bound sharing directive");
1061 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
1062 *std::next(
child_begin(), CombinedConditionOffset)));
1066 "expected loop bound sharing directive");
1067 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
1068 *std::next(
child_begin(), CombinedNextLowerBoundOffset)));
1072 "expected loop bound sharing directive");
1073 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
1074 *std::next(
child_begin(), CombinedNextUpperBoundOffset)));
1078 "expected loop bound distribute sharing directive");
1079 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
1080 *std::next(
child_begin(), CombinedDistConditionOffset)));
1084 "expected loop bound distribute sharing directive");
1085 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
1086 *std::next(
child_begin(), CombinedParForInDistConditionOffset)));
1092 static Stmt *tryToFindNextInnerLoop(
Stmt *CurStmt,
1093 bool TryImperfectlyNestedLoops);
1095 bool TryImperfectlyNestedLoops) {
1096 return tryToFindNextInnerLoop(const_cast<Stmt *>(CurStmt),
1097 TryImperfectlyNestedLoops);
1157 T->
getStmtClass() == OMPParallelForSimdDirectiveClass ||
1160 T->
getStmtClass() == OMPMasterTaskLoopDirectiveClass ||
1161 T->
getStmtClass() == OMPMasterTaskLoopSimdDirectiveClass ||
1162 T->
getStmtClass() == OMPParallelMasterTaskLoopDirectiveClass ||
1163 T->
getStmtClass() == OMPParallelMasterTaskLoopSimdDirectiveClass ||
1165 T->
getStmtClass() == OMPTargetParallelForDirectiveClass ||
1166 T->
getStmtClass() == OMPDistributeParallelForDirectiveClass ||
1167 T->
getStmtClass() == OMPDistributeParallelForSimdDirectiveClass ||
1168 T->
getStmtClass() == OMPDistributeSimdDirectiveClass ||
1169 T->
getStmtClass() == OMPTargetParallelForSimdDirectiveClass ||
1171 T->
getStmtClass() == OMPTeamsDistributeDirectiveClass ||
1172 T->
getStmtClass() == OMPTeamsDistributeSimdDirectiveClass ||
1174 OMPTeamsDistributeParallelForSimdDirectiveClass ||
1175 T->
getStmtClass() == OMPTeamsDistributeParallelForDirectiveClass ||
1177 OMPTargetTeamsDistributeParallelForDirectiveClass ||
1179 OMPTargetTeamsDistributeParallelForSimdDirectiveClass ||
1180 T->
getStmtClass() == OMPTargetTeamsDistributeDirectiveClass ||
1181 T->
getStmtClass() == OMPTargetTeamsDistributeSimdDirectiveClass;
1204 unsigned CollapsedNum,
unsigned NumClauses)
1206 StartLoc, EndLoc, CollapsedNum, NumClauses) {}
1232 Stmt *AssociatedStmt,
1273 unsigned CollapsedNum,
unsigned NumClauses)
1275 StartLoc, EndLoc, CollapsedNum, NumClauses),
1290 void setHasCancel(
bool Has) { HasCancel = Has; }
1347 unsigned CollapsedNum,
unsigned NumClauses)
1349 llvm::omp::OMPD_for_simd, StartLoc, EndLoc,
1350 CollapsedNum, NumClauses) {}
1386 unsigned NumClauses,
1416 unsigned NumClauses)
1418 llvm::omp::OMPD_sections, StartLoc, EndLoc,
1433 void setHasCancel(
bool Has) { HasCancel = Has; }
1485 llvm::omp::OMPD_section, StartLoc, EndLoc, 0, 1),
1508 Stmt *AssociatedStmt,
bool HasCancel);
1544 unsigned NumClauses)
1546 llvm::omp::OMPD_single, StartLoc, EndLoc,
1600 llvm::omp::OMPD_master, StartLoc, EndLoc, 0, 1) {
1621 Stmt *AssociatedStmt);
1654 llvm::omp::OMPD_critical, StartLoc, EndLoc,
1729 unsigned CollapsedNum,
unsigned NumClauses)
1731 llvm::omp::OMPD_parallel_for, StartLoc, EndLoc,
1732 CollapsedNum, NumClauses),
1747 void setHasCancel(
bool Has) { HasCancel = Has; }
1774 unsigned NumClauses,
1775 unsigned CollapsedNum,
1782 return T->
getStmtClass() == OMPParallelForDirectiveClass;
1806 unsigned CollapsedNum,
unsigned NumClauses)
1808 llvm::omp::OMPD_parallel_for_simd, StartLoc, EndLoc,
1809 CollapsedNum, NumClauses) {}
1817 unsigned NumClauses)
1846 unsigned NumClauses,
1847 unsigned CollapsedNum,
1851 return T->
getStmtClass() == OMPParallelForSimdDirectiveClass;
1867 unsigned NumClauses)
1869 llvm::omp::OMPD_parallel_master, StartLoc,
1870 EndLoc, NumClauses, 1) {}
1874 llvm::omp::OMPD_parallel_master,
1901 return T->
getStmtClass() == OMPParallelMasterDirectiveClass;
1927 unsigned NumClauses)
1929 llvm::omp::OMPD_parallel_sections, StartLoc,
1930 EndLoc, NumClauses, 1),
1939 llvm::omp::OMPD_parallel_sections,
1945 void setHasCancel(
bool Has) { HasCancel = Has; }
1974 return T->
getStmtClass() == OMPParallelSectionsDirectiveClass;
1998 unsigned NumClauses)
2000 llvm::omp::OMPD_task, StartLoc, EndLoc,
2015 void setHasCancel(
bool Has) { HasCancel = Has; }
2030 Stmt *AssociatedStmt,
bool HasCancel);
2064 llvm::omp::OMPD_taskyield, StartLoc, EndLoc, 0,
2091 return T->
getStmtClass() == OMPTaskyieldDirectiveClass;
2110 llvm::omp::OMPD_barrier, StartLoc, EndLoc, 0,
2156 llvm::omp::OMPD_taskwait, StartLoc, EndLoc, 0,
2202 unsigned NumClauses)
2204 llvm::omp::OMPD_taskgroup, StartLoc, EndLoc,
2216 void setReductionRef(
Expr *RR) {
2233 Expr *ReductionRef);
2253 return T->
getStmtClass() == OMPTaskgroupDirectiveClass;
2276 unsigned NumClauses)
2278 llvm::omp::OMPD_flush, StartLoc, EndLoc,
2332 unsigned NumClauses)
2334 llvm::omp::OMPD_ordered, StartLoc, EndLoc,
2390 bool IsXLHSInRHSPart;
2399 bool IsPostfixUpdate;
2408 unsigned NumClauses)
2410 llvm::omp::OMPD_atomic, StartLoc, EndLoc,
2412 IsXLHSInRHSPart(
false), IsPostfixUpdate(
false) {}
2422 IsXLHSInRHSPart(
false), IsPostfixUpdate(
false) {}
2458 Expr *E,
Expr *UE,
bool IsXLHSInRHSPart,
bool IsPostfixUpdate);
2472 return cast_or_null<Expr>(*std::next(
child_begin()));
2478 return cast_or_null<Expr>(*std::next(
child_begin(), 2));
2481 return cast_or_null<Expr>(*std::next(
child_begin(), 2));
2493 return cast_or_null<Expr>(*std::next(
child_begin(), 3));
2498 return cast_or_null<Expr>(*std::next(
child_begin(), 4));
2523 unsigned NumClauses)
2525 llvm::omp::OMPD_target, StartLoc, EndLoc,
2582 unsigned NumClauses)
2584 llvm::omp::OMPD_target_data, StartLoc, EndLoc,
2618 return T->
getStmtClass() == OMPTargetDataDirectiveClass;
2640 unsigned NumClauses)
2642 llvm::omp::OMPD_target_enter_data, StartLoc,
2643 EndLoc, NumClauses, 1) {}
2651 llvm::omp::OMPD_target_enter_data,
2677 return T->
getStmtClass() == OMPTargetEnterDataDirectiveClass;
2699 unsigned NumClauses)
2701 llvm::omp::OMPD_target_exit_data, StartLoc,
2702 EndLoc, NumClauses, 1) {}
2710 llvm::omp::OMPD_target_exit_data,
2736 return T->
getStmtClass() == OMPTargetExitDataDirectiveClass;
2757 unsigned NumClauses)
2759 llvm::omp::OMPD_target_parallel, StartLoc,
2760 EndLoc, NumClauses, 1) {}
2768 llvm::omp::OMPD_target_parallel,
2795 return T->
getStmtClass() == OMPTargetParallelDirectiveClass;
2822 unsigned CollapsedNum,
unsigned NumClauses)
2824 llvm::omp::OMPD_target_parallel_for, StartLoc, EndLoc,
2825 CollapsedNum, NumClauses),
2834 unsigned NumClauses)
2841 void setHasCancel(
bool Has) { HasCancel = Has; }
2868 unsigned NumClauses,
2869 unsigned CollapsedNum,
2876 return T->
getStmtClass() == OMPTargetParallelForDirectiveClass;
2897 unsigned NumClauses)
2899 llvm::omp::OMPD_teams, StartLoc, EndLoc,
2923 Stmt *AssociatedStmt);
2956 llvm::omp::OMPD_cancellation_point, StartLoc,
2958 CancelRegion(
llvm::omp::OMPD_unknown) {}
2964 llvm::omp::OMPD_cancellation_point,
2966 CancelRegion(
llvm::omp::OMPD_unknown) {}
2994 return T->
getStmtClass() == OMPCancellationPointDirectiveClass;
3015 unsigned NumClauses)
3017 llvm::omp::OMPD_cancel, StartLoc, EndLoc,
3019 CancelRegion(
llvm::omp::OMPD_unknown) {}
3028 CancelRegion(
llvm::omp::OMPD_unknown) {}
3081 unsigned CollapsedNum,
unsigned NumClauses)
3083 llvm::omp::OMPD_taskloop, StartLoc, EndLoc,
3084 CollapsedNum, NumClauses) {}
3120 unsigned NumClauses,
3147 unsigned CollapsedNum,
unsigned NumClauses)
3149 llvm::omp::OMPD_taskloop_simd, StartLoc, EndLoc,
3150 CollapsedNum, NumClauses) {}
3186 unsigned NumClauses,
3187 unsigned CollapsedNum,
3191 return T->
getStmtClass() == OMPTaskLoopSimdDirectiveClass;
3214 unsigned CollapsedNum,
unsigned NumClauses)
3216 llvm::omp::OMPD_master_taskloop, StartLoc, EndLoc,
3217 CollapsedNum, NumClauses) {}
3225 unsigned NumClauses)
3254 unsigned NumClauses,
3255 unsigned CollapsedNum,
3259 return T->
getStmtClass() == OMPMasterTaskLoopDirectiveClass;
3282 unsigned CollapsedNum,
unsigned NumClauses)
3284 llvm::omp::OMPD_master_taskloop_simd, StartLoc, EndLoc,
3285 CollapsedNum, NumClauses) {}
3293 unsigned NumClauses)
3321 unsigned NumClauses,
3322 unsigned CollapsedNum,
3326 return T->
getStmtClass() == OMPMasterTaskLoopSimdDirectiveClass;
3351 unsigned CollapsedNum,
unsigned NumClauses)
3353 llvm::omp::OMPD_parallel_master_taskloop, StartLoc,
3354 EndLoc, CollapsedNum, NumClauses) {}
3362 unsigned NumClauses)
3364 llvm::omp::OMPD_parallel_master_taskloop,
3392 unsigned NumClauses,
3393 unsigned CollapsedNum,
3397 return T->
getStmtClass() == OMPParallelMasterTaskLoopDirectiveClass;
3422 unsigned CollapsedNum,
3423 unsigned NumClauses)
3425 llvm::omp::OMPD_parallel_master_taskloop_simd,
3426 StartLoc, EndLoc, CollapsedNum, NumClauses) {}
3434 unsigned NumClauses)
3436 llvm::omp::OMPD_parallel_master_taskloop_simd,
3468 return T->
getStmtClass() == OMPParallelMasterTaskLoopSimdDirectiveClass;
3491 unsigned CollapsedNum,
unsigned NumClauses)
3493 llvm::omp::OMPD_distribute, StartLoc, EndLoc,
3494 CollapsedNum, NumClauses) {}
3530 unsigned NumClauses,
3534 return T->
getStmtClass() == OMPDistributeDirectiveClass;
3556 unsigned NumClauses)
3558 llvm::omp::OMPD_target_update, StartLoc, EndLoc,
3593 return T->
getStmtClass() == OMPTargetUpdateDirectiveClass;
3609 bool HasCancel =
false;
3620 unsigned CollapsedNum,
unsigned NumClauses)
3622 llvm::omp::OMPD_distribute_parallel_for, StartLoc,
3623 EndLoc, CollapsedNum, NumClauses),
3632 unsigned NumClauses)
3634 llvm::omp::OMPD_distribute_parallel_for,
3640 void setHasCancel(
bool Has) { HasCancel = Has; }
3667 unsigned NumClauses,
3668 unsigned CollapsedNum,
3675 return T->
getStmtClass() == OMPDistributeParallelForDirectiveClass;
3700 unsigned CollapsedNum,
3701 unsigned NumClauses)
3703 llvm::omp::OMPD_distribute_parallel_for_simd, StartLoc,
3704 EndLoc, CollapsedNum, NumClauses) {}
3712 unsigned NumClauses)
3714 llvm::omp::OMPD_distribute_parallel_for_simd,
3741 const ASTContext &
C,
unsigned NumClauses,
unsigned CollapsedNum,
3745 return T->
getStmtClass() == OMPDistributeParallelForSimdDirectiveClass;
3768 unsigned CollapsedNum,
unsigned NumClauses)
3770 llvm::omp::OMPD_distribute_simd, StartLoc, EndLoc,
3771 CollapsedNum, NumClauses) {}
3779 unsigned NumClauses)
3807 unsigned NumClauses,
3808 unsigned CollapsedNum,
3812 return T->
getStmtClass() == OMPDistributeSimdDirectiveClass;
3837 unsigned CollapsedNum,
unsigned NumClauses)
3839 llvm::omp::OMPD_target_parallel_for_simd, StartLoc,
3840 EndLoc, CollapsedNum, NumClauses) {}
3848 unsigned NumClauses)
3850 llvm::omp::OMPD_target_parallel_for_simd,
3877 unsigned NumClauses,
3878 unsigned CollapsedNum,
3882 return T->
getStmtClass() == OMPTargetParallelForSimdDirectiveClass;
3906 unsigned CollapsedNum,
unsigned NumClauses)
3908 llvm::omp::OMPD_target_simd, StartLoc, EndLoc,
3909 CollapsedNum, NumClauses) {}
3944 unsigned NumClauses,
3945 unsigned CollapsedNum,
3949 return T->
getStmtClass() == OMPTargetSimdDirectiveClass;
3972 unsigned CollapsedNum,
unsigned NumClauses)
3974 llvm::omp::OMPD_teams_distribute, StartLoc, EndLoc,
3975 CollapsedNum, NumClauses) {}
3983 unsigned NumClauses)
4011 unsigned NumClauses,
4012 unsigned CollapsedNum,
4016 return T->
getStmtClass() == OMPTeamsDistributeDirectiveClass;
4041 unsigned NumClauses)
4043 llvm::omp::OMPD_teams_distribute_simd, StartLoc,
4044 EndLoc, CollapsedNum, NumClauses) {}
4052 unsigned NumClauses)
4054 llvm::omp::OMPD_teams_distribute_simd,
4082 unsigned NumClauses,
4083 unsigned CollapsedNum,
4087 return T->
getStmtClass() == OMPTeamsDistributeSimdDirectiveClass;
4113 unsigned CollapsedNum,
4114 unsigned NumClauses)
4116 llvm::omp::OMPD_teams_distribute_parallel_for_simd,
4117 StartLoc, EndLoc, CollapsedNum, NumClauses) {}
4125 unsigned NumClauses)
4127 llvm::omp::OMPD_teams_distribute_parallel_for_simd,
4158 return T->
getStmtClass() == OMPTeamsDistributeParallelForSimdDirectiveClass;
4174 bool HasCancel =
false;
4185 unsigned CollapsedNum,
4186 unsigned NumClauses)
4188 llvm::omp::OMPD_teams_distribute_parallel_for,
4189 StartLoc, EndLoc, CollapsedNum, NumClauses),
4198 unsigned NumClauses)
4200 llvm::omp::OMPD_teams_distribute_parallel_for,
4206 void setHasCancel(
bool Has) { HasCancel = Has; }
4239 return T->
getStmtClass() == OMPTeamsDistributeParallelForDirectiveClass;
4260 unsigned NumClauses)
4262 llvm::omp::OMPD_target_teams, StartLoc, EndLoc,
4287 Stmt *AssociatedStmt);
4298 return T->
getStmtClass() == OMPTargetTeamsDirectiveClass;
4322 unsigned CollapsedNum,
unsigned NumClauses)
4324 llvm::omp::OMPD_target_teams_distribute, StartLoc,
4325 EndLoc, CollapsedNum, NumClauses) {}
4333 unsigned NumClauses)
4335 llvm::omp::OMPD_target_teams_distribute,
4366 return T->
getStmtClass() == OMPTargetTeamsDistributeDirectiveClass;
4383 bool HasCancel =
false;
4394 unsigned CollapsedNum,
4395 unsigned NumClauses)
4397 OMPTargetTeamsDistributeParallelForDirectiveClass,
4398 llvm::omp::OMPD_target_teams_distribute_parallel_for,
4399 StartLoc, EndLoc, CollapsedNum, NumClauses),
4408 unsigned NumClauses)
4410 this, OMPTargetTeamsDistributeParallelForDirectiveClass,
4411 llvm::omp::OMPD_target_teams_distribute_parallel_for,
4416 void setHasCancel(
bool Has) { HasCancel = Has; }
4450 OMPTargetTeamsDistributeParallelForDirectiveClass;
4476 unsigned CollapsedNum,
4477 unsigned NumClauses)
4479 this, OMPTargetTeamsDistributeParallelForSimdDirectiveClass,
4480 llvm::omp::OMPD_target_teams_distribute_parallel_for_simd, StartLoc,
4481 EndLoc, CollapsedNum, NumClauses) {}
4489 unsigned CollapsedNum,
unsigned NumClauses)
4491 this, OMPTargetTeamsDistributeParallelForSimdDirectiveClass,
4492 llvm::omp::OMPD_target_teams_distribute_parallel_for_simd,
4523 OMPTargetTeamsDistributeParallelForSimdDirectiveClass;
4548 unsigned CollapsedNum,
4549 unsigned NumClauses)
4551 llvm::omp::OMPD_target_teams_distribute_simd, StartLoc,
4552 EndLoc, CollapsedNum, NumClauses) {}
4560 unsigned NumClauses)
4562 llvm::omp::OMPD_target_teams_distribute_simd,
4593 return T->
getStmtClass() == OMPTargetTeamsDistributeSimdDirectiveClass;
static bool classof(const Stmt *T)
void setPreInits(Stmt *PreInits)
void setCombinedParForInDistCond(Expr *CombParForInDistCond)
child_iterator child_begin()
Expr * NLB
Update of LowerBound for statically scheduled 'omp for' loops.
bool hasCancel() const
Return true if current directive has inner cancel directive.
static bool classof(const Stmt *T)
This represents '#pragma omp distribute simd' composite directive.
Expr * getNextUpperBound() const
SmallVector< Expr *, 4 > Finals
Final loop counter values for GodeGen.
This represents '#pragma omp master' directive.
Expr * NUB
Update of UpperBound for statically scheduled omp loops for outer loop in combined constructs (e...
SmallVector< Expr *, 4 > Updates
Expressions for loop counters update for CodeGen.
This represents '#pragma omp task' directive.
void setEnsureUpperBound(Expr *EUB)
static llvm::iterator_range< used_clauses_child_iterator > used_clauses_children(ArrayRef< OMPClause *> Clauses)
Expr * getUpperBoundVariable() const
static bool classof(const Stmt *T)
ArrayRef< Expr * > inits() const
ArrayRef< OMPClause * > clauses()
static bool classof(const Stmt *T)
OMPLoopDirective(const T *That, StmtClass SC, OpenMPDirectiveKind Kind, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, unsigned NumClauses, unsigned NumSpecialChildren=0)
Build instance of loop directive of class Kind.
ArrayRef< Expr * > dependent_counters()
void setCombinedCond(Expr *CombCond)
static bool classof(const Stmt *T)
Specialize PointerLikeTypeTraits to allow LazyGenerationalUpdatePtr to be placed into a PointerUnion...
static bool classof(const Stmt *T)
const Expr * getV() const
void setCombinedLowerBoundVariable(Expr *CombLB)
void setHasCancel(bool Has)
Set cancel state.
Stmt - This represents one statement.
void setLastIteration(Expr *LI)
Expr * getLowerBoundVariable() const
bool isStandaloneDirective() const
Returns whether or not this is a Standalone directive.
static bool classof(const Stmt *T)
Stmt * operator->() const
static bool classof(const Stmt *T)
This represents '#pragma omp for simd' directive.
Expr * EUB
EnsureUpperBound – expression UB = min(UB, NumIterations).
Expr * DistInc
DistInc - increment expression for distribute loop when found combined with a further loop level (e...
used_clauses_child_iterator & operator++()
This represents '#pragma omp teams distribute parallel for' composite directive.
SourceLocation getBeginLoc() const
Returns starting location of directive kind.
void setPrevEnsureUpperBound(Expr *PrevEUB)
This represents '#pragma omp parallel master' directive.
CapturedStmt * getInnermostCapturedStmt()
Get innermost captured statement for the construct.
void setUpperBoundVariable(Expr *UB)
void setNumIterations(Expr *NI)
This represents '#pragma omp target teams distribute' combined directive.
static bool classof(const Stmt *T)
void setNextLowerBound(Expr *NLB)
llvm::iterator_range< child_iterator > child_range
Expr * getCombinedParForInDistCond() const
This represents '#pragma omp parallel for' directive.
This represents '#pragma omp target teams distribute parallel for' combined directive.
Expr * getCombinedEnsureUpperBound() const
void setIsLastIterVariable(Expr *IL)
Expr * PrevLB
PreviousLowerBound - local variable passed to runtime in the enclosing schedule or null if that does ...
SourceLocation getEndLoc() const
Returns ending location of directive.
bool hasCancel() const
Return true if current directive has inner cancel directive.
This represents '#pragma omp target exit data' directive.
bool hasCancel() const
Return true if current directive has inner cancel directive.
ArrayRef< Expr * > dependent_inits()
const Stmt * getBody() const
Expr * getCombinedUpperBoundVariable() const
void setUpdates(ArrayRef< Expr *> UL)
Sets the list of update expressions for linear variables.
void setCombinedDistCond(Expr *CombDistCond)
Expr * getCalcLastIteration() const
ArrayRef< Expr * > dependent_counters() const
The expressions built to support OpenMP loops in combined/composite pragmas (e.g. ...
bool isXLHSInRHSPart() const
Return true if helper update expression has form 'OpaqueValueExpr(x) binop OpaqueValueExpr(expr)' and...
const Expr * getUpdateExpr() const
ArrayRef< Expr * > finals() const
Expr * LastIteration
Loop last iteration number.
static bool classof(const Stmt *T)
const Stmt * getStructuredBlock() const
Returns the AST node representing OpenMP structured-block of this OpenMP executable directive...
static bool classof(const Stmt *T)
This represents '#pragma omp parallel' directive.
static bool classof(const Stmt *T)
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
static bool classof(const Stmt *T)
static bool classof(const Stmt *T)
Expr * getEnsureUpperBound() const
const CapturedStmt * getCapturedStmt(OpenMPDirectiveKind RegionKind) const
Returns the captured statement associated with the component region within the (combined) directive...
ArrayRef< Expr * > updates()
This represents '#pragma omp target simd' directive.
static unsigned getArraysOffset(OpenMPDirectiveKind Kind)
Offset to the start of children expression arrays.
static bool classof(const Stmt *T)
Defines some OpenMP-specific enums and functions.
OpenMPDirectiveKind getDirectiveKind() const
This represents '#pragma omp barrier' directive.
This is a common base class for loop directives ('omp simd', 'omp for', 'omp for simd' etc...
This represents '#pragma omp critical' directive.
OpenMPDirectiveKind getCancelRegion() const
Get cancellation region for the current cancellation point.
static bool classof(const Stmt *T)
This represents '#pragma omp distribute parallel for' composite directive.
This represents '#pragma omp teams distribute parallel for simd' composite directive.
ArrayRef< Expr * > finals_conditions() const
ArrayRef< Expr * > finals()
Expr * getIsLastIterVariable() const
Expr * LB
DistributeLowerBound - used when composing 'omp distribute' with 'omp for' in a same construct...
Expr * EUB
DistributeEnsureUpperBound - used when composing 'omp distribute' with 'omp for' in a same construct...
Expr * getX()
Get 'x' part of the associated expression/statement.
Expr * getIterationVariable() const
bool hasCancel() const
Return true if current directive has inner cancel directive.
static bool classof(const Stmt *T)
used_clauses_child_iterator(ArrayRef< OMPClause *> Clauses)
static bool classof(const Stmt *T)
static bool classof(const Stmt *S)
This represents '#pragma omp cancellation point' directive.
const SpecificClause * operator*() const
static bool classof(const Stmt *T)
void setCombinedInit(Expr *CombInit)
MutableArrayRef< Expr * > getFinals()
Sets the list of final update expressions for linear variables.
This represents '#pragma omp teams' directive.
Expr * CalcLastIteration
Calculation of last iteration.
This represents '#pragma omp teams distribute simd' combined directive.
SmallVector< Expr *, 4 > FinalsConditions
List of final conditions required for the generation of the non-rectangular loops.
bool isOpenMPWorksharingDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a worksharing directive.
static bool classof(const Stmt *T)
static bool classof(const Stmt *T)
static bool classof(const Stmt *T)
llvm::omp::Directive OpenMPDirectiveKind
OpenMP directives.
static bool classof(const Stmt *T)
void setFinals(ArrayRef< Expr *> FL)
Sets the list of final update expressions for linear variables.
Expr * NUB
Update of UpperBound for statically scheduled 'omp for' loops.
Expr * Cond
Loop condition.
Expr * PreCond
Loop pre-condition.
This represents '#pragma omp target parallel for simd' directive.
ArrayRef< Expr * > private_counters()
The expressions built for the OpenMP loop CodeGen for the whole collapsed loop nest.
llvm::iterator_range< const_child_iterator > const_child_range
bool hasCancel() const
Return true if current directive has inner cancel directive.
static bool classof(const Stmt *T)
This represents '#pragma omp taskgroup' directive.
static const Stmt * tryToFindNextInnerLoop(const Stmt *CurStmt, bool TryImperfectlyNestedLoops)
child_range used_children()
Expr * getCombinedLowerBoundVariable() const
Expr * DistCond
Distribute Loop condition used when composing 'omp distribute' with 'omp for' in a same construct whe...
Expr * IterationVarRef
Loop iteration variable.
Expr * Init
Distribute loop iteration variable init used when composing 'omp distribute' with 'omp for' in a same...
ConstStmtIterator const_child_iterator
This represents '#pragma omp distribute' directive.
const Stmt * getAssociatedStmt() const
Returns statement associated with the directive.
bool hasCancel() const
Return true if current directive has inner cancel directive.
bool hasCancel() const
Return true if current directive has inner cancel directive.
static bool classof(const Stmt *T)
This represents one expression.
MutableArrayRef< Expr * > getUpdates()
Sets the list of update expressions for linear variables.
static unsigned numLoopChildren(unsigned CollapsedNum, OpenMPDirectiveKind Kind)
Children number.
SmallVector< Expr *, 4 > DependentInits
List of initializers required for the generation of the non-rectangular loops.
ArrayRef< OMPClause * > clauses() const
This represents '#pragma omp master taskloop' directive.
bool hasCancel() const
Return true if current directive has inner cancel directive.
This represents '#pragma omp target teams distribute parallel for simd' combined directive.
static bool classof(const Stmt *T)
static llvm::iterator_range< specific_clause_iterator< SpecificClause > > getClausesOfKind(ArrayRef< OMPClause *> Clauses)
static bool classof(const Stmt *T)
This represents '#pragma omp target teams distribute simd' combined directive.
bool builtAll()
Check if all the expressions are built (does not check the worksharing ones).
unsigned getNumClauses() const
Get number of clauses.
Expr * getDistInc() const
Expr * getNextLowerBound() const
Expr * PrevUB
PreviousUpperBound - local variable passed to runtime in the enclosing schedule or null if that does ...
Expr * getPrevEnsureUpperBound() const
This represents '#pragma omp for' directive.
static bool classof(const Stmt *T)
ArrayRef< Expr * > counters() const
static OMPLinearClause * CreateEmpty(const ASTContext &C, unsigned NumVars)
Creates an empty clause with the place for NumVars variables.
This represents '#pragma omp target teams' directive.
void setAssociatedStmt(Stmt *S)
Set the associated statement for the directive.
Expr * ParForInDistCond
'omp parallel for' loop condition used when composed with 'omp distribute' in the same construct and ...
bool isOpenMPTaskLoopDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a taskloop directive.
static bool classof(const Stmt *T)
StmtIterator child_iterator
Child Iterators: All subclasses must implement 'children' to permit easy iteration over the substatem...
This represents '#pragma omp cancel' directive.
void setDistInc(Expr *DistInc)
Expr * NLB
Update of LowerBound for statically scheduled omp loops for outer loop in combined constructs (e...
void setClauses(ArrayRef< OMPClause *> Clauses)
Sets the list of variables for this clause.
specific_clause_iterator & operator++()
static bool classof(const Stmt *T)
static bool classof(const Stmt *T)
This file defines OpenMP AST classes for clauses.
static bool classof(const Stmt *T)
This represents '#pragma omp flush' directive.
bool hasClausesOfKind() const
Returns true if the current directive has one or more clauses of a specific kind. ...
This represents '#pragma omp parallel for simd' directive.
Expr * NumIterations
Loop number of iterations.
void setLocStart(SourceLocation Loc)
Set starting location of directive kind.
Expr * ST
Stride - local variable passed to runtime.
This represents '#pragma omp parallel master taskloop' directive.
Expr * getLastIteration() const
const SpecificClause * getSingleClause() const
Gets a single clause of the specified kind associated with the current directive iff there is only on...
bool isPostfixUpdate() const
Return true if 'v' expression must be updated to original value of 'x', false if 'v' must be updated ...
This represents '#pragma omp target enter data' directive.
static bool classof(const Stmt *T)
SmallVector< Expr *, 4 > PrivateCounters
PrivateCounters Loop counters.
void setLowerBoundVariable(Expr *LB)
Expr * getStrideVariable() const
This represents '#pragma omp master taskloop simd' directive.
ArrayRef< Expr * > updates() const
Expr * getCombinedDistCond() const
const Stmt * getPreInits() const
static bool classof(const Stmt *T)
This captures a statement into a function.
SmallVector< Expr *, 4 > Counters
Counters Loop counters.
specific_clause_iterator(ArrayRef< OMPClause *> Clauses)
This represents '#pragma omp single' directive.
Encodes a location in the source.
void setPrevLowerBoundVariable(Expr *PrevLB)
void setIterationVariable(Expr *IV)
Stmt * getAssociatedStmt()
MutableArrayRef< Expr * > getInits()
This is a basic class for representing single OpenMP executable directive.
void setCombinedNextLowerBound(Expr *CombNLB)
OMPClause * getClause(unsigned i) const
Returns specified clause.
Stmt * getStructuredBlock()
Expr * getExpr()
Get 'expr' part of the associated expression/statement.
static bool classof(const Stmt *T)
static bool classof(const Stmt *T)
DeclarationNameInfo getDirectiveName() const
Return name of the directive.
static bool classof(const Stmt *T)
static bool classof(const Stmt *T)
This represents '#pragma omp taskwait' directive.
Expr * PrevEUB
PrevEUB - expression similar to EUB but to be used when loop scheduling uses PrevLB and PrevUB (e...
This is a basic class for representing single OpenMP clause.
bool isOpenMPLoopBoundSharingDirective(OpenMPDirectiveKind Kind)
Checks if the specified directive kind is one of the composite or combined directives that need loop ...
static bool classof(const Stmt *T)
llvm::iterator_range< specific_clause_iterator< SpecificClause > > getClausesOfKind() const
This represents '#pragma omp target' directive.
bool hasCancel() const
Return true if current directive has inner cancel directive.
Expr * getV()
Get 'v' part of the associated expression/statement.
static bool classof(const Stmt *T)
DistCombinedHelperExprs DistCombinedFields
Expressions used when combining OpenMP loop pragmas.
This represents '#pragma omp ordered' directive.
Expr * LB
LowerBound - local variable passed to runtime.
void clear(unsigned Size)
Initialize all the fields to null.
This represents '#pragma omp target update' directive.
Expr * Init
Loop iteration variable init.
This represents '#pragma omp parallel master taskloop simd' directive.
A placeholder type used to construct an empty shell of a type, that will be filled in later (e...
ArrayRef< Expr * > private_counters() const
ArrayRef< Expr * > finals_conditions()
void setPrevUpperBoundVariable(Expr *PrevUB)
void setCombinedEnsureUpperBound(Expr *CombEUB)
static bool classof(const Stmt *T)
Dataflow Directional Tag Classes.
Expr * getPrevUpperBoundVariable() const
const CapturedStmt * getInnermostCapturedStmt() const
SmallVector< Expr *, 4 > Inits
Expressions for loop counters inits for CodeGen.
static bool classof(const Stmt *T)
void setCombinedUpperBoundVariable(Expr *CombUB)
static bool classof(const Stmt *T)
This represents '#pragma omp section' directive.
SmallVector< Expr *, 4 > DependentCounters
List of counters required for the generation of the non-rectangular loops.
This represents '#pragma omp teams distribute' directive.
bool hasCancel() const
Return true if current directive has inner cancel directive.
This represents '#pragma omp simd' directive.
StmtClass getStmtClass() const
const Expr * getReductionRef() const
Returns reference to the task_reduction return variable.
Expr * getUpdateExpr()
Get helper expression of the form 'OpaqueValueExpr(x) binop OpaqueValueExpr(expr)' or 'OpaqueValueExp...
static bool classof(const Stmt *T)
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnd...
This represents '#pragma omp atomic' directive.
const_child_range children() const
Expr * getCombinedInit() const
unsigned getCollapsedNumber() const
Get number of collapsed loops.
Expr * getCombinedNextLowerBound() const
ArrayRef< Expr * > counters()
Expr * getCombinedNextUpperBound() const
Iterates over a filtered subrange of clauses applied to a directive.
void getOpenMPCaptureRegions(llvm::SmallVectorImpl< OpenMPDirectiveKind > &CaptureRegions, OpenMPDirectiveKind DKind)
Return the captured regions of an OpenMP directive.
bool isOpenMPDistributeDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a distribute directive.
static bool classof(const Stmt *T)
ArrayRef< Expr * > inits()
static bool classof(const Stmt *T)
Expr * Inc
Loop increment.
const Expr * getExpr() const
Expr * getNumIterations() const
bool hasAssociatedStmt() const
Returns true if directive has associated statement.
Expr * getPrevLowerBoundVariable() const
Iterates over expressions/statements used in the construct.
Expr * UB
DistributeUpperBound - used when composing 'omp distribute' with 'omp for' in a same construct...
X
Add a minimal nested name specifier fixit hint to allow lookup of a tag name from an outer enclosing ...
Expr * UB
UpperBound - local variable passed to runtime.
Defines the clang::SourceLocation class and associated facilities.
static bool classof(const Stmt *T)
This represents '#pragma omp target parallel' directive.
void setStrideVariable(Expr *ST)
static bool classof(const Stmt *T)
Expr * getCombinedCond() const
ArrayRef< Expr * > dependent_inits() const
static bool classof(const Stmt *T)
This represents '#pragma omp taskloop simd' directive.
static bool classof(const Stmt *T)
Expr * getPreCond() const
void setPreCond(Expr *PC)
OMPExecutableDirective(const T *, StmtClass SC, OpenMPDirectiveKind K, SourceLocation StartLoc, SourceLocation EndLoc, unsigned NumClauses, unsigned NumChildren)
Build instance of directive of class K.
This represents '#pragma omp sections' directive.
Expr * Cond
Distribute Loop condition used when composing 'omp distribute' with 'omp for' in a same construct...
Stmt * PreInits
Init statement for all captured expressions.
void setInits(ArrayRef< Expr *> IL)
Sets the list of the initial values for linear variables.
This represents '#pragma omp target data' directive.
OpenMPDirectiveKind getCancelRegion() const
Get cancellation region for the current cancellation point.
void setNextUpperBound(Expr *NUB)
static bool classof(const Stmt *T)
const Expr * getX() const
Expr * IL
IsLastIteration - local flag variable passed to runtime.
This represents '#pragma omp taskyield' directive.
This represents '#pragma omp distribute parallel for simd' composite directive.
const SpecificClause * operator->() const
This represents '#pragma omp parallel sections' directive.
void setCalcLastIteration(Expr *CLI)
void setCombinedNextUpperBound(Expr *CombNUB)
bool hasCancel() const
Return true if current directive has inner cancel directive.
void setLocEnd(SourceLocation Loc)
Set ending location of directive.
static bool classof(const Stmt *T)
This represents '#pragma omp target parallel for' directive.
static OMPLinearClause * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, OpenMPLinearClauseKind Modifier, SourceLocation ModifierLoc, SourceLocation ColonLoc, SourceLocation EndLoc, ArrayRef< Expr *> VL, ArrayRef< Expr *> PL, ArrayRef< Expr *> IL, Expr *Step, Expr *CalcStep, Stmt *PreInit, Expr *PostUpdate)
Creates clause with a list of variables VL and a linear step Step.
static bool classof(const Stmt *T)
This represents '#pragma omp taskloop' directive.