17using namespace llvm::omp;
19size_t OMPChildren::size(
unsigned NumClauses,
bool HasAssociatedStmt,
20 unsigned NumChildren) {
22 totalSizeToAlloc<OMPClause *, Stmt *>(
23 NumClauses, NumChildren + (HasAssociatedStmt ? 1 : 0)),
28 assert(Clauses.size() == NumClauses &&
29 "Number of clauses is not the same as the preallocated buffer");
30 llvm::copy(Clauses, getTrailingObjects<OMPClause *>());
34 return getTrailingObjects<Stmt *>(NumChildren);
38 auto *
Data = CreateEmpty(Mem, Clauses.size());
39 Data->setClauses(Clauses);
44 Stmt *S,
unsigned NumChildren) {
45 auto *
Data = CreateEmpty(Mem, Clauses.size(), S, NumChildren);
46 Data->setClauses(Clauses);
48 Data->setAssociatedStmt(S);
52OMPChildren *OMPChildren::CreateEmpty(
void *Mem,
unsigned NumClauses,
53 bool HasAssociatedStmt,
54 unsigned NumChildren) {
55 return new (Mem)
OMPChildren(NumClauses, NumChildren, HasAssociatedStmt);
62 if (isa<OMPTargetEnterDataDirective>(
this) ||
63 isa<OMPTargetExitDataDirective>(
this) ||
64 isa<OMPTargetUpdateDirective>(
this))
71 "Standalone Executable Directives don't have Structured Blocks.");
72 if (
auto *LD = dyn_cast<OMPLoopDirective>(
this))
79 bool TryImperfectlyNestedLoops) {
80 Stmt *OrigStmt = CurStmt;
83 if (TryImperfectlyNestedLoops) {
84 if (
auto *CS = dyn_cast<CompoundStmt>(CurStmt)) {
88 while (!Statements.empty()) {
89 CS = Statements.pop_back_val();
92 for (
Stmt *S : CS->body()) {
95 if (
auto *CanonLoop = dyn_cast<OMPCanonicalLoop>(S))
96 S = CanonLoop->getLoopStmt();
97 if (isa<ForStmt>(S) || isa<CXXForRangeStmt>(S) ||
98 (isa<OMPLoopBasedDirective>(S) && !isa<OMPLoopDirective>(S))) {
107 S = S->IgnoreContainers();
108 if (
auto *InnerCS = dyn_cast_or_null<CompoundStmt>(S))
109 NextStatements.push_back(InnerCS);
111 if (Statements.empty()) {
115 Statements.swap(NextStatements);
126 Stmt *CurStmt,
bool TryImperfectlyNestedLoops,
unsigned NumLoops,
127 llvm::function_ref<
bool(
unsigned,
Stmt *)> Callback,
129 OnTransformationCallback) {
131 for (
unsigned Cnt = 0; Cnt < NumLoops; ++Cnt) {
133 auto *Dir = dyn_cast<OMPLoopTransformationDirective>(CurStmt);
137 OnTransformationCallback(Dir);
139 Stmt *TransformedStmt = Dir->getTransformedStmt();
140 if (!TransformedStmt) {
141 unsigned NumGeneratedLoops = Dir->getNumGeneratedLoops();
142 if (NumGeneratedLoops == 0) {
147 if (NumGeneratedLoops > 0) {
155 CurStmt = TransformedStmt;
157 if (
auto *CanonLoop = dyn_cast<OMPCanonicalLoop>(CurStmt))
158 CurStmt = CanonLoop->getLoopStmt();
159 if (Callback(Cnt, CurStmt))
166 if (
auto *For = dyn_cast<ForStmt>(CurStmt)) {
167 CurStmt = For->getBody();
169 assert(isa<CXXForRangeStmt>(CurStmt) &&
170 "Expected canonical for or range-based for loops.");
171 CurStmt = cast<CXXForRangeStmt>(CurStmt)->getBody();
174 CurStmt, TryImperfectlyNestedLoops);
180 Stmt *CurStmt,
bool TryImperfectlyNestedLoops,
unsigned NumLoops,
181 llvm::function_ref<
void(
unsigned,
Stmt *,
Stmt *)> Callback) {
183 CurStmt, TryImperfectlyNestedLoops, NumLoops,
184 [Callback](
unsigned Cnt,
Stmt *
Loop) {
185 Stmt *Body =
nullptr;
186 if (
auto *For = dyn_cast<ForStmt>(
Loop)) {
187 Body = For->getBody();
189 assert(isa<CXXForRangeStmt>(
Loop) &&
190 "Expected canonical for or range-based for loops.");
191 Body = cast<CXXForRangeStmt>(
Loop)->getBody();
193 if (
auto *CanonLoop = dyn_cast<OMPCanonicalLoop>(Body))
194 Body = CanonLoop->getLoopStmt();
195 Callback(Cnt,
Loop, Body);
198 assert(Res &&
"Expected only loops");
204 Stmt *Body =
nullptr;
208 [&Body](
unsigned,
Stmt *,
Stmt *BodyStmt) { Body = BodyStmt; });
214 "Number of loop counters is not the same as the collapsed number");
215 llvm::copy(A, getCounters().begin());
219 assert(A.size() ==
getLoopsNumber() &&
"Number of loop private counters "
220 "is not the same as the collapsed "
222 llvm::copy(A, getPrivateCounters().begin());
227 "Number of counter inits is not the same as the collapsed number");
228 llvm::copy(A, getInits().begin());
233 "Number of counter updates is not the same as the collapsed number");
234 llvm::copy(A, getUpdates().begin());
239 "Number of counter finals is not the same as the collapsed number");
240 llvm::copy(A, getFinals().begin());
246 "Number of dependent counters is not the same as the collapsed number");
247 llvm::copy(A, getDependentCounters().begin());
252 "Number of dependent inits is not the same as the collapsed number");
253 llvm::copy(A, getDependentInits().begin());
258 "Number of finals conditions is not the same as the collapsed number");
259 llvm::copy(A, getFinalsConditions().begin());
267 auto *Dir = createDirective<OMPMetaDirective>(
268 C, Clauses, AssociatedStmt, 1, StartLoc, EndLoc);
276 return createEmptyDirective<OMPMetaDirective>(
C, NumClauses,
285 auto *Dir = createDirective<OMPParallelDirective>(
286 C, Clauses, AssociatedStmt, 1, StartLoc, EndLoc);
287 Dir->setTaskReductionRefExpr(TaskRedRef);
288 Dir->setHasCancel(HasCancel);
295 return createEmptyDirective<OMPParallelDirective>(
C, NumClauses,
305 auto *Dir = createDirective<OMPSimdDirective>(
307 StartLoc, EndLoc, CollapsedNum);
311 Dir->setPreCond(Exprs.
PreCond);
312 Dir->setCond(Exprs.
Cond);
313 Dir->setInit(Exprs.
Init);
314 Dir->setInc(Exprs.
Inc);
317 Dir->setInits(Exprs.
Inits);
318 Dir->setUpdates(Exprs.
Updates);
319 Dir->setFinals(Exprs.
Finals);
329 unsigned CollapsedNum,
331 return createEmptyDirective<OMPSimdDirective>(
340 auto *Dir = createDirective<OMPForDirective>(
342 StartLoc, EndLoc, CollapsedNum);
346 Dir->setPreCond(Exprs.
PreCond);
347 Dir->setCond(Exprs.
Cond);
348 Dir->setInit(Exprs.
Init);
349 Dir->setInc(Exprs.
Inc);
350 Dir->setIsLastIterVariable(Exprs.
IL);
351 Dir->setLowerBoundVariable(Exprs.
LB);
352 Dir->setUpperBoundVariable(Exprs.
UB);
353 Dir->setStrideVariable(Exprs.
ST);
354 Dir->setEnsureUpperBound(Exprs.
EUB);
355 Dir->setNextLowerBound(Exprs.
NLB);
356 Dir->setNextUpperBound(Exprs.
NUB);
360 Dir->setInits(Exprs.
Inits);
361 Dir->setUpdates(Exprs.
Updates);
362 Dir->setFinals(Exprs.
Finals);
367 Dir->setTaskReductionRefExpr(TaskRedRef);
368 Dir->setHasCancel(HasCancel);
374#define STMT(CLASS, PARENT)
375#define ABSTRACT_STMT(CLASS)
376#define OMPLOOPTRANSFORMATIONDIRECTIVE(CLASS, PARENT) \
377 case Stmt::CLASS##Class: \
378 return static_cast<const CLASS *>(this)->getTransformedStmt();
379#include "clang/AST/StmtNodes.inc"
381 llvm_unreachable(
"Not a loop transformation");
387#define STMT(CLASS, PARENT)
388#define ABSTRACT_STMT(CLASS)
389#define OMPLOOPTRANSFORMATIONDIRECTIVE(CLASS, PARENT) \
390 case Stmt::CLASS##Class: \
391 return static_cast<const CLASS *>(this)->getPreInits();
392#include "clang/AST/StmtNodes.inc"
394 llvm_unreachable(
"Not a loop transformation");
400 unsigned CollapsedNum,
402 return createEmptyDirective<OMPForDirective>(
410 unsigned NumLoops,
Stmt *AssociatedStmt,
411 Stmt *TransformedStmt,
Stmt *PreInits) {
413 C, Clauses, AssociatedStmt, TransformedStmtOffset + 1, StartLoc, EndLoc,
415 Dir->setTransformedStmt(TransformedStmt);
416 Dir->setPreInits(PreInits);
423 return createEmptyDirective<OMPTileDirective>(
424 C, NumClauses,
true, TransformedStmtOffset + 1,
431 unsigned NumLoops,
Stmt *AssociatedStmt,
432 Stmt *TransformedStmt,
Stmt *PreInits) {
434 C, Clauses, AssociatedStmt, TransformedStmtOffset + 1, StartLoc, EndLoc,
436 Dir->setTransformedStmt(TransformedStmt);
437 Dir->setPreInits(PreInits);
444 return createEmptyDirective<OMPStripeDirective>(
445 C, NumClauses,
true, TransformedStmtOffset + 1,
452 Stmt *AssociatedStmt,
unsigned NumGeneratedLoops,
453 Stmt *TransformedStmt,
Stmt *PreInits) {
454 assert(NumGeneratedLoops <= 1 &&
"Unrolling generates at most one loop");
456 auto *Dir = createDirective<OMPUnrollDirective>(
457 C, Clauses, AssociatedStmt, TransformedStmtOffset + 1, StartLoc, EndLoc);
458 Dir->setNumGeneratedLoops(NumGeneratedLoops);
459 Dir->setTransformedStmt(TransformedStmt);
460 Dir->setPreInits(PreInits);
465 unsigned NumClauses) {
466 return createEmptyDirective<OMPUnrollDirective>(
467 C, NumClauses,
true, TransformedStmtOffset + 1,
474 unsigned NumLoops,
Stmt *TransformedStmt,
477 C, {}, AssociatedStmt, TransformedStmtOffset + 1, StartLoc, EndLoc,
479 Dir->setTransformedStmt(TransformedStmt);
480 Dir->setPreInits(PreInits);
486 return createEmptyDirective<OMPReverseDirective>(
494 Stmt *TransformedStmt,
Stmt *PreInits) {
496 C, Clauses, AssociatedStmt, TransformedStmtOffset + 1, StartLoc, EndLoc,
498 Dir->setTransformedStmt(TransformedStmt);
499 Dir->setPreInits(PreInits);
506 return createEmptyDirective<OMPInterchangeDirective>(
507 C, NumClauses,
true, TransformedStmtOffset + 1,
516 auto *Dir = createDirective<OMPForSimdDirective>(
518 StartLoc, EndLoc, CollapsedNum);
522 Dir->setPreCond(Exprs.
PreCond);
523 Dir->setCond(Exprs.
Cond);
524 Dir->setInit(Exprs.
Init);
525 Dir->setInc(Exprs.
Inc);
526 Dir->setIsLastIterVariable(Exprs.
IL);
527 Dir->setLowerBoundVariable(Exprs.
LB);
528 Dir->setUpperBoundVariable(Exprs.
UB);
529 Dir->setStrideVariable(Exprs.
ST);
530 Dir->setEnsureUpperBound(Exprs.
EUB);
531 Dir->setNextLowerBound(Exprs.
NLB);
532 Dir->setNextUpperBound(Exprs.
NUB);
536 Dir->setInits(Exprs.
Inits);
537 Dir->setUpdates(Exprs.
Updates);
538 Dir->setFinals(Exprs.
Finals);
548 unsigned CollapsedNum,
550 return createEmptyDirective<OMPForSimdDirective>(
559 auto *Dir = createDirective<OMPSectionsDirective>(
C, Clauses, AssociatedStmt,
562 Dir->setTaskReductionRefExpr(TaskRedRef);
563 Dir->setHasCancel(HasCancel);
570 return createEmptyDirective<OMPSectionsDirective>(
C, NumClauses,
578 Stmt *AssociatedStmt,
581 createDirective<OMPSectionDirective>(
C, {}, AssociatedStmt,
582 0, StartLoc, EndLoc);
589 return createEmptyDirective<OMPSectionDirective>(
C, 0,
597 Stmt *AssociatedStmt) {
598 return createDirective<OMPScopeDirective>(
C, Clauses, AssociatedStmt,
606 return createEmptyDirective<OMPScopeDirective>(
C, NumClauses,
614 Stmt *AssociatedStmt) {
615 return createDirective<OMPSingleDirective>(
C, Clauses, AssociatedStmt,
623 return createEmptyDirective<OMPSingleDirective>(
C, NumClauses,
630 Stmt *AssociatedStmt) {
631 return createDirective<OMPMasterDirective>(
C, {}, AssociatedStmt,
638 return createEmptyDirective<OMPMasterDirective>(
C, 0,
646 return createDirective<OMPCriticalDirective>(
C, Clauses, AssociatedStmt,
654 return createEmptyDirective<OMPCriticalDirective>(
C, NumClauses,
662 auto *Dir = createDirective<OMPParallelForDirective>(
663 C, Clauses, AssociatedStmt,
664 numLoopChildren(CollapsedNum, OMPD_parallel_for) + 1, StartLoc, EndLoc,
669 Dir->setPreCond(Exprs.
PreCond);
670 Dir->setCond(Exprs.
Cond);
671 Dir->setInit(Exprs.
Init);
672 Dir->setInc(Exprs.
Inc);
673 Dir->setIsLastIterVariable(Exprs.
IL);
674 Dir->setLowerBoundVariable(Exprs.
LB);
675 Dir->setUpperBoundVariable(Exprs.
UB);
676 Dir->setStrideVariable(Exprs.
ST);
677 Dir->setEnsureUpperBound(Exprs.
EUB);
678 Dir->setNextLowerBound(Exprs.
NLB);
679 Dir->setNextUpperBound(Exprs.
NUB);
683 Dir->setInits(Exprs.
Inits);
684 Dir->setUpdates(Exprs.
Updates);
685 Dir->setFinals(Exprs.
Finals);
690 Dir->setTaskReductionRefExpr(TaskRedRef);
691 Dir->setHasCancel(HasCancel);
698 return createEmptyDirective<OMPParallelForDirective>(
707 auto *Dir = createDirective<OMPParallelForSimdDirective>(
708 C, Clauses, AssociatedStmt,
709 numLoopChildren(CollapsedNum, OMPD_parallel_for_simd), StartLoc, EndLoc,
714 Dir->setPreCond(Exprs.
PreCond);
715 Dir->setCond(Exprs.
Cond);
716 Dir->setInit(Exprs.
Init);
717 Dir->setInc(Exprs.
Inc);
718 Dir->setIsLastIterVariable(Exprs.
IL);
719 Dir->setLowerBoundVariable(Exprs.
LB);
720 Dir->setUpperBoundVariable(Exprs.
UB);
721 Dir->setStrideVariable(Exprs.
ST);
722 Dir->setEnsureUpperBound(Exprs.
EUB);
723 Dir->setNextLowerBound(Exprs.
NLB);
724 Dir->setNextUpperBound(Exprs.
NUB);
728 Dir->setInits(Exprs.
Inits);
729 Dir->setUpdates(Exprs.
Updates);
730 Dir->setFinals(Exprs.
Finals);
742 return createEmptyDirective<OMPParallelForSimdDirective>(
750 auto *Dir = createDirective<OMPParallelMasterDirective>(
751 C, Clauses, AssociatedStmt, 1, StartLoc, EndLoc);
752 Dir->setTaskReductionRefExpr(TaskRedRef);
759 return createEmptyDirective<OMPParallelMasterDirective>(
760 C, NumClauses,
true, 1);
766 auto *Dir = createDirective<OMPParallelMaskedDirective>(
767 C, Clauses, AssociatedStmt, 1, StartLoc, EndLoc);
768 Dir->setTaskReductionRefExpr(TaskRedRef);
775 return createEmptyDirective<OMPParallelMaskedDirective>(
776 C, NumClauses,
true, 1);
783 auto *Dir = createDirective<OMPParallelSectionsDirective>(
784 C, Clauses, AssociatedStmt, 1, StartLoc, EndLoc);
785 Dir->setTaskReductionRefExpr(TaskRedRef);
786 Dir->setHasCancel(HasCancel);
793 return createEmptyDirective<OMPParallelSectionsDirective>(
794 C, NumClauses,
true, 1);
800 Stmt *AssociatedStmt,
bool HasCancel) {
801 auto *Dir = createDirective<OMPTaskDirective>(
802 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
803 Dir->setHasCancel(HasCancel);
810 return createEmptyDirective<OMPTaskDirective>(
C, NumClauses,
830 return createDirective<OMPAssumeDirective>(
C, Clauses, AStmt,
838 return createEmptyDirective<OMPAssumeDirective>(
C, NumClauses,
846 return createDirective<OMPErrorDirective>(
847 C, Clauses,
nullptr, 0, StartLoc,
854 return createEmptyDirective<OMPErrorDirective>(
C, NumClauses);
872 return createDirective<OMPTaskwaitDirective>(
873 C, Clauses,
nullptr, 0, StartLoc,
880 return createEmptyDirective<OMPTaskwaitDirective>(
C, NumClauses);
886 auto *Dir = createDirective<OMPTaskgroupDirective>(
887 C, Clauses, AssociatedStmt, 1, StartLoc, EndLoc);
888 Dir->setReductionRef(ReductionRef);
895 return createEmptyDirective<OMPTaskgroupDirective>(
896 C, NumClauses,
true, 1);
903 Dir->setCancelRegion(CancelRegion);
916 auto *Dir = createDirective<OMPCancelDirective>(
917 C, Clauses,
nullptr, 0, StartLoc,
919 Dir->setCancelRegion(CancelRegion);
926 return createEmptyDirective<OMPCancelDirective>(
C, NumClauses);
933 return createDirective<OMPFlushDirective>(
934 C, Clauses,
nullptr, 0, StartLoc,
941 return createEmptyDirective<OMPFlushDirective>(
C, NumClauses);
948 return createDirective<OMPDepobjDirective>(
950 0, StartLoc, EndLoc);
956 return createEmptyDirective<OMPDepobjDirective>(
C, NumClauses);
963 return createDirective<OMPScanDirective>(
C, Clauses,
965 0, StartLoc, EndLoc);
971 return createEmptyDirective<OMPScanDirective>(
C, NumClauses);
978 Stmt *AssociatedStmt) {
979 return createDirective<OMPOrderedDirective>(
980 C, Clauses, cast_or_null<CapturedStmt>(AssociatedStmt),
981 0, StartLoc, EndLoc);
988 return createEmptyDirective<OMPOrderedDirective>(
C, NumClauses,
996 auto *Dir = createDirective<OMPAtomicDirective>(
997 C, Clauses, AssociatedStmt, 7, StartLoc, EndLoc);
1001 Dir->setExpr(Exprs.
E);
1002 Dir->setUpdateExpr(Exprs.
UE);
1004 Dir->setCond(Exprs.
Cond);
1007 Dir->Flags.IsFailOnly = Exprs.
IsFailOnly ? 1 : 0;
1012 unsigned NumClauses,
1014 return createEmptyDirective<OMPAtomicDirective>(
1015 C, NumClauses,
true, 7);
1022 Stmt *AssociatedStmt) {
1023 return createDirective<OMPTargetDirective>(
1024 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
1028 unsigned NumClauses,
1030 return createEmptyDirective<OMPTargetDirective>(
C, NumClauses,
1038 auto *Dir = createDirective<OMPTargetParallelDirective>(
1039 C, Clauses, AssociatedStmt, 1, StartLoc, EndLoc);
1040 Dir->setTaskReductionRefExpr(TaskRedRef);
1041 Dir->setHasCancel(HasCancel);
1048 return createEmptyDirective<OMPTargetParallelDirective>(
1049 C, NumClauses,
true, 1);
1056 auto *Dir = createDirective<OMPTargetParallelForDirective>(
1057 C, Clauses, AssociatedStmt,
1058 numLoopChildren(CollapsedNum, OMPD_target_parallel_for) + 1, StartLoc,
1059 EndLoc, CollapsedNum);
1063 Dir->setPreCond(Exprs.
PreCond);
1064 Dir->setCond(Exprs.
Cond);
1065 Dir->setInit(Exprs.
Init);
1066 Dir->setInc(Exprs.
Inc);
1067 Dir->setIsLastIterVariable(Exprs.
IL);
1068 Dir->setLowerBoundVariable(Exprs.
LB);
1069 Dir->setUpperBoundVariable(Exprs.
UB);
1070 Dir->setStrideVariable(Exprs.
ST);
1071 Dir->setEnsureUpperBound(Exprs.
EUB);
1072 Dir->setNextLowerBound(Exprs.
NLB);
1073 Dir->setNextUpperBound(Exprs.
NUB);
1077 Dir->setInits(Exprs.
Inits);
1078 Dir->setUpdates(Exprs.
Updates);
1079 Dir->setFinals(Exprs.
Finals);
1084 Dir->setTaskReductionRefExpr(TaskRedRef);
1085 Dir->setHasCancel(HasCancel);
1091 unsigned NumClauses,
1093 return createEmptyDirective<OMPTargetParallelForDirective>(
1094 C, NumClauses,
true,
1102 return createDirective<OMPTargetDataDirective>(
1103 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
1109 return createEmptyDirective<OMPTargetDataDirective>(
1116 return createDirective<OMPTargetEnterDataDirective>(
1117 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
1123 return createEmptyDirective<OMPTargetEnterDataDirective>(
1130 return createDirective<OMPTargetExitDataDirective>(
1131 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
1137 return createEmptyDirective<OMPTargetExitDataDirective>(
1145 Stmt *AssociatedStmt) {
1146 return createDirective<OMPTeamsDirective>(
1147 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
1151 unsigned NumClauses,
1153 return createEmptyDirective<OMPTeamsDirective>(
C, NumClauses,
1161 auto *Dir = createDirective<OMPTaskLoopDirective>(
1163 StartLoc, EndLoc, CollapsedNum);
1167 Dir->setPreCond(Exprs.
PreCond);
1168 Dir->setCond(Exprs.
Cond);
1169 Dir->setInit(Exprs.
Init);
1170 Dir->setInc(Exprs.
Inc);
1171 Dir->setIsLastIterVariable(Exprs.
IL);
1172 Dir->setLowerBoundVariable(Exprs.
LB);
1173 Dir->setUpperBoundVariable(Exprs.
UB);
1174 Dir->setStrideVariable(Exprs.
ST);
1175 Dir->setEnsureUpperBound(Exprs.
EUB);
1176 Dir->setNextLowerBound(Exprs.
NLB);
1177 Dir->setNextUpperBound(Exprs.
NUB);
1181 Dir->setInits(Exprs.
Inits);
1182 Dir->setUpdates(Exprs.
Updates);
1183 Dir->setFinals(Exprs.
Finals);
1188 Dir->setHasCancel(HasCancel);
1193 unsigned NumClauses,
1194 unsigned CollapsedNum,
1196 return createEmptyDirective<OMPTaskLoopDirective>(
1197 C, NumClauses,
true,
1205 auto *Dir = createDirective<OMPTaskLoopSimdDirective>(
1206 C, Clauses, AssociatedStmt,
1212 Dir->setPreCond(Exprs.
PreCond);
1213 Dir->setCond(Exprs.
Cond);
1214 Dir->setInit(Exprs.
Init);
1215 Dir->setInc(Exprs.
Inc);
1216 Dir->setIsLastIterVariable(Exprs.
IL);
1217 Dir->setLowerBoundVariable(Exprs.
LB);
1218 Dir->setUpperBoundVariable(Exprs.
UB);
1219 Dir->setStrideVariable(Exprs.
ST);
1220 Dir->setEnsureUpperBound(Exprs.
EUB);
1221 Dir->setNextLowerBound(Exprs.
NLB);
1222 Dir->setNextUpperBound(Exprs.
NUB);
1226 Dir->setInits(Exprs.
Inits);
1227 Dir->setUpdates(Exprs.
Updates);
1228 Dir->setFinals(Exprs.
Finals);
1239 return createEmptyDirective<OMPTaskLoopSimdDirective>(
1240 C, NumClauses,
true,
1248 auto *Dir = createDirective<OMPMasterTaskLoopDirective>(
1249 C, Clauses, AssociatedStmt,
1250 numLoopChildren(CollapsedNum, OMPD_master_taskloop), StartLoc, EndLoc,
1255 Dir->setPreCond(Exprs.
PreCond);
1256 Dir->setCond(Exprs.
Cond);
1257 Dir->setInit(Exprs.
Init);
1258 Dir->setInc(Exprs.
Inc);
1259 Dir->setIsLastIterVariable(Exprs.
IL);
1260 Dir->setLowerBoundVariable(Exprs.
LB);
1261 Dir->setUpperBoundVariable(Exprs.
UB);
1262 Dir->setStrideVariable(Exprs.
ST);
1263 Dir->setEnsureUpperBound(Exprs.
EUB);
1264 Dir->setNextLowerBound(Exprs.
NLB);
1265 Dir->setNextUpperBound(Exprs.
NUB);
1269 Dir->setInits(Exprs.
Inits);
1270 Dir->setUpdates(Exprs.
Updates);
1271 Dir->setFinals(Exprs.
Finals);
1276 Dir->setHasCancel(HasCancel);
1282 unsigned NumClauses,
1284 return createEmptyDirective<OMPMasterTaskLoopDirective>(
1285 C, NumClauses,
true,
1293 auto *Dir = createDirective<OMPMaskedTaskLoopDirective>(
1294 C, Clauses, AssociatedStmt,
1295 numLoopChildren(CollapsedNum, OMPD_masked_taskloop), StartLoc, EndLoc,
1300 Dir->setPreCond(Exprs.
PreCond);
1301 Dir->setCond(Exprs.
Cond);
1302 Dir->setInit(Exprs.
Init);
1303 Dir->setInc(Exprs.
Inc);
1304 Dir->setIsLastIterVariable(Exprs.
IL);
1305 Dir->setLowerBoundVariable(Exprs.
LB);
1306 Dir->setUpperBoundVariable(Exprs.
UB);
1307 Dir->setStrideVariable(Exprs.
ST);
1308 Dir->setEnsureUpperBound(Exprs.
EUB);
1309 Dir->setNextLowerBound(Exprs.
NLB);
1310 Dir->setNextUpperBound(Exprs.
NUB);
1314 Dir->setInits(Exprs.
Inits);
1315 Dir->setUpdates(Exprs.
Updates);
1316 Dir->setFinals(Exprs.
Finals);
1321 Dir->setHasCancel(HasCancel);
1327 unsigned NumClauses,
1329 return createEmptyDirective<OMPMaskedTaskLoopDirective>(
1330 C, NumClauses,
true,
1338 auto *Dir = createDirective<OMPMasterTaskLoopSimdDirective>(
1339 C, Clauses, AssociatedStmt,
1341 EndLoc, CollapsedNum);
1345 Dir->setPreCond(Exprs.
PreCond);
1346 Dir->setCond(Exprs.
Cond);
1347 Dir->setInit(Exprs.
Init);
1348 Dir->setInc(Exprs.
Inc);
1349 Dir->setIsLastIterVariable(Exprs.
IL);
1350 Dir->setLowerBoundVariable(Exprs.
LB);
1351 Dir->setUpperBoundVariable(Exprs.
UB);
1352 Dir->setStrideVariable(Exprs.
ST);
1353 Dir->setEnsureUpperBound(Exprs.
EUB);
1354 Dir->setNextLowerBound(Exprs.
NLB);
1355 Dir->setNextUpperBound(Exprs.
NUB);
1359 Dir->setInits(Exprs.
Inits);
1360 Dir->setUpdates(Exprs.
Updates);
1361 Dir->setFinals(Exprs.
Finals);
1371 unsigned NumClauses,
1373 return createEmptyDirective<OMPMasterTaskLoopSimdDirective>(
1374 C, NumClauses,
true,
1375 numLoopChildren(CollapsedNum, OMPD_master_taskloop_simd), CollapsedNum);
1382 auto *Dir = createDirective<OMPMaskedTaskLoopSimdDirective>(
1383 C, Clauses, AssociatedStmt,
1385 EndLoc, CollapsedNum);
1389 Dir->setPreCond(Exprs.
PreCond);
1390 Dir->setCond(Exprs.
Cond);
1391 Dir->setInit(Exprs.
Init);
1392 Dir->setInc(Exprs.
Inc);
1393 Dir->setIsLastIterVariable(Exprs.
IL);
1394 Dir->setLowerBoundVariable(Exprs.
LB);
1395 Dir->setUpperBoundVariable(Exprs.
UB);
1396 Dir->setStrideVariable(Exprs.
ST);
1397 Dir->setEnsureUpperBound(Exprs.
EUB);
1398 Dir->setNextLowerBound(Exprs.
NLB);
1399 Dir->setNextUpperBound(Exprs.
NUB);
1403 Dir->setInits(Exprs.
Inits);
1404 Dir->setUpdates(Exprs.
Updates);
1405 Dir->setFinals(Exprs.
Finals);
1415 unsigned NumClauses,
1417 return createEmptyDirective<OMPMaskedTaskLoopSimdDirective>(
1418 C, NumClauses,
true,
1419 numLoopChildren(CollapsedNum, OMPD_masked_taskloop_simd), CollapsedNum);
1426 auto *Dir = createDirective<OMPParallelMasterTaskLoopDirective>(
1427 C, Clauses, AssociatedStmt,
1428 numLoopChildren(CollapsedNum, OMPD_parallel_master_taskloop), StartLoc,
1429 EndLoc, CollapsedNum);
1433 Dir->setPreCond(Exprs.
PreCond);
1434 Dir->setCond(Exprs.
Cond);
1435 Dir->setInit(Exprs.
Init);
1436 Dir->setInc(Exprs.
Inc);
1437 Dir->setIsLastIterVariable(Exprs.
IL);
1438 Dir->setLowerBoundVariable(Exprs.
LB);
1439 Dir->setUpperBoundVariable(Exprs.
UB);
1440 Dir->setStrideVariable(Exprs.
ST);
1441 Dir->setEnsureUpperBound(Exprs.
EUB);
1442 Dir->setNextLowerBound(Exprs.
NLB);
1443 Dir->setNextUpperBound(Exprs.
NUB);
1447 Dir->setInits(Exprs.
Inits);
1448 Dir->setUpdates(Exprs.
Updates);
1449 Dir->setFinals(Exprs.
Finals);
1454 Dir->setHasCancel(HasCancel);
1460 unsigned NumClauses,
1461 unsigned CollapsedNum,
1463 return createEmptyDirective<OMPParallelMasterTaskLoopDirective>(
1464 C, NumClauses,
true,
1473 auto *Dir = createDirective<OMPParallelMaskedTaskLoopDirective>(
1474 C, Clauses, AssociatedStmt,
1475 numLoopChildren(CollapsedNum, OMPD_parallel_masked_taskloop), StartLoc,
1476 EndLoc, CollapsedNum);
1480 Dir->setPreCond(Exprs.
PreCond);
1481 Dir->setCond(Exprs.
Cond);
1482 Dir->setInit(Exprs.
Init);
1483 Dir->setInc(Exprs.
Inc);
1484 Dir->setIsLastIterVariable(Exprs.
IL);
1485 Dir->setLowerBoundVariable(Exprs.
LB);
1486 Dir->setUpperBoundVariable(Exprs.
UB);
1487 Dir->setStrideVariable(Exprs.
ST);
1488 Dir->setEnsureUpperBound(Exprs.
EUB);
1489 Dir->setNextLowerBound(Exprs.
NLB);
1490 Dir->setNextUpperBound(Exprs.
NUB);
1494 Dir->setInits(Exprs.
Inits);
1495 Dir->setUpdates(Exprs.
Updates);
1496 Dir->setFinals(Exprs.
Finals);
1501 Dir->setHasCancel(HasCancel);
1507 unsigned NumClauses,
1508 unsigned CollapsedNum,
1510 return createEmptyDirective<OMPParallelMaskedTaskLoopDirective>(
1511 C, NumClauses,
true,
1521 auto *Dir = createDirective<OMPParallelMasterTaskLoopSimdDirective>(
1522 C, Clauses, AssociatedStmt,
1524 StartLoc, EndLoc, CollapsedNum);
1528 Dir->setPreCond(Exprs.
PreCond);
1529 Dir->setCond(Exprs.
Cond);
1530 Dir->setInit(Exprs.
Init);
1531 Dir->setInc(Exprs.
Inc);
1532 Dir->setIsLastIterVariable(Exprs.
IL);
1533 Dir->setLowerBoundVariable(Exprs.
LB);
1534 Dir->setUpperBoundVariable(Exprs.
UB);
1535 Dir->setStrideVariable(Exprs.
ST);
1536 Dir->setEnsureUpperBound(Exprs.
EUB);
1537 Dir->setNextLowerBound(Exprs.
NLB);
1538 Dir->setNextUpperBound(Exprs.
NUB);
1542 Dir->setInits(Exprs.
Inits);
1543 Dir->setUpdates(Exprs.
Updates);
1544 Dir->setFinals(Exprs.
Finals);
1554 unsigned NumClauses,
1555 unsigned CollapsedNum,
1557 return createEmptyDirective<OMPParallelMasterTaskLoopSimdDirective>(
1558 C, NumClauses,
true,
1568 auto *Dir = createDirective<OMPParallelMaskedTaskLoopSimdDirective>(
1569 C, Clauses, AssociatedStmt,
1571 StartLoc, EndLoc, CollapsedNum);
1575 Dir->setPreCond(Exprs.
PreCond);
1576 Dir->setCond(Exprs.
Cond);
1577 Dir->setInit(Exprs.
Init);
1578 Dir->setInc(Exprs.
Inc);
1579 Dir->setIsLastIterVariable(Exprs.
IL);
1580 Dir->setLowerBoundVariable(Exprs.
LB);
1581 Dir->setUpperBoundVariable(Exprs.
UB);
1582 Dir->setStrideVariable(Exprs.
ST);
1583 Dir->setEnsureUpperBound(Exprs.
EUB);
1584 Dir->setNextLowerBound(Exprs.
NLB);
1585 Dir->setNextUpperBound(Exprs.
NUB);
1589 Dir->setInits(Exprs.
Inits);
1590 Dir->setUpdates(Exprs.
Updates);
1591 Dir->setFinals(Exprs.
Finals);
1601 unsigned NumClauses,
1602 unsigned CollapsedNum,
1604 return createEmptyDirective<OMPParallelMaskedTaskLoopSimdDirective>(
1605 C, NumClauses,
true,
1615 auto *Dir = createDirective<OMPDistributeDirective>(
1616 C, Clauses, AssociatedStmt,
1622 Dir->setPreCond(Exprs.
PreCond);
1623 Dir->setCond(Exprs.
Cond);
1624 Dir->setInit(Exprs.
Init);
1625 Dir->setInc(Exprs.
Inc);
1626 Dir->setIsLastIterVariable(Exprs.
IL);
1627 Dir->setLowerBoundVariable(Exprs.
LB);
1628 Dir->setUpperBoundVariable(Exprs.
UB);
1629 Dir->setStrideVariable(Exprs.
ST);
1630 Dir->setEnsureUpperBound(Exprs.
EUB);
1631 Dir->setNextLowerBound(Exprs.
NLB);
1632 Dir->setNextUpperBound(Exprs.
NUB);
1636 Dir->setInits(Exprs.
Inits);
1637 Dir->setUpdates(Exprs.
Updates);
1638 Dir->setFinals(Exprs.
Finals);
1649 return createEmptyDirective<OMPDistributeDirective>(
1650 C, NumClauses,
true,
1657 return createDirective<OMPTargetUpdateDirective>(
C, Clauses, AssociatedStmt,
1665 return createEmptyDirective<OMPTargetUpdateDirective>(
1666 C, NumClauses,
true);
1673 auto *Dir = createDirective<OMPDistributeParallelForDirective>(
1674 C, Clauses, AssociatedStmt,
1675 numLoopChildren(CollapsedNum, OMPD_distribute_parallel_for) + 1, StartLoc,
1676 EndLoc, CollapsedNum);
1680 Dir->setPreCond(Exprs.
PreCond);
1681 Dir->setCond(Exprs.
Cond);
1682 Dir->setInit(Exprs.
Init);
1683 Dir->setInc(Exprs.
Inc);
1684 Dir->setIsLastIterVariable(Exprs.
IL);
1685 Dir->setLowerBoundVariable(Exprs.
LB);
1686 Dir->setUpperBoundVariable(Exprs.
UB);
1687 Dir->setStrideVariable(Exprs.
ST);
1688 Dir->setEnsureUpperBound(Exprs.
EUB);
1689 Dir->setNextLowerBound(Exprs.
NLB);
1690 Dir->setNextUpperBound(Exprs.
NUB);
1692 Dir->setPrevLowerBoundVariable(Exprs.
PrevLB);
1693 Dir->setPrevUpperBoundVariable(Exprs.
PrevUB);
1694 Dir->setDistInc(Exprs.
DistInc);
1695 Dir->setPrevEnsureUpperBound(Exprs.
PrevEUB);
1698 Dir->setInits(Exprs.
Inits);
1699 Dir->setUpdates(Exprs.
Updates);
1700 Dir->setFinals(Exprs.
Finals);
1714 Dir->setTaskReductionRefExpr(TaskRedRef);
1715 Dir->HasCancel = HasCancel;
1721 unsigned NumClauses,
1722 unsigned CollapsedNum,
1724 return createEmptyDirective<OMPDistributeParallelForDirective>(
1725 C, NumClauses,
true,
1735 auto *Dir = createDirective<OMPDistributeParallelForSimdDirective>(
1736 C, Clauses, AssociatedStmt,
1738 StartLoc, EndLoc, CollapsedNum);
1742 Dir->setPreCond(Exprs.
PreCond);
1743 Dir->setCond(Exprs.
Cond);
1744 Dir->setInit(Exprs.
Init);
1745 Dir->setInc(Exprs.
Inc);
1746 Dir->setIsLastIterVariable(Exprs.
IL);
1747 Dir->setLowerBoundVariable(Exprs.
LB);
1748 Dir->setUpperBoundVariable(Exprs.
UB);
1749 Dir->setStrideVariable(Exprs.
ST);
1750 Dir->setEnsureUpperBound(Exprs.
EUB);
1751 Dir->setNextLowerBound(Exprs.
NLB);
1752 Dir->setNextUpperBound(Exprs.
NUB);
1754 Dir->setPrevLowerBoundVariable(Exprs.
PrevLB);
1755 Dir->setPrevUpperBoundVariable(Exprs.
PrevUB);
1756 Dir->setDistInc(Exprs.
DistInc);
1757 Dir->setPrevEnsureUpperBound(Exprs.
PrevEUB);
1760 Dir->setInits(Exprs.
Inits);
1761 Dir->setUpdates(Exprs.
Updates);
1762 Dir->setFinals(Exprs.
Finals);
1781 unsigned NumClauses,
1782 unsigned CollapsedNum,
1784 return createEmptyDirective<OMPDistributeParallelForSimdDirective>(
1785 C, NumClauses,
true,
1794 auto *Dir = createDirective<OMPDistributeSimdDirective>(
1795 C, Clauses, AssociatedStmt,
1796 numLoopChildren(CollapsedNum, OMPD_distribute_simd), StartLoc, EndLoc,
1801 Dir->setPreCond(Exprs.
PreCond);
1802 Dir->setCond(Exprs.
Cond);
1803 Dir->setInit(Exprs.
Init);
1804 Dir->setInc(Exprs.
Inc);
1805 Dir->setIsLastIterVariable(Exprs.
IL);
1806 Dir->setLowerBoundVariable(Exprs.
LB);
1807 Dir->setUpperBoundVariable(Exprs.
UB);
1808 Dir->setStrideVariable(Exprs.
ST);
1809 Dir->setEnsureUpperBound(Exprs.
EUB);
1810 Dir->setNextLowerBound(Exprs.
NLB);
1811 Dir->setNextUpperBound(Exprs.
NUB);
1815 Dir->setInits(Exprs.
Inits);
1816 Dir->setUpdates(Exprs.
Updates);
1817 Dir->setFinals(Exprs.
Finals);
1827 unsigned NumClauses,
1829 return createEmptyDirective<OMPDistributeSimdDirective>(
1830 C, NumClauses,
true,
1838 auto *Dir = createDirective<OMPTargetParallelForSimdDirective>(
1839 C, Clauses, AssociatedStmt,
1840 numLoopChildren(CollapsedNum, OMPD_target_parallel_for_simd), StartLoc,
1841 EndLoc, CollapsedNum);
1845 Dir->setPreCond(Exprs.
PreCond);
1846 Dir->setCond(Exprs.
Cond);
1847 Dir->setInit(Exprs.
Init);
1848 Dir->setInc(Exprs.
Inc);
1849 Dir->setIsLastIterVariable(Exprs.
IL);
1850 Dir->setLowerBoundVariable(Exprs.
LB);
1851 Dir->setUpperBoundVariable(Exprs.
UB);
1852 Dir->setStrideVariable(Exprs.
ST);
1853 Dir->setEnsureUpperBound(Exprs.
EUB);
1854 Dir->setNextLowerBound(Exprs.
NLB);
1855 Dir->setNextUpperBound(Exprs.
NUB);
1859 Dir->setInits(Exprs.
Inits);
1860 Dir->setUpdates(Exprs.
Updates);
1861 Dir->setFinals(Exprs.
Finals);
1871 unsigned NumClauses,
1872 unsigned CollapsedNum,
1874 return createEmptyDirective<OMPTargetParallelForSimdDirective>(
1875 C, NumClauses,
true,
1885 auto *Dir = createDirective<OMPTargetSimdDirective>(
1886 C, Clauses, AssociatedStmt,
1892 Dir->setPreCond(Exprs.
PreCond);
1893 Dir->setCond(Exprs.
Cond);
1894 Dir->setInit(Exprs.
Init);
1895 Dir->setInc(Exprs.
Inc);
1898 Dir->setInits(Exprs.
Inits);
1899 Dir->setUpdates(Exprs.
Updates);
1900 Dir->setFinals(Exprs.
Finals);
1911 return createEmptyDirective<OMPTargetSimdDirective>(
1912 C, NumClauses,
true,
1920 auto *Dir = createDirective<OMPTeamsDistributeDirective>(
1921 C, Clauses, AssociatedStmt,
1922 numLoopChildren(CollapsedNum, OMPD_teams_distribute), StartLoc, EndLoc,
1927 Dir->setPreCond(Exprs.
PreCond);
1928 Dir->setCond(Exprs.
Cond);
1929 Dir->setInit(Exprs.
Init);
1930 Dir->setInc(Exprs.
Inc);
1931 Dir->setIsLastIterVariable(Exprs.
IL);
1932 Dir->setLowerBoundVariable(Exprs.
LB);
1933 Dir->setUpperBoundVariable(Exprs.
UB);
1934 Dir->setStrideVariable(Exprs.
ST);
1935 Dir->setEnsureUpperBound(Exprs.
EUB);
1936 Dir->setNextLowerBound(Exprs.
NLB);
1937 Dir->setNextUpperBound(Exprs.
NUB);
1941 Dir->setInits(Exprs.
Inits);
1942 Dir->setUpdates(Exprs.
Updates);
1943 Dir->setFinals(Exprs.
Finals);
1953 unsigned NumClauses,
1955 return createEmptyDirective<OMPTeamsDistributeDirective>(
1956 C, NumClauses,
true,
1964 auto *Dir = createDirective<OMPTeamsDistributeSimdDirective>(
1965 C, Clauses, AssociatedStmt,
1967 EndLoc, CollapsedNum);
1971 Dir->setPreCond(Exprs.
PreCond);
1972 Dir->setCond(Exprs.
Cond);
1973 Dir->setInit(Exprs.
Init);
1974 Dir->setInc(Exprs.
Inc);
1975 Dir->setIsLastIterVariable(Exprs.
IL);
1976 Dir->setLowerBoundVariable(Exprs.
LB);
1977 Dir->setUpperBoundVariable(Exprs.
UB);
1978 Dir->setStrideVariable(Exprs.
ST);
1979 Dir->setEnsureUpperBound(Exprs.
EUB);
1980 Dir->setNextLowerBound(Exprs.
NLB);
1981 Dir->setNextUpperBound(Exprs.
NUB);
1985 Dir->setInits(Exprs.
Inits);
1986 Dir->setUpdates(Exprs.
Updates);
1987 Dir->setFinals(Exprs.
Finals);
1996 const ASTContext &
C,
unsigned NumClauses,
unsigned CollapsedNum,
1998 return createEmptyDirective<OMPTeamsDistributeSimdDirective>(
1999 C, NumClauses,
true,
2000 numLoopChildren(CollapsedNum, OMPD_teams_distribute_simd), CollapsedNum);
2008 auto *Dir = createDirective<OMPTeamsDistributeParallelForSimdDirective>(
2009 C, Clauses, AssociatedStmt,
2010 numLoopChildren(CollapsedNum, OMPD_teams_distribute_parallel_for_simd),
2011 StartLoc, EndLoc, CollapsedNum);
2015 Dir->setPreCond(Exprs.
PreCond);
2016 Dir->setCond(Exprs.
Cond);
2017 Dir->setInit(Exprs.
Init);
2018 Dir->setInc(Exprs.
Inc);
2019 Dir->setIsLastIterVariable(Exprs.
IL);
2020 Dir->setLowerBoundVariable(Exprs.
LB);
2021 Dir->setUpperBoundVariable(Exprs.
UB);
2022 Dir->setStrideVariable(Exprs.
ST);
2023 Dir->setEnsureUpperBound(Exprs.
EUB);
2024 Dir->setNextLowerBound(Exprs.
NLB);
2025 Dir->setNextUpperBound(Exprs.
NUB);
2027 Dir->setPrevLowerBoundVariable(Exprs.
PrevLB);
2028 Dir->setPrevUpperBoundVariable(Exprs.
PrevUB);
2029 Dir->setDistInc(Exprs.
DistInc);
2030 Dir->setPrevEnsureUpperBound(Exprs.
PrevEUB);
2033 Dir->setInits(Exprs.
Inits);
2034 Dir->setUpdates(Exprs.
Updates);
2035 Dir->setFinals(Exprs.
Finals);
2054 unsigned NumClauses,
2055 unsigned CollapsedNum,
2057 return createEmptyDirective<OMPTeamsDistributeParallelForSimdDirective>(
2058 C, NumClauses,
true,
2059 numLoopChildren(CollapsedNum, OMPD_teams_distribute_parallel_for_simd),
2068 auto *Dir = createDirective<OMPTeamsDistributeParallelForDirective>(
2069 C, Clauses, AssociatedStmt,
2070 numLoopChildren(CollapsedNum, OMPD_teams_distribute_parallel_for) + 1,
2071 StartLoc, EndLoc, CollapsedNum);
2075 Dir->setPreCond(Exprs.
PreCond);
2076 Dir->setCond(Exprs.
Cond);
2077 Dir->setInit(Exprs.
Init);
2078 Dir->setInc(Exprs.
Inc);
2079 Dir->setIsLastIterVariable(Exprs.
IL);
2080 Dir->setLowerBoundVariable(Exprs.
LB);
2081 Dir->setUpperBoundVariable(Exprs.
UB);
2082 Dir->setStrideVariable(Exprs.
ST);
2083 Dir->setEnsureUpperBound(Exprs.
EUB);
2084 Dir->setNextLowerBound(Exprs.
NLB);
2085 Dir->setNextUpperBound(Exprs.
NUB);
2087 Dir->setPrevLowerBoundVariable(Exprs.
PrevLB);
2088 Dir->setPrevUpperBoundVariable(Exprs.
PrevUB);
2089 Dir->setDistInc(Exprs.
DistInc);
2090 Dir->setPrevEnsureUpperBound(Exprs.
PrevEUB);
2093 Dir->setInits(Exprs.
Inits);
2094 Dir->setUpdates(Exprs.
Updates);
2095 Dir->setFinals(Exprs.
Finals);
2109 Dir->setTaskReductionRefExpr(TaskRedRef);
2110 Dir->HasCancel = HasCancel;
2116 unsigned NumClauses,
2117 unsigned CollapsedNum,
2119 return createEmptyDirective<OMPTeamsDistributeParallelForDirective>(
2120 C, NumClauses,
true,
2121 numLoopChildren(CollapsedNum, OMPD_teams_distribute_parallel_for) + 1,
2128 return createDirective<OMPTargetTeamsDirective>(
C, Clauses, AssociatedStmt,
2136 return createEmptyDirective<OMPTargetTeamsDirective>(
2137 C, NumClauses,
true);
2144 auto *Dir = createDirective<OMPTargetTeamsDistributeDirective>(
2145 C, Clauses, AssociatedStmt,
2146 numLoopChildren(CollapsedNum, OMPD_target_teams_distribute), StartLoc,
2147 EndLoc, CollapsedNum);
2151 Dir->setPreCond(Exprs.
PreCond);
2152 Dir->setCond(Exprs.
Cond);
2153 Dir->setInit(Exprs.
Init);
2154 Dir->setInc(Exprs.
Inc);
2155 Dir->setIsLastIterVariable(Exprs.
IL);
2156 Dir->setLowerBoundVariable(Exprs.
LB);
2157 Dir->setUpperBoundVariable(Exprs.
UB);
2158 Dir->setStrideVariable(Exprs.
ST);
2159 Dir->setEnsureUpperBound(Exprs.
EUB);
2160 Dir->setNextLowerBound(Exprs.
NLB);
2161 Dir->setNextUpperBound(Exprs.
NUB);
2165 Dir->setInits(Exprs.
Inits);
2166 Dir->setUpdates(Exprs.
Updates);
2167 Dir->setFinals(Exprs.
Finals);
2177 unsigned NumClauses,
2178 unsigned CollapsedNum,
2180 return createEmptyDirective<OMPTargetTeamsDistributeDirective>(
2181 C, NumClauses,
true,
2191 auto *Dir = createDirective<OMPTargetTeamsDistributeParallelForDirective>(
2192 C, Clauses, AssociatedStmt,
2193 numLoopChildren(CollapsedNum, OMPD_target_teams_distribute_parallel_for) +
2195 StartLoc, EndLoc, CollapsedNum);
2199 Dir->setPreCond(Exprs.
PreCond);
2200 Dir->setCond(Exprs.
Cond);
2201 Dir->setInit(Exprs.
Init);
2202 Dir->setInc(Exprs.
Inc);
2203 Dir->setIsLastIterVariable(Exprs.
IL);
2204 Dir->setLowerBoundVariable(Exprs.
LB);
2205 Dir->setUpperBoundVariable(Exprs.
UB);
2206 Dir->setStrideVariable(Exprs.
ST);
2207 Dir->setEnsureUpperBound(Exprs.
EUB);
2208 Dir->setNextLowerBound(Exprs.
NLB);
2209 Dir->setNextUpperBound(Exprs.
NUB);
2211 Dir->setPrevLowerBoundVariable(Exprs.
PrevLB);
2212 Dir->setPrevUpperBoundVariable(Exprs.
PrevUB);
2213 Dir->setDistInc(Exprs.
DistInc);
2214 Dir->setPrevEnsureUpperBound(Exprs.
PrevEUB);
2217 Dir->setInits(Exprs.
Inits);
2218 Dir->setUpdates(Exprs.
Updates);
2219 Dir->setFinals(Exprs.
Finals);
2233 Dir->setTaskReductionRefExpr(TaskRedRef);
2234 Dir->HasCancel = HasCancel;
2240 unsigned NumClauses,
2241 unsigned CollapsedNum,
2243 return createEmptyDirective<OMPTargetTeamsDistributeParallelForDirective>(
2244 C, NumClauses,
true,
2245 numLoopChildren(CollapsedNum, OMPD_target_teams_distribute_parallel_for) +
2255 auto *Dir = createDirective<OMPTargetTeamsDistributeParallelForSimdDirective>(
2256 C, Clauses, AssociatedStmt,
2258 OMPD_target_teams_distribute_parallel_for_simd),
2259 StartLoc, EndLoc, CollapsedNum);
2263 Dir->setPreCond(Exprs.
PreCond);
2264 Dir->setCond(Exprs.
Cond);
2265 Dir->setInit(Exprs.
Init);
2266 Dir->setInc(Exprs.
Inc);
2267 Dir->setIsLastIterVariable(Exprs.
IL);
2268 Dir->setLowerBoundVariable(Exprs.
LB);
2269 Dir->setUpperBoundVariable(Exprs.
UB);
2270 Dir->setStrideVariable(Exprs.
ST);
2271 Dir->setEnsureUpperBound(Exprs.
EUB);
2272 Dir->setNextLowerBound(Exprs.
NLB);
2273 Dir->setNextUpperBound(Exprs.
NUB);
2275 Dir->setPrevLowerBoundVariable(Exprs.
PrevLB);
2276 Dir->setPrevUpperBoundVariable(Exprs.
PrevUB);
2277 Dir->setDistInc(Exprs.
DistInc);
2278 Dir->setPrevEnsureUpperBound(Exprs.
PrevEUB);
2281 Dir->setInits(Exprs.
Inits);
2282 Dir->setUpdates(Exprs.
Updates);
2283 Dir->setFinals(Exprs.
Finals);
2302 const ASTContext &
C,
unsigned NumClauses,
unsigned CollapsedNum,
2304 return createEmptyDirective<OMPTargetTeamsDistributeParallelForSimdDirective>(
2305 C, NumClauses,
true,
2307 OMPD_target_teams_distribute_parallel_for_simd),
2316 auto *Dir = createDirective<OMPTargetTeamsDistributeSimdDirective>(
2317 C, Clauses, AssociatedStmt,
2319 StartLoc, EndLoc, CollapsedNum);
2323 Dir->setPreCond(Exprs.
PreCond);
2324 Dir->setCond(Exprs.
Cond);
2325 Dir->setInit(Exprs.
Init);
2326 Dir->setInc(Exprs.
Inc);
2327 Dir->setIsLastIterVariable(Exprs.
IL);
2328 Dir->setLowerBoundVariable(Exprs.
LB);
2329 Dir->setUpperBoundVariable(Exprs.
UB);
2330 Dir->setStrideVariable(Exprs.
ST);
2331 Dir->setEnsureUpperBound(Exprs.
EUB);
2332 Dir->setNextLowerBound(Exprs.
NLB);
2333 Dir->setNextUpperBound(Exprs.
NUB);
2337 Dir->setInits(Exprs.
Inits);
2338 Dir->setUpdates(Exprs.
Updates);
2339 Dir->setFinals(Exprs.
Finals);
2349 unsigned NumClauses,
2350 unsigned CollapsedNum,
2352 return createEmptyDirective<OMPTargetTeamsDistributeSimdDirective>(
2353 C, NumClauses,
true,
2362 return createDirective<OMPInteropDirective>(
2363 C, Clauses,
nullptr, 0, StartLoc,
2368 unsigned NumClauses,
2370 return createEmptyDirective<OMPInteropDirective>(
C, NumClauses);
2377 auto *Dir = createDirective<OMPDispatchDirective>(
2378 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
2379 Dir->setTargetCallLoc(TargetCallLoc);
2384 unsigned NumClauses,
2386 return createEmptyDirective<OMPDispatchDirective>(
C, NumClauses,
2395 Stmt *AssociatedStmt) {
2396 return createDirective<OMPMaskedDirective>(
C, Clauses, AssociatedStmt,
2402 unsigned NumClauses,
2404 return createEmptyDirective<OMPMaskedDirective>(
C, NumClauses,
2412 auto *Dir = createDirective<OMPGenericLoopDirective>(
2414 StartLoc, EndLoc, CollapsedNum);
2418 Dir->setPreCond(Exprs.
PreCond);
2419 Dir->setCond(Exprs.
Cond);
2420 Dir->setInit(Exprs.
Init);
2421 Dir->setInc(Exprs.
Inc);
2422 Dir->setIsLastIterVariable(Exprs.
IL);
2423 Dir->setLowerBoundVariable(Exprs.
LB);
2424 Dir->setUpperBoundVariable(Exprs.
UB);
2425 Dir->setStrideVariable(Exprs.
ST);
2426 Dir->setEnsureUpperBound(Exprs.
EUB);
2427 Dir->setNextLowerBound(Exprs.
NLB);
2428 Dir->setNextUpperBound(Exprs.
NUB);
2432 Dir->setInits(Exprs.
Inits);
2433 Dir->setUpdates(Exprs.
Updates);
2434 Dir->setFinals(Exprs.
Finals);
2445 return createEmptyDirective<OMPGenericLoopDirective>(
2446 C, NumClauses,
true,
2454 auto *Dir = createDirective<OMPTeamsGenericLoopDirective>(
2455 C, Clauses, AssociatedStmt,
2461 Dir->setPreCond(Exprs.
PreCond);
2462 Dir->setCond(Exprs.
Cond);
2463 Dir->setInit(Exprs.
Init);
2464 Dir->setInc(Exprs.
Inc);
2465 Dir->setIsLastIterVariable(Exprs.
IL);
2466 Dir->setLowerBoundVariable(Exprs.
LB);
2467 Dir->setUpperBoundVariable(Exprs.
UB);
2468 Dir->setStrideVariable(Exprs.
ST);
2469 Dir->setEnsureUpperBound(Exprs.
EUB);
2470 Dir->setNextLowerBound(Exprs.
NLB);
2471 Dir->setNextUpperBound(Exprs.
NUB);
2473 Dir->setPrevLowerBoundVariable(Exprs.
PrevLB);
2474 Dir->setPrevUpperBoundVariable(Exprs.
PrevUB);
2475 Dir->setDistInc(Exprs.
DistInc);
2476 Dir->setPrevEnsureUpperBound(Exprs.
PrevEUB);
2479 Dir->setInits(Exprs.
Inits);
2480 Dir->setUpdates(Exprs.
Updates);
2481 Dir->setFinals(Exprs.
Finals);
2500 unsigned NumClauses,
2502 return createEmptyDirective<OMPTeamsGenericLoopDirective>(
2503 C, NumClauses,
true,
2510 const HelperExprs &Exprs,
bool CanBeParallelFor) {
2511 auto *Dir = createDirective<OMPTargetTeamsGenericLoopDirective>(
2512 C, Clauses, AssociatedStmt,
2513 numLoopChildren(CollapsedNum, OMPD_target_teams_loop), StartLoc, EndLoc,
2518 Dir->setPreCond(Exprs.
PreCond);
2519 Dir->setCond(Exprs.
Cond);
2520 Dir->setInit(Exprs.
Init);
2521 Dir->setInc(Exprs.
Inc);
2522 Dir->setIsLastIterVariable(Exprs.
IL);
2523 Dir->setLowerBoundVariable(Exprs.
LB);
2524 Dir->setUpperBoundVariable(Exprs.
UB);
2525 Dir->setStrideVariable(Exprs.
ST);
2526 Dir->setEnsureUpperBound(Exprs.
EUB);
2527 Dir->setNextLowerBound(Exprs.
NLB);
2528 Dir->setNextUpperBound(Exprs.
NUB);
2530 Dir->setPrevLowerBoundVariable(Exprs.
PrevLB);
2531 Dir->setPrevUpperBoundVariable(Exprs.
PrevUB);
2532 Dir->setDistInc(Exprs.
DistInc);
2533 Dir->setPrevEnsureUpperBound(Exprs.
PrevEUB);
2536 Dir->setInits(Exprs.
Inits);
2537 Dir->setUpdates(Exprs.
Updates);
2538 Dir->setFinals(Exprs.
Finals);
2552 Dir->setCanBeParallelFor(CanBeParallelFor);
2558 unsigned NumClauses,
2559 unsigned CollapsedNum,
2561 return createEmptyDirective<OMPTargetTeamsGenericLoopDirective>(
2562 C, NumClauses,
true,
2570 auto *Dir = createDirective<OMPParallelGenericLoopDirective>(
2571 C, Clauses, AssociatedStmt,
2577 Dir->setPreCond(Exprs.
PreCond);
2578 Dir->setCond(Exprs.
Cond);
2579 Dir->setInit(Exprs.
Init);
2580 Dir->setInc(Exprs.
Inc);
2581 Dir->setIsLastIterVariable(Exprs.
IL);
2582 Dir->setLowerBoundVariable(Exprs.
LB);
2583 Dir->setUpperBoundVariable(Exprs.
UB);
2584 Dir->setStrideVariable(Exprs.
ST);
2585 Dir->setEnsureUpperBound(Exprs.
EUB);
2586 Dir->setNextLowerBound(Exprs.
NLB);
2587 Dir->setNextUpperBound(Exprs.
NUB);
2591 Dir->setInits(Exprs.
Inits);
2592 Dir->setUpdates(Exprs.
Updates);
2593 Dir->setFinals(Exprs.
Finals);
2602 const ASTContext &
C,
unsigned NumClauses,
unsigned CollapsedNum,
2604 return createEmptyDirective<OMPParallelGenericLoopDirective>(
2605 C, NumClauses,
true,
2614 auto *Dir = createDirective<OMPTargetParallelGenericLoopDirective>(
2615 C, Clauses, AssociatedStmt,
2617 EndLoc, CollapsedNum);
2621 Dir->setPreCond(Exprs.
PreCond);
2622 Dir->setCond(Exprs.
Cond);
2623 Dir->setInit(Exprs.
Init);
2624 Dir->setInc(Exprs.
Inc);
2625 Dir->setIsLastIterVariable(Exprs.
IL);
2626 Dir->setLowerBoundVariable(Exprs.
LB);
2627 Dir->setUpperBoundVariable(Exprs.
UB);
2628 Dir->setStrideVariable(Exprs.
ST);
2629 Dir->setEnsureUpperBound(Exprs.
EUB);
2630 Dir->setNextLowerBound(Exprs.
NLB);
2631 Dir->setNextUpperBound(Exprs.
NUB);
2635 Dir->setInits(Exprs.
Inits);
2636 Dir->setUpdates(Exprs.
Updates);
2637 Dir->setFinals(Exprs.
Finals);
2647 unsigned NumClauses,
2648 unsigned CollapsedNum,
2650 return createEmptyDirective<OMPTargetParallelGenericLoopDirective>(
2651 C, NumClauses,
true,
2652 numLoopChildren(CollapsedNum, OMPD_target_parallel_loop), CollapsedNum);
Defines the clang::ASTContext interface.
This file defines OpenMP AST classes for executable directives and clauses.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
This represents one expression.
IfStmt - This represents an if/then/else.
static OMPAssumeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
static OMPAssumeDirective * Create(const ASTContext &Ctx, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AStmt)
This represents '#pragma omp atomic' directive.
static OMPAtomicDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPAtomicDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, Expressions Exprs)
Creates directive with a list of Clauses and 'x', 'v' and 'expr' parts of the atomic construct (see S...
This represents '#pragma omp barrier' directive.
static OMPBarrierDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc)
Creates directive.
static OMPBarrierDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
This represents '#pragma omp cancel' directive.
static OMPCancelDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, OpenMPDirectiveKind CancelRegion)
Creates directive.
static OMPCancelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
This represents '#pragma omp cancellation point' directive.
static OMPCancellationPointDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
static OMPCancellationPointDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, OpenMPDirectiveKind CancelRegion)
Creates directive.
Contains data for OpenMP directives: clauses, children expressions/statements (helpers for codegen) a...
void setClauses(ArrayRef< OMPClause * > Clauses)
Sets the list of variables for this clause.
MutableArrayRef< Stmt * > getChildren()
This represents '#pragma omp critical' directive.
static OMPCriticalDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
static OMPCriticalDirective * Create(const ASTContext &C, const DeclarationNameInfo &Name, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive.
This represents '#pragma omp depobj' directive.
static OMPDepobjDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPDepobjDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses)
Creates directive with a list of Clauses.
This represents '#pragma omp dispatch' directive.
static OMPDispatchDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, SourceLocation TargetCallLoc)
Creates directive with a list of Clauses.
static OMPDispatchDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp distribute' directive.
static OMPDistributeDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPDistributeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp distribute parallel for' composite directive.
static OMPDistributeParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPDistributeParallelForDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, Expr *TaskRedRef, bool HasCancel)
Creates directive with a list of Clauses.
This represents '#pragma omp distribute parallel for simd' composite directive.
static OMPDistributeParallelForSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp distribute simd' composite directive.
static OMPDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPDistributeSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
This represents '#pragma omp error' directive.
static OMPErrorDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses)
static OMPErrorDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
bool hasAssociatedStmt() const
Returns true if directive has associated statement.
const Stmt * getRawStmt() const
OMPChildren * Data
Data, associated with the directive.
const Stmt * getStructuredBlock() const
Returns the AST node representing OpenMP structured-block of this OpenMP executable directive,...
bool isStandaloneDirective() const
Returns whether or not this is a Standalone directive.
This represents '#pragma omp flush' directive.
static OMPFlushDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPFlushDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses)
Creates directive with a list of Clauses.
This represents '#pragma omp for' directive.
static OMPForDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, Expr *TaskRedRef, bool HasCancel)
Creates directive with a list of Clauses.
static OMPForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp for simd' directive.
static OMPForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPForSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
This represents '#pragma omp loop' directive.
static OMPGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with a place for NumClauses clauses.
static OMPGenericLoopDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
Represents the '#pragma omp interchange' loop transformation directive.
static OMPInterchangeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned NumLoops)
Build an empty '#pragma omp interchange' AST node for deserialization.
static OMPInterchangeDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, unsigned NumLoops, Stmt *AssociatedStmt, Stmt *TransformedStmt, Stmt *PreInits)
Create a new AST node representation for '#pragma omp interchange'.
This represents '#pragma omp interop' directive.
static OMPInteropDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
static OMPInteropDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses)
Creates directive.
static void doForAllLoopsBodies(Stmt *CurStmt, bool TryImperfectlyNestedLoops, unsigned NumLoops, llvm::function_ref< void(unsigned, Stmt *, Stmt *)> Callback)
Calls the specified callback function for all the loop bodies in CurStmt, from the outermost loop to ...
unsigned NumAssociatedLoops
Number of collapsed loops as specified by 'collapse' clause.
static Stmt * tryToFindNextInnerLoop(Stmt *CurStmt, bool TryImperfectlyNestedLoops)
Try to find the next loop sub-statement in the specified statement CurStmt.
static bool doForAllLoops(Stmt *CurStmt, bool TryImperfectlyNestedLoops, unsigned NumLoops, llvm::function_ref< bool(unsigned, Stmt *)> Callback, llvm::function_ref< void(OMPLoopTransformationDirective *)> OnTransformationCallback)
Calls the specified callback function for all the loops in CurStmt, from the outermost to the innermo...
unsigned getLoopsNumber() const
Get number of collapsed loops.
void setFinals(ArrayRef< Expr * > A)
void setDependentCounters(ArrayRef< Expr * > A)
void setFinalsConditions(ArrayRef< Expr * > A)
void setInits(ArrayRef< Expr * > A)
static unsigned numLoopChildren(unsigned CollapsedNum, OpenMPDirectiveKind Kind)
Children number.
void setCounters(ArrayRef< Expr * > A)
void setDependentInits(ArrayRef< Expr * > A)
void setUpdates(ArrayRef< Expr * > A)
void setPrivateCounters(ArrayRef< Expr * > A)
This represents '#pragma omp masked' directive.
static OMPMaskedDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
static OMPMaskedDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive.
This represents '#pragma omp masked taskloop' directive.
static OMPMaskedTaskLoopDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel)
Creates directive with a list of Clauses.
static OMPMaskedTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp masked taskloop simd' directive.
static OMPMaskedTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPMaskedTaskLoopSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
This represents '#pragma omp master' directive.
static OMPMasterDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AssociatedStmt)
Creates directive.
static OMPMasterDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
This represents '#pragma omp master taskloop' directive.
static OMPMasterTaskLoopDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel)
Creates directive with a list of Clauses.
static OMPMasterTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp master taskloop simd' directive.
static OMPMasterTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPMasterTaskLoopSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
This represents '#pragma omp ordered' directive.
static OMPOrderedDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive.
static OMPOrderedDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, bool IsStandalone, EmptyShell)
Creates an empty directive.
This represents '#pragma omp parallel' directive.
static OMPParallelDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef, bool HasCancel)
Creates directive with a list of Clauses.
static OMPParallelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for N clauses.
This represents '#pragma omp parallel for' directive.
static OMPParallelForDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, Expr *TaskRedRef, bool HasCancel)
Creates directive with a list of Clauses.
static OMPParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp parallel for simd' directive.
static OMPParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPParallelForSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
This represents '#pragma omp parallel loop' directive.
static OMPParallelGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPParallelGenericLoopDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
This represents '#pragma omp parallel masked' directive.
static OMPParallelMaskedDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPParallelMaskedDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef)
Creates directive with a list of Clauses.
This represents '#pragma omp parallel masked taskloop' directive.
static OMPParallelMaskedTaskLoopDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel)
Creates directive with a list of Clauses.
static OMPParallelMaskedTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp parallel masked taskloop simd' directive.
static OMPParallelMaskedTaskLoopSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPParallelMaskedTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp parallel master' directive.
static OMPParallelMasterDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef)
Creates directive with a list of Clauses.
static OMPParallelMasterDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp parallel master taskloop' directive.
static OMPParallelMasterTaskLoopDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel)
Creates directive with a list of Clauses.
static OMPParallelMasterTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp parallel master taskloop simd' directive.
static OMPParallelMasterTaskLoopSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPParallelMasterTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp parallel sections' directive.
static OMPParallelSectionsDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef, bool HasCancel)
Creates directive with a list of Clauses.
static OMPParallelSectionsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Represents the '#pragma omp reverse' loop transformation directive.
static OMPReverseDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AssociatedStmt, unsigned NumLoops, Stmt *TransformedStmt, Stmt *PreInits)
Create a new AST node representation for '#pragma omp reverse'.
static OMPReverseDirective * CreateEmpty(const ASTContext &C, unsigned NumLoops)
Build an empty '#pragma omp reverse' AST node for deserialization.
This represents '#pragma omp scan' directive.
static OMPScanDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPScanDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses)
Creates directive with a list of Clauses.
This represents '#pragma omp scope' directive.
static OMPScopeDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive.
static OMPScopeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
This represents '#pragma omp section' directive.
static OMPSectionDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
void setHasCancel(bool Has)
Set cancel state.
static OMPSectionDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AssociatedStmt, bool HasCancel)
Creates directive.
This represents '#pragma omp sections' directive.
static OMPSectionsDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef, bool HasCancel)
Creates directive with a list of Clauses.
static OMPSectionsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp simd' directive.
static OMPSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp single' directive.
static OMPSingleDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
static OMPSingleDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents the '#pragma omp stripe' loop transformation directive.
static OMPStripeDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, unsigned NumLoops, Stmt *AssociatedStmt, Stmt *TransformedStmt, Stmt *PreInits)
Create a new AST node representation for '#pragma omp stripe'.
static OMPStripeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned NumLoops)
Build an empty '#pragma omp stripe' AST node for deserialization.
This represents '#pragma omp target data' directive.
static OMPTargetDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
static OMPTargetDataDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
This represents '#pragma omp target' directive.
static OMPTargetDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
static OMPTargetDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target enter data' directive.
static OMPTargetEnterDataDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
static OMPTargetEnterDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
This represents '#pragma omp target exit data' directive.
static OMPTargetExitDataDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
static OMPTargetExitDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
This represents '#pragma omp target parallel' directive.
static OMPTargetParallelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTargetParallelDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef, bool HasCancel)
Creates directive with a list of Clauses.
This represents '#pragma omp target parallel for' directive.
static OMPTargetParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTargetParallelForDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, Expr *TaskRedRef, bool HasCancel)
Creates directive with a list of Clauses.
This represents '#pragma omp target parallel for simd' directive.
static OMPTargetParallelForSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPTargetParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target parallel loop' directive.
static OMPTargetParallelGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTargetParallelGenericLoopDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
This represents '#pragma omp target simd' directive.
static OMPTargetSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPTargetSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target teams' directive.
static OMPTargetTeamsDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
static OMPTargetTeamsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target teams distribute' combined directive.
static OMPTargetTeamsDistributeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTargetTeamsDistributeDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
This represents '#pragma omp target teams distribute parallel for' combined directive.
static OMPTargetTeamsDistributeParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTargetTeamsDistributeParallelForDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, Expr *TaskRedRef, bool HasCancel)
Creates directive with a list of Clauses.
This represents '#pragma omp target teams distribute parallel for simd' combined directive.
static OMPTargetTeamsDistributeParallelForSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPTargetTeamsDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target teams distribute simd' combined directive.
static OMPTargetTeamsDistributeSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPTargetTeamsDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target teams loop' directive.
static OMPTargetTeamsGenericLoopDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, bool CanBeParallelFor)
Creates directive with a list of Clauses.
static OMPTargetTeamsGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target update' directive.
static OMPTargetUpdateDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTargetUpdateDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
This represents '#pragma omp task' directive.
static OMPTaskDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTaskDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, bool HasCancel)
Creates directive with a list of Clauses.
This represents '#pragma omp taskloop' directive.
static OMPTaskLoopDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel)
Creates directive with a list of Clauses.
static OMPTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp taskloop simd' directive.
static OMPTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTaskLoopSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
This represents '#pragma omp taskgroup' directive.
static OMPTaskgroupDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, Expr *ReductionRef)
Creates directive.
static OMPTaskgroupDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
This represents '#pragma omp taskwait' directive.
static OMPTaskwaitDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
static OMPTaskwaitDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses)
Creates directive.
This represents '#pragma omp taskyield' directive.
static OMPTaskyieldDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
static OMPTaskyieldDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc)
Creates directive.
This represents '#pragma omp teams' directive.
static OMPTeamsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTeamsDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
This represents '#pragma omp teams distribute' directive.
static OMPTeamsDistributeDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPTeamsDistributeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp teams distribute parallel for' composite directive.
static OMPTeamsDistributeParallelForDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, Expr *TaskRedRef, bool HasCancel)
Creates directive with a list of Clauses.
static OMPTeamsDistributeParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp teams distribute parallel for simd' composite directive.
static OMPTeamsDistributeParallelForSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPTeamsDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp teams distribute simd' combined directive.
static OMPTeamsDistributeSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPTeamsDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp teams loop' directive.
static OMPTeamsGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTeamsGenericLoopDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
This represents the '#pragma omp tile' loop transformation directive.
static OMPTileDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned NumLoops)
Build an empty '#pragma omp tile' AST node for deserialization.
static OMPTileDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, unsigned NumLoops, Stmt *AssociatedStmt, Stmt *TransformedStmt, Stmt *PreInits)
Create a new AST node representation for '#pragma omp tile'.
This represents the '#pragma omp unroll' loop transformation directive.
static OMPUnrollDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, unsigned NumGeneratedLoops, Stmt *TransformedStmt, Stmt *PreInits)
Create a new AST node representation for '#pragma omp unroll'.
static OMPUnrollDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses)
Build an empty '#pragma omp unroll' AST node for deserialization.
Encodes a location in the source.
Stmt - This represents one statement.
StmtClass getStmtClass() const
Stmt * IgnoreContainers(bool IgnoreCaptured=false)
Skip no-op (attributed, compound) container stmts and skip captured stmt at the top,...
The JSON file list parser is used to communicate input to InstallAPI.
llvm::omp::Directive OpenMPDirectiveKind
OpenMP directives.
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspon...
Expr * E
'expr' part of the associated expression/statement.
Expr * D
'd' part of the associated expression/statement.
Expr * UE
UE Helper expression of the form: 'OpaqueValueExpr(x) binop OpaqueValueExpr(expr)' or 'OpaqueValueExp...
bool IsFailOnly
True if 'v' is updated only when the condition is false (compare capture only).
Expr * X
'x' part of the associated expression/statement.
Expr * Cond
Conditional expression in atomic compare construct.
Expr * V
'v' part of the associated expression/statement.
bool IsPostfixUpdate
True if original value of 'x' must be stored in 'v', not an updated one.
bool IsXLHSInRHSPart
True if UE has the first form and false if the second.
Expr * ParForInDistCond
'omp parallel for' loop condition used when composed with 'omp distribute' in the same construct and ...
Expr * LB
DistributeLowerBound - used when composing 'omp distribute' with 'omp for' in a same construct.
Expr * Init
Distribute loop iteration variable init used when composing 'omp distribute' with 'omp for' in a same...
Expr * NUB
Update of UpperBound for statically scheduled omp loops for outer loop in combined constructs (e....
Expr * EUB
DistributeEnsureUpperBound - used when composing 'omp distribute' with 'omp for' in a same construct,...
Expr * UB
DistributeUpperBound - used when composing 'omp distribute' with 'omp for' in a same construct.
Expr * NLB
Update of LowerBound for statically scheduled omp loops for outer loop in combined constructs (e....
Expr * DistCond
Distribute Loop condition used when composing 'omp distribute' with 'omp for' in a same construct whe...
Expr * Cond
Distribute Loop condition used when composing 'omp distribute' with 'omp for' in a same construct.
The expressions built for the OpenMP loop CodeGen for the whole collapsed loop nest.
Expr * LastIteration
Loop last iteration number.
Expr * Cond
Loop condition.
SmallVector< Expr *, 4 > DependentInits
List of initializers required for the generation of the non-rectangular loops.
SmallVector< Expr *, 4 > Inits
Expressions for loop counters inits for CodeGen.
Expr * PrevEUB
PrevEUB - expression similar to EUB but to be used when loop scheduling uses PrevLB and PrevUB (e....
Expr * DistInc
DistInc - increment expression for distribute loop when found combined with a further loop level (e....
Expr * IL
IsLastIteration - local flag variable passed to runtime.
SmallVector< Expr *, 4 > PrivateCounters
PrivateCounters Loop counters.
Expr * CalcLastIteration
Calculation of last iteration.
SmallVector< Expr *, 4 > Updates
Expressions for loop counters update for CodeGen.
Expr * ST
Stride - local variable passed to runtime.
SmallVector< Expr *, 4 > Finals
Final loop counter values for GodeGen.
SmallVector< Expr *, 4 > FinalsConditions
List of final conditions required for the generation of the non-rectangular loops.
Expr * PreCond
Loop pre-condition.
Stmt * PreInits
Init statement for all captured expressions.
Expr * IterationVarRef
Loop iteration variable.
Expr * NumIterations
Loop number of iterations.
SmallVector< Expr *, 4 > Counters
Counters Loop counters.
Expr * NLB
Update of LowerBound for statically scheduled 'omp for' loops.
Expr * PrevUB
PreviousUpperBound - local variable passed to runtime in the enclosing schedule or null if that does ...
DistCombinedHelperExprs DistCombinedFields
Expressions used when combining OpenMP loop pragmas.
Expr * Inc
Loop increment.
Expr * EUB
EnsureUpperBound – expression UB = min(UB, NumIterations).
Expr * UB
UpperBound - local variable passed to runtime.
Expr * NUB
Update of UpperBound for statically scheduled 'omp for' loops.
Expr * LB
LowerBound - local variable passed to runtime.
Expr * PrevLB
PreviousLowerBound - local variable passed to runtime in the enclosing schedule or null if that does ...
SmallVector< Expr *, 4 > DependentCounters
List of counters required for the generation of the non-rectangular loops.
Expr * Init
Loop iteration variable init.
A placeholder type used to construct an empty shell of a type, that will be filled in later (e....