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 *>());
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 Stmt *AssociatedStmt,
unsigned NumGeneratedLoops,
432 Stmt *TransformedStmt,
Stmt *PreInits) {
433 assert(NumGeneratedLoops <= 1 &&
"Unrolling generates at most one loop");
435 auto *Dir = createDirective<OMPUnrollDirective>(
436 C, Clauses, AssociatedStmt, TransformedStmtOffset + 1, StartLoc, EndLoc);
437 Dir->setNumGeneratedLoops(NumGeneratedLoops);
438 Dir->setTransformedStmt(TransformedStmt);
439 Dir->setPreInits(PreInits);
444 unsigned NumClauses) {
445 return createEmptyDirective<OMPUnrollDirective>(
446 C, NumClauses,
true, TransformedStmtOffset + 1,
453 Stmt *TransformedStmt,
Stmt *PreInits) {
455 C, std::nullopt, AssociatedStmt, TransformedStmtOffset + 1, StartLoc,
457 Dir->setTransformedStmt(TransformedStmt);
458 Dir->setPreInits(PreInits);
463 return createEmptyDirective<OMPReverseDirective>(
471 Stmt *TransformedStmt,
Stmt *PreInits) {
473 C, Clauses, AssociatedStmt, TransformedStmtOffset + 1, StartLoc, EndLoc,
475 Dir->setTransformedStmt(TransformedStmt);
476 Dir->setPreInits(PreInits);
483 return createEmptyDirective<OMPInterchangeDirective>(
484 C, NumClauses,
true, TransformedStmtOffset + 1,
493 auto *Dir = createDirective<OMPForSimdDirective>(
495 StartLoc, EndLoc, CollapsedNum);
499 Dir->setPreCond(Exprs.
PreCond);
500 Dir->setCond(Exprs.
Cond);
501 Dir->setInit(Exprs.
Init);
502 Dir->setInc(Exprs.
Inc);
503 Dir->setIsLastIterVariable(Exprs.
IL);
504 Dir->setLowerBoundVariable(Exprs.
LB);
505 Dir->setUpperBoundVariable(Exprs.
UB);
506 Dir->setStrideVariable(Exprs.
ST);
507 Dir->setEnsureUpperBound(Exprs.
EUB);
508 Dir->setNextLowerBound(Exprs.
NLB);
509 Dir->setNextUpperBound(Exprs.
NUB);
513 Dir->setInits(Exprs.
Inits);
514 Dir->setUpdates(Exprs.
Updates);
515 Dir->setFinals(Exprs.
Finals);
525 unsigned CollapsedNum,
527 return createEmptyDirective<OMPForSimdDirective>(
536 auto *Dir = createDirective<OMPSectionsDirective>(
C, Clauses, AssociatedStmt,
539 Dir->setTaskReductionRefExpr(TaskRedRef);
540 Dir->setHasCancel(HasCancel);
547 return createEmptyDirective<OMPSectionsDirective>(
C, NumClauses,
555 Stmt *AssociatedStmt,
558 createDirective<OMPSectionDirective>(
C, std::nullopt, AssociatedStmt,
559 0, StartLoc, EndLoc);
560 Dir->setHasCancel(HasCancel);
566 return createEmptyDirective<OMPSectionDirective>(
C, 0,
574 Stmt *AssociatedStmt) {
575 return createDirective<OMPScopeDirective>(
C, Clauses, AssociatedStmt,
583 return createEmptyDirective<OMPScopeDirective>(
C, NumClauses,
591 Stmt *AssociatedStmt) {
592 return createDirective<OMPSingleDirective>(
C, Clauses, AssociatedStmt,
600 return createEmptyDirective<OMPSingleDirective>(
C, NumClauses,
607 Stmt *AssociatedStmt) {
608 return createDirective<OMPMasterDirective>(
C, std::nullopt, AssociatedStmt,
615 return createEmptyDirective<OMPMasterDirective>(
C, 0,
623 return createDirective<OMPCriticalDirective>(
C, Clauses, AssociatedStmt,
631 return createEmptyDirective<OMPCriticalDirective>(
C, NumClauses,
639 auto *Dir = createDirective<OMPParallelForDirective>(
640 C, Clauses, AssociatedStmt,
641 numLoopChildren(CollapsedNum, OMPD_parallel_for) + 1, StartLoc, EndLoc,
646 Dir->setPreCond(Exprs.
PreCond);
647 Dir->setCond(Exprs.
Cond);
648 Dir->setInit(Exprs.
Init);
649 Dir->setInc(Exprs.
Inc);
650 Dir->setIsLastIterVariable(Exprs.
IL);
651 Dir->setLowerBoundVariable(Exprs.
LB);
652 Dir->setUpperBoundVariable(Exprs.
UB);
653 Dir->setStrideVariable(Exprs.
ST);
654 Dir->setEnsureUpperBound(Exprs.
EUB);
655 Dir->setNextLowerBound(Exprs.
NLB);
656 Dir->setNextUpperBound(Exprs.
NUB);
660 Dir->setInits(Exprs.
Inits);
661 Dir->setUpdates(Exprs.
Updates);
662 Dir->setFinals(Exprs.
Finals);
667 Dir->setTaskReductionRefExpr(TaskRedRef);
668 Dir->setHasCancel(HasCancel);
675 return createEmptyDirective<OMPParallelForDirective>(
684 auto *Dir = createDirective<OMPParallelForSimdDirective>(
685 C, Clauses, AssociatedStmt,
686 numLoopChildren(CollapsedNum, OMPD_parallel_for_simd), StartLoc, EndLoc,
691 Dir->setPreCond(Exprs.
PreCond);
692 Dir->setCond(Exprs.
Cond);
693 Dir->setInit(Exprs.
Init);
694 Dir->setInc(Exprs.
Inc);
695 Dir->setIsLastIterVariable(Exprs.
IL);
696 Dir->setLowerBoundVariable(Exprs.
LB);
697 Dir->setUpperBoundVariable(Exprs.
UB);
698 Dir->setStrideVariable(Exprs.
ST);
699 Dir->setEnsureUpperBound(Exprs.
EUB);
700 Dir->setNextLowerBound(Exprs.
NLB);
701 Dir->setNextUpperBound(Exprs.
NUB);
705 Dir->setInits(Exprs.
Inits);
706 Dir->setUpdates(Exprs.
Updates);
707 Dir->setFinals(Exprs.
Finals);
719 return createEmptyDirective<OMPParallelForSimdDirective>(
727 auto *Dir = createDirective<OMPParallelMasterDirective>(
728 C, Clauses, AssociatedStmt, 1, StartLoc, EndLoc);
729 Dir->setTaskReductionRefExpr(TaskRedRef);
736 return createEmptyDirective<OMPParallelMasterDirective>(
737 C, NumClauses,
true, 1);
743 auto *Dir = createDirective<OMPParallelMaskedDirective>(
744 C, Clauses, AssociatedStmt, 1, StartLoc, EndLoc);
745 Dir->setTaskReductionRefExpr(TaskRedRef);
752 return createEmptyDirective<OMPParallelMaskedDirective>(
753 C, NumClauses,
true, 1);
760 auto *Dir = createDirective<OMPParallelSectionsDirective>(
761 C, Clauses, AssociatedStmt, 1, StartLoc, EndLoc);
762 Dir->setTaskReductionRefExpr(TaskRedRef);
763 Dir->setHasCancel(HasCancel);
770 return createEmptyDirective<OMPParallelSectionsDirective>(
771 C, NumClauses,
true, 1);
777 Stmt *AssociatedStmt,
bool HasCancel) {
778 auto *Dir = createDirective<OMPTaskDirective>(
779 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
780 Dir->setHasCancel(HasCancel);
787 return createEmptyDirective<OMPTaskDirective>(
C, NumClauses,
806 return createDirective<OMPErrorDirective>(
807 C, Clauses,
nullptr, 0, StartLoc,
814 return createEmptyDirective<OMPErrorDirective>(
C, NumClauses);
832 return createDirective<OMPTaskwaitDirective>(
833 C, Clauses,
nullptr, 0, StartLoc,
840 return createEmptyDirective<OMPTaskwaitDirective>(
C, NumClauses);
846 auto *Dir = createDirective<OMPTaskgroupDirective>(
847 C, Clauses, AssociatedStmt, 1, StartLoc, EndLoc);
848 Dir->setReductionRef(ReductionRef);
855 return createEmptyDirective<OMPTaskgroupDirective>(
856 C, NumClauses,
true, 1);
863 Dir->setCancelRegion(CancelRegion);
876 auto *Dir = createDirective<OMPCancelDirective>(
877 C, Clauses,
nullptr, 0, StartLoc,
879 Dir->setCancelRegion(CancelRegion);
886 return createEmptyDirective<OMPCancelDirective>(
C, NumClauses);
893 return createDirective<OMPFlushDirective>(
894 C, Clauses,
nullptr, 0, StartLoc,
901 return createEmptyDirective<OMPFlushDirective>(
C, NumClauses);
908 return createDirective<OMPDepobjDirective>(
910 0, StartLoc, EndLoc);
916 return createEmptyDirective<OMPDepobjDirective>(
C, NumClauses);
923 return createDirective<OMPScanDirective>(
C, Clauses,
925 0, StartLoc, EndLoc);
931 return createEmptyDirective<OMPScanDirective>(
C, NumClauses);
938 Stmt *AssociatedStmt) {
939 return createDirective<OMPOrderedDirective>(
940 C, Clauses, cast_or_null<CapturedStmt>(AssociatedStmt),
941 0, StartLoc, EndLoc);
948 return createEmptyDirective<OMPOrderedDirective>(
C, NumClauses,
956 auto *Dir = createDirective<OMPAtomicDirective>(
957 C, Clauses, AssociatedStmt, 7, StartLoc, EndLoc);
961 Dir->setExpr(Exprs.
E);
962 Dir->setUpdateExpr(Exprs.
UE);
964 Dir->setCond(Exprs.
Cond);
967 Dir->Flags.IsFailOnly = Exprs.
IsFailOnly ? 1 : 0;
974 return createEmptyDirective<OMPAtomicDirective>(
975 C, NumClauses,
true, 7);
982 Stmt *AssociatedStmt) {
983 return createDirective<OMPTargetDirective>(
984 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
990 return createEmptyDirective<OMPTargetDirective>(
C, NumClauses,
998 auto *Dir = createDirective<OMPTargetParallelDirective>(
999 C, Clauses, AssociatedStmt, 1, StartLoc, EndLoc);
1000 Dir->setTaskReductionRefExpr(TaskRedRef);
1001 Dir->setHasCancel(HasCancel);
1008 return createEmptyDirective<OMPTargetParallelDirective>(
1009 C, NumClauses,
true, 1);
1016 auto *Dir = createDirective<OMPTargetParallelForDirective>(
1017 C, Clauses, AssociatedStmt,
1018 numLoopChildren(CollapsedNum, OMPD_target_parallel_for) + 1, StartLoc,
1019 EndLoc, CollapsedNum);
1023 Dir->setPreCond(Exprs.
PreCond);
1024 Dir->setCond(Exprs.
Cond);
1025 Dir->setInit(Exprs.
Init);
1026 Dir->setInc(Exprs.
Inc);
1027 Dir->setIsLastIterVariable(Exprs.
IL);
1028 Dir->setLowerBoundVariable(Exprs.
LB);
1029 Dir->setUpperBoundVariable(Exprs.
UB);
1030 Dir->setStrideVariable(Exprs.
ST);
1031 Dir->setEnsureUpperBound(Exprs.
EUB);
1032 Dir->setNextLowerBound(Exprs.
NLB);
1033 Dir->setNextUpperBound(Exprs.
NUB);
1037 Dir->setInits(Exprs.
Inits);
1038 Dir->setUpdates(Exprs.
Updates);
1039 Dir->setFinals(Exprs.
Finals);
1044 Dir->setTaskReductionRefExpr(TaskRedRef);
1045 Dir->setHasCancel(HasCancel);
1051 unsigned NumClauses,
1053 return createEmptyDirective<OMPTargetParallelForDirective>(
1054 C, NumClauses,
true,
1062 return createDirective<OMPTargetDataDirective>(
1063 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
1069 return createEmptyDirective<OMPTargetDataDirective>(
1076 return createDirective<OMPTargetEnterDataDirective>(
1077 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
1083 return createEmptyDirective<OMPTargetEnterDataDirective>(
1090 return createDirective<OMPTargetExitDataDirective>(
1091 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
1097 return createEmptyDirective<OMPTargetExitDataDirective>(
1105 Stmt *AssociatedStmt) {
1106 return createDirective<OMPTeamsDirective>(
1107 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
1111 unsigned NumClauses,
1113 return createEmptyDirective<OMPTeamsDirective>(
C, NumClauses,
1121 auto *Dir = createDirective<OMPTaskLoopDirective>(
1123 StartLoc, EndLoc, CollapsedNum);
1127 Dir->setPreCond(Exprs.
PreCond);
1128 Dir->setCond(Exprs.
Cond);
1129 Dir->setInit(Exprs.
Init);
1130 Dir->setInc(Exprs.
Inc);
1131 Dir->setIsLastIterVariable(Exprs.
IL);
1132 Dir->setLowerBoundVariable(Exprs.
LB);
1133 Dir->setUpperBoundVariable(Exprs.
UB);
1134 Dir->setStrideVariable(Exprs.
ST);
1135 Dir->setEnsureUpperBound(Exprs.
EUB);
1136 Dir->setNextLowerBound(Exprs.
NLB);
1137 Dir->setNextUpperBound(Exprs.
NUB);
1141 Dir->setInits(Exprs.
Inits);
1142 Dir->setUpdates(Exprs.
Updates);
1143 Dir->setFinals(Exprs.
Finals);
1148 Dir->setHasCancel(HasCancel);
1153 unsigned NumClauses,
1154 unsigned CollapsedNum,
1156 return createEmptyDirective<OMPTaskLoopDirective>(
1157 C, NumClauses,
true,
1165 auto *Dir = createDirective<OMPTaskLoopSimdDirective>(
1166 C, Clauses, AssociatedStmt,
1172 Dir->setPreCond(Exprs.
PreCond);
1173 Dir->setCond(Exprs.
Cond);
1174 Dir->setInit(Exprs.
Init);
1175 Dir->setInc(Exprs.
Inc);
1176 Dir->setIsLastIterVariable(Exprs.
IL);
1177 Dir->setLowerBoundVariable(Exprs.
LB);
1178 Dir->setUpperBoundVariable(Exprs.
UB);
1179 Dir->setStrideVariable(Exprs.
ST);
1180 Dir->setEnsureUpperBound(Exprs.
EUB);
1181 Dir->setNextLowerBound(Exprs.
NLB);
1182 Dir->setNextUpperBound(Exprs.
NUB);
1186 Dir->setInits(Exprs.
Inits);
1187 Dir->setUpdates(Exprs.
Updates);
1188 Dir->setFinals(Exprs.
Finals);
1199 return createEmptyDirective<OMPTaskLoopSimdDirective>(
1200 C, NumClauses,
true,
1208 auto *Dir = createDirective<OMPMasterTaskLoopDirective>(
1209 C, Clauses, AssociatedStmt,
1210 numLoopChildren(CollapsedNum, OMPD_master_taskloop), StartLoc, EndLoc,
1215 Dir->setPreCond(Exprs.
PreCond);
1216 Dir->setCond(Exprs.
Cond);
1217 Dir->setInit(Exprs.
Init);
1218 Dir->setInc(Exprs.
Inc);
1219 Dir->setIsLastIterVariable(Exprs.
IL);
1220 Dir->setLowerBoundVariable(Exprs.
LB);
1221 Dir->setUpperBoundVariable(Exprs.
UB);
1222 Dir->setStrideVariable(Exprs.
ST);
1223 Dir->setEnsureUpperBound(Exprs.
EUB);
1224 Dir->setNextLowerBound(Exprs.
NLB);
1225 Dir->setNextUpperBound(Exprs.
NUB);
1229 Dir->setInits(Exprs.
Inits);
1230 Dir->setUpdates(Exprs.
Updates);
1231 Dir->setFinals(Exprs.
Finals);
1236 Dir->setHasCancel(HasCancel);
1242 unsigned NumClauses,
1244 return createEmptyDirective<OMPMasterTaskLoopDirective>(
1245 C, NumClauses,
true,
1253 auto *Dir = createDirective<OMPMaskedTaskLoopDirective>(
1254 C, Clauses, AssociatedStmt,
1255 numLoopChildren(CollapsedNum, OMPD_masked_taskloop), StartLoc, EndLoc,
1260 Dir->setPreCond(Exprs.
PreCond);
1261 Dir->setCond(Exprs.
Cond);
1262 Dir->setInit(Exprs.
Init);
1263 Dir->setInc(Exprs.
Inc);
1264 Dir->setIsLastIterVariable(Exprs.
IL);
1265 Dir->setLowerBoundVariable(Exprs.
LB);
1266 Dir->setUpperBoundVariable(Exprs.
UB);
1267 Dir->setStrideVariable(Exprs.
ST);
1268 Dir->setEnsureUpperBound(Exprs.
EUB);
1269 Dir->setNextLowerBound(Exprs.
NLB);
1270 Dir->setNextUpperBound(Exprs.
NUB);
1274 Dir->setInits(Exprs.
Inits);
1275 Dir->setUpdates(Exprs.
Updates);
1276 Dir->setFinals(Exprs.
Finals);
1281 Dir->setHasCancel(HasCancel);
1287 unsigned NumClauses,
1289 return createEmptyDirective<OMPMaskedTaskLoopDirective>(
1290 C, NumClauses,
true,
1298 auto *Dir = createDirective<OMPMasterTaskLoopSimdDirective>(
1299 C, Clauses, AssociatedStmt,
1301 EndLoc, CollapsedNum);
1305 Dir->setPreCond(Exprs.
PreCond);
1306 Dir->setCond(Exprs.
Cond);
1307 Dir->setInit(Exprs.
Init);
1308 Dir->setInc(Exprs.
Inc);
1309 Dir->setIsLastIterVariable(Exprs.
IL);
1310 Dir->setLowerBoundVariable(Exprs.
LB);
1311 Dir->setUpperBoundVariable(Exprs.
UB);
1312 Dir->setStrideVariable(Exprs.
ST);
1313 Dir->setEnsureUpperBound(Exprs.
EUB);
1314 Dir->setNextLowerBound(Exprs.
NLB);
1315 Dir->setNextUpperBound(Exprs.
NUB);
1319 Dir->setInits(Exprs.
Inits);
1320 Dir->setUpdates(Exprs.
Updates);
1321 Dir->setFinals(Exprs.
Finals);
1331 unsigned NumClauses,
1333 return createEmptyDirective<OMPMasterTaskLoopSimdDirective>(
1334 C, NumClauses,
true,
1335 numLoopChildren(CollapsedNum, OMPD_master_taskloop_simd), CollapsedNum);
1342 auto *Dir = createDirective<OMPMaskedTaskLoopSimdDirective>(
1343 C, Clauses, AssociatedStmt,
1345 EndLoc, CollapsedNum);
1349 Dir->setPreCond(Exprs.
PreCond);
1350 Dir->setCond(Exprs.
Cond);
1351 Dir->setInit(Exprs.
Init);
1352 Dir->setInc(Exprs.
Inc);
1353 Dir->setIsLastIterVariable(Exprs.
IL);
1354 Dir->setLowerBoundVariable(Exprs.
LB);
1355 Dir->setUpperBoundVariable(Exprs.
UB);
1356 Dir->setStrideVariable(Exprs.
ST);
1357 Dir->setEnsureUpperBound(Exprs.
EUB);
1358 Dir->setNextLowerBound(Exprs.
NLB);
1359 Dir->setNextUpperBound(Exprs.
NUB);
1363 Dir->setInits(Exprs.
Inits);
1364 Dir->setUpdates(Exprs.
Updates);
1365 Dir->setFinals(Exprs.
Finals);
1375 unsigned NumClauses,
1377 return createEmptyDirective<OMPMaskedTaskLoopSimdDirective>(
1378 C, NumClauses,
true,
1379 numLoopChildren(CollapsedNum, OMPD_masked_taskloop_simd), CollapsedNum);
1386 auto *Dir = createDirective<OMPParallelMasterTaskLoopDirective>(
1387 C, Clauses, AssociatedStmt,
1388 numLoopChildren(CollapsedNum, OMPD_parallel_master_taskloop), StartLoc,
1389 EndLoc, CollapsedNum);
1393 Dir->setPreCond(Exprs.
PreCond);
1394 Dir->setCond(Exprs.
Cond);
1395 Dir->setInit(Exprs.
Init);
1396 Dir->setInc(Exprs.
Inc);
1397 Dir->setIsLastIterVariable(Exprs.
IL);
1398 Dir->setLowerBoundVariable(Exprs.
LB);
1399 Dir->setUpperBoundVariable(Exprs.
UB);
1400 Dir->setStrideVariable(Exprs.
ST);
1401 Dir->setEnsureUpperBound(Exprs.
EUB);
1402 Dir->setNextLowerBound(Exprs.
NLB);
1403 Dir->setNextUpperBound(Exprs.
NUB);
1407 Dir->setInits(Exprs.
Inits);
1408 Dir->setUpdates(Exprs.
Updates);
1409 Dir->setFinals(Exprs.
Finals);
1414 Dir->setHasCancel(HasCancel);
1420 unsigned NumClauses,
1421 unsigned CollapsedNum,
1423 return createEmptyDirective<OMPParallelMasterTaskLoopDirective>(
1424 C, NumClauses,
true,
1433 auto *Dir = createDirective<OMPParallelMaskedTaskLoopDirective>(
1434 C, Clauses, AssociatedStmt,
1435 numLoopChildren(CollapsedNum, OMPD_parallel_masked_taskloop), StartLoc,
1436 EndLoc, CollapsedNum);
1440 Dir->setPreCond(Exprs.
PreCond);
1441 Dir->setCond(Exprs.
Cond);
1442 Dir->setInit(Exprs.
Init);
1443 Dir->setInc(Exprs.
Inc);
1444 Dir->setIsLastIterVariable(Exprs.
IL);
1445 Dir->setLowerBoundVariable(Exprs.
LB);
1446 Dir->setUpperBoundVariable(Exprs.
UB);
1447 Dir->setStrideVariable(Exprs.
ST);
1448 Dir->setEnsureUpperBound(Exprs.
EUB);
1449 Dir->setNextLowerBound(Exprs.
NLB);
1450 Dir->setNextUpperBound(Exprs.
NUB);
1454 Dir->setInits(Exprs.
Inits);
1455 Dir->setUpdates(Exprs.
Updates);
1456 Dir->setFinals(Exprs.
Finals);
1461 Dir->setHasCancel(HasCancel);
1467 unsigned NumClauses,
1468 unsigned CollapsedNum,
1470 return createEmptyDirective<OMPParallelMaskedTaskLoopDirective>(
1471 C, NumClauses,
true,
1481 auto *Dir = createDirective<OMPParallelMasterTaskLoopSimdDirective>(
1482 C, Clauses, AssociatedStmt,
1484 StartLoc, EndLoc, CollapsedNum);
1488 Dir->setPreCond(Exprs.
PreCond);
1489 Dir->setCond(Exprs.
Cond);
1490 Dir->setInit(Exprs.
Init);
1491 Dir->setInc(Exprs.
Inc);
1492 Dir->setIsLastIterVariable(Exprs.
IL);
1493 Dir->setLowerBoundVariable(Exprs.
LB);
1494 Dir->setUpperBoundVariable(Exprs.
UB);
1495 Dir->setStrideVariable(Exprs.
ST);
1496 Dir->setEnsureUpperBound(Exprs.
EUB);
1497 Dir->setNextLowerBound(Exprs.
NLB);
1498 Dir->setNextUpperBound(Exprs.
NUB);
1502 Dir->setInits(Exprs.
Inits);
1503 Dir->setUpdates(Exprs.
Updates);
1504 Dir->setFinals(Exprs.
Finals);
1514 unsigned NumClauses,
1515 unsigned CollapsedNum,
1517 return createEmptyDirective<OMPParallelMasterTaskLoopSimdDirective>(
1518 C, NumClauses,
true,
1528 auto *Dir = createDirective<OMPParallelMaskedTaskLoopSimdDirective>(
1529 C, Clauses, AssociatedStmt,
1531 StartLoc, EndLoc, CollapsedNum);
1535 Dir->setPreCond(Exprs.
PreCond);
1536 Dir->setCond(Exprs.
Cond);
1537 Dir->setInit(Exprs.
Init);
1538 Dir->setInc(Exprs.
Inc);
1539 Dir->setIsLastIterVariable(Exprs.
IL);
1540 Dir->setLowerBoundVariable(Exprs.
LB);
1541 Dir->setUpperBoundVariable(Exprs.
UB);
1542 Dir->setStrideVariable(Exprs.
ST);
1543 Dir->setEnsureUpperBound(Exprs.
EUB);
1544 Dir->setNextLowerBound(Exprs.
NLB);
1545 Dir->setNextUpperBound(Exprs.
NUB);
1549 Dir->setInits(Exprs.
Inits);
1550 Dir->setUpdates(Exprs.
Updates);
1551 Dir->setFinals(Exprs.
Finals);
1561 unsigned NumClauses,
1562 unsigned CollapsedNum,
1564 return createEmptyDirective<OMPParallelMaskedTaskLoopSimdDirective>(
1565 C, NumClauses,
true,
1575 auto *Dir = createDirective<OMPDistributeDirective>(
1576 C, Clauses, AssociatedStmt,
1582 Dir->setPreCond(Exprs.
PreCond);
1583 Dir->setCond(Exprs.
Cond);
1584 Dir->setInit(Exprs.
Init);
1585 Dir->setInc(Exprs.
Inc);
1586 Dir->setIsLastIterVariable(Exprs.
IL);
1587 Dir->setLowerBoundVariable(Exprs.
LB);
1588 Dir->setUpperBoundVariable(Exprs.
UB);
1589 Dir->setStrideVariable(Exprs.
ST);
1590 Dir->setEnsureUpperBound(Exprs.
EUB);
1591 Dir->setNextLowerBound(Exprs.
NLB);
1592 Dir->setNextUpperBound(Exprs.
NUB);
1596 Dir->setInits(Exprs.
Inits);
1597 Dir->setUpdates(Exprs.
Updates);
1598 Dir->setFinals(Exprs.
Finals);
1609 return createEmptyDirective<OMPDistributeDirective>(
1610 C, NumClauses,
true,
1617 return createDirective<OMPTargetUpdateDirective>(
C, Clauses, AssociatedStmt,
1625 return createEmptyDirective<OMPTargetUpdateDirective>(
1626 C, NumClauses,
true);
1633 auto *Dir = createDirective<OMPDistributeParallelForDirective>(
1634 C, Clauses, AssociatedStmt,
1635 numLoopChildren(CollapsedNum, OMPD_distribute_parallel_for) + 1, StartLoc,
1636 EndLoc, CollapsedNum);
1640 Dir->setPreCond(Exprs.
PreCond);
1641 Dir->setCond(Exprs.
Cond);
1642 Dir->setInit(Exprs.
Init);
1643 Dir->setInc(Exprs.
Inc);
1644 Dir->setIsLastIterVariable(Exprs.
IL);
1645 Dir->setLowerBoundVariable(Exprs.
LB);
1646 Dir->setUpperBoundVariable(Exprs.
UB);
1647 Dir->setStrideVariable(Exprs.
ST);
1648 Dir->setEnsureUpperBound(Exprs.
EUB);
1649 Dir->setNextLowerBound(Exprs.
NLB);
1650 Dir->setNextUpperBound(Exprs.
NUB);
1652 Dir->setPrevLowerBoundVariable(Exprs.
PrevLB);
1653 Dir->setPrevUpperBoundVariable(Exprs.
PrevUB);
1654 Dir->setDistInc(Exprs.
DistInc);
1655 Dir->setPrevEnsureUpperBound(Exprs.
PrevEUB);
1658 Dir->setInits(Exprs.
Inits);
1659 Dir->setUpdates(Exprs.
Updates);
1660 Dir->setFinals(Exprs.
Finals);
1674 Dir->setTaskReductionRefExpr(TaskRedRef);
1675 Dir->HasCancel = HasCancel;
1681 unsigned NumClauses,
1682 unsigned CollapsedNum,
1684 return createEmptyDirective<OMPDistributeParallelForDirective>(
1685 C, NumClauses,
true,
1695 auto *Dir = createDirective<OMPDistributeParallelForSimdDirective>(
1696 C, Clauses, AssociatedStmt,
1698 StartLoc, EndLoc, CollapsedNum);
1702 Dir->setPreCond(Exprs.
PreCond);
1703 Dir->setCond(Exprs.
Cond);
1704 Dir->setInit(Exprs.
Init);
1705 Dir->setInc(Exprs.
Inc);
1706 Dir->setIsLastIterVariable(Exprs.
IL);
1707 Dir->setLowerBoundVariable(Exprs.
LB);
1708 Dir->setUpperBoundVariable(Exprs.
UB);
1709 Dir->setStrideVariable(Exprs.
ST);
1710 Dir->setEnsureUpperBound(Exprs.
EUB);
1711 Dir->setNextLowerBound(Exprs.
NLB);
1712 Dir->setNextUpperBound(Exprs.
NUB);
1714 Dir->setPrevLowerBoundVariable(Exprs.
PrevLB);
1715 Dir->setPrevUpperBoundVariable(Exprs.
PrevUB);
1716 Dir->setDistInc(Exprs.
DistInc);
1717 Dir->setPrevEnsureUpperBound(Exprs.
PrevEUB);
1720 Dir->setInits(Exprs.
Inits);
1721 Dir->setUpdates(Exprs.
Updates);
1722 Dir->setFinals(Exprs.
Finals);
1741 unsigned NumClauses,
1742 unsigned CollapsedNum,
1744 return createEmptyDirective<OMPDistributeParallelForSimdDirective>(
1745 C, NumClauses,
true,
1754 auto *Dir = createDirective<OMPDistributeSimdDirective>(
1755 C, Clauses, AssociatedStmt,
1756 numLoopChildren(CollapsedNum, OMPD_distribute_simd), StartLoc, EndLoc,
1761 Dir->setPreCond(Exprs.
PreCond);
1762 Dir->setCond(Exprs.
Cond);
1763 Dir->setInit(Exprs.
Init);
1764 Dir->setInc(Exprs.
Inc);
1765 Dir->setIsLastIterVariable(Exprs.
IL);
1766 Dir->setLowerBoundVariable(Exprs.
LB);
1767 Dir->setUpperBoundVariable(Exprs.
UB);
1768 Dir->setStrideVariable(Exprs.
ST);
1769 Dir->setEnsureUpperBound(Exprs.
EUB);
1770 Dir->setNextLowerBound(Exprs.
NLB);
1771 Dir->setNextUpperBound(Exprs.
NUB);
1775 Dir->setInits(Exprs.
Inits);
1776 Dir->setUpdates(Exprs.
Updates);
1777 Dir->setFinals(Exprs.
Finals);
1787 unsigned NumClauses,
1789 return createEmptyDirective<OMPDistributeSimdDirective>(
1790 C, NumClauses,
true,
1798 auto *Dir = createDirective<OMPTargetParallelForSimdDirective>(
1799 C, Clauses, AssociatedStmt,
1800 numLoopChildren(CollapsedNum, OMPD_target_parallel_for_simd), StartLoc,
1801 EndLoc, CollapsedNum);
1805 Dir->setPreCond(Exprs.
PreCond);
1806 Dir->setCond(Exprs.
Cond);
1807 Dir->setInit(Exprs.
Init);
1808 Dir->setInc(Exprs.
Inc);
1809 Dir->setIsLastIterVariable(Exprs.
IL);
1810 Dir->setLowerBoundVariable(Exprs.
LB);
1811 Dir->setUpperBoundVariable(Exprs.
UB);
1812 Dir->setStrideVariable(Exprs.
ST);
1813 Dir->setEnsureUpperBound(Exprs.
EUB);
1814 Dir->setNextLowerBound(Exprs.
NLB);
1815 Dir->setNextUpperBound(Exprs.
NUB);
1819 Dir->setInits(Exprs.
Inits);
1820 Dir->setUpdates(Exprs.
Updates);
1821 Dir->setFinals(Exprs.
Finals);
1831 unsigned NumClauses,
1832 unsigned CollapsedNum,
1834 return createEmptyDirective<OMPTargetParallelForSimdDirective>(
1835 C, NumClauses,
true,
1845 auto *Dir = createDirective<OMPTargetSimdDirective>(
1846 C, Clauses, AssociatedStmt,
1852 Dir->setPreCond(Exprs.
PreCond);
1853 Dir->setCond(Exprs.
Cond);
1854 Dir->setInit(Exprs.
Init);
1855 Dir->setInc(Exprs.
Inc);
1858 Dir->setInits(Exprs.
Inits);
1859 Dir->setUpdates(Exprs.
Updates);
1860 Dir->setFinals(Exprs.
Finals);
1871 return createEmptyDirective<OMPTargetSimdDirective>(
1872 C, NumClauses,
true,
1880 auto *Dir = createDirective<OMPTeamsDistributeDirective>(
1881 C, Clauses, AssociatedStmt,
1882 numLoopChildren(CollapsedNum, OMPD_teams_distribute), StartLoc, EndLoc,
1887 Dir->setPreCond(Exprs.
PreCond);
1888 Dir->setCond(Exprs.
Cond);
1889 Dir->setInit(Exprs.
Init);
1890 Dir->setInc(Exprs.
Inc);
1891 Dir->setIsLastIterVariable(Exprs.
IL);
1892 Dir->setLowerBoundVariable(Exprs.
LB);
1893 Dir->setUpperBoundVariable(Exprs.
UB);
1894 Dir->setStrideVariable(Exprs.
ST);
1895 Dir->setEnsureUpperBound(Exprs.
EUB);
1896 Dir->setNextLowerBound(Exprs.
NLB);
1897 Dir->setNextUpperBound(Exprs.
NUB);
1901 Dir->setInits(Exprs.
Inits);
1902 Dir->setUpdates(Exprs.
Updates);
1903 Dir->setFinals(Exprs.
Finals);
1913 unsigned NumClauses,
1915 return createEmptyDirective<OMPTeamsDistributeDirective>(
1916 C, NumClauses,
true,
1924 auto *Dir = createDirective<OMPTeamsDistributeSimdDirective>(
1925 C, Clauses, AssociatedStmt,
1927 EndLoc, CollapsedNum);
1931 Dir->setPreCond(Exprs.
PreCond);
1932 Dir->setCond(Exprs.
Cond);
1933 Dir->setInit(Exprs.
Init);
1934 Dir->setInc(Exprs.
Inc);
1935 Dir->setIsLastIterVariable(Exprs.
IL);
1936 Dir->setLowerBoundVariable(Exprs.
LB);
1937 Dir->setUpperBoundVariable(Exprs.
UB);
1938 Dir->setStrideVariable(Exprs.
ST);
1939 Dir->setEnsureUpperBound(Exprs.
EUB);
1940 Dir->setNextLowerBound(Exprs.
NLB);
1941 Dir->setNextUpperBound(Exprs.
NUB);
1945 Dir->setInits(Exprs.
Inits);
1946 Dir->setUpdates(Exprs.
Updates);
1947 Dir->setFinals(Exprs.
Finals);
1956 const ASTContext &
C,
unsigned NumClauses,
unsigned CollapsedNum,
1958 return createEmptyDirective<OMPTeamsDistributeSimdDirective>(
1959 C, NumClauses,
true,
1960 numLoopChildren(CollapsedNum, OMPD_teams_distribute_simd), CollapsedNum);
1968 auto *Dir = createDirective<OMPTeamsDistributeParallelForSimdDirective>(
1969 C, Clauses, AssociatedStmt,
1970 numLoopChildren(CollapsedNum, OMPD_teams_distribute_parallel_for_simd),
1971 StartLoc, EndLoc, CollapsedNum);
1975 Dir->setPreCond(Exprs.
PreCond);
1976 Dir->setCond(Exprs.
Cond);
1977 Dir->setInit(Exprs.
Init);
1978 Dir->setInc(Exprs.
Inc);
1979 Dir->setIsLastIterVariable(Exprs.
IL);
1980 Dir->setLowerBoundVariable(Exprs.
LB);
1981 Dir->setUpperBoundVariable(Exprs.
UB);
1982 Dir->setStrideVariable(Exprs.
ST);
1983 Dir->setEnsureUpperBound(Exprs.
EUB);
1984 Dir->setNextLowerBound(Exprs.
NLB);
1985 Dir->setNextUpperBound(Exprs.
NUB);
1987 Dir->setPrevLowerBoundVariable(Exprs.
PrevLB);
1988 Dir->setPrevUpperBoundVariable(Exprs.
PrevUB);
1989 Dir->setDistInc(Exprs.
DistInc);
1990 Dir->setPrevEnsureUpperBound(Exprs.
PrevEUB);
1993 Dir->setInits(Exprs.
Inits);
1994 Dir->setUpdates(Exprs.
Updates);
1995 Dir->setFinals(Exprs.
Finals);
2014 unsigned NumClauses,
2015 unsigned CollapsedNum,
2017 return createEmptyDirective<OMPTeamsDistributeParallelForSimdDirective>(
2018 C, NumClauses,
true,
2019 numLoopChildren(CollapsedNum, OMPD_teams_distribute_parallel_for_simd),
2028 auto *Dir = createDirective<OMPTeamsDistributeParallelForDirective>(
2029 C, Clauses, AssociatedStmt,
2030 numLoopChildren(CollapsedNum, OMPD_teams_distribute_parallel_for) + 1,
2031 StartLoc, EndLoc, CollapsedNum);
2035 Dir->setPreCond(Exprs.
PreCond);
2036 Dir->setCond(Exprs.
Cond);
2037 Dir->setInit(Exprs.
Init);
2038 Dir->setInc(Exprs.
Inc);
2039 Dir->setIsLastIterVariable(Exprs.
IL);
2040 Dir->setLowerBoundVariable(Exprs.
LB);
2041 Dir->setUpperBoundVariable(Exprs.
UB);
2042 Dir->setStrideVariable(Exprs.
ST);
2043 Dir->setEnsureUpperBound(Exprs.
EUB);
2044 Dir->setNextLowerBound(Exprs.
NLB);
2045 Dir->setNextUpperBound(Exprs.
NUB);
2047 Dir->setPrevLowerBoundVariable(Exprs.
PrevLB);
2048 Dir->setPrevUpperBoundVariable(Exprs.
PrevUB);
2049 Dir->setDistInc(Exprs.
DistInc);
2050 Dir->setPrevEnsureUpperBound(Exprs.
PrevEUB);
2053 Dir->setInits(Exprs.
Inits);
2054 Dir->setUpdates(Exprs.
Updates);
2055 Dir->setFinals(Exprs.
Finals);
2069 Dir->setTaskReductionRefExpr(TaskRedRef);
2070 Dir->HasCancel = HasCancel;
2076 unsigned NumClauses,
2077 unsigned CollapsedNum,
2079 return createEmptyDirective<OMPTeamsDistributeParallelForDirective>(
2080 C, NumClauses,
true,
2081 numLoopChildren(CollapsedNum, OMPD_teams_distribute_parallel_for) + 1,
2088 return createDirective<OMPTargetTeamsDirective>(
C, Clauses, AssociatedStmt,
2096 return createEmptyDirective<OMPTargetTeamsDirective>(
2097 C, NumClauses,
true);
2104 auto *Dir = createDirective<OMPTargetTeamsDistributeDirective>(
2105 C, Clauses, AssociatedStmt,
2106 numLoopChildren(CollapsedNum, OMPD_target_teams_distribute), StartLoc,
2107 EndLoc, CollapsedNum);
2111 Dir->setPreCond(Exprs.
PreCond);
2112 Dir->setCond(Exprs.
Cond);
2113 Dir->setInit(Exprs.
Init);
2114 Dir->setInc(Exprs.
Inc);
2115 Dir->setIsLastIterVariable(Exprs.
IL);
2116 Dir->setLowerBoundVariable(Exprs.
LB);
2117 Dir->setUpperBoundVariable(Exprs.
UB);
2118 Dir->setStrideVariable(Exprs.
ST);
2119 Dir->setEnsureUpperBound(Exprs.
EUB);
2120 Dir->setNextLowerBound(Exprs.
NLB);
2121 Dir->setNextUpperBound(Exprs.
NUB);
2125 Dir->setInits(Exprs.
Inits);
2126 Dir->setUpdates(Exprs.
Updates);
2127 Dir->setFinals(Exprs.
Finals);
2137 unsigned NumClauses,
2138 unsigned CollapsedNum,
2140 return createEmptyDirective<OMPTargetTeamsDistributeDirective>(
2141 C, NumClauses,
true,
2151 auto *Dir = createDirective<OMPTargetTeamsDistributeParallelForDirective>(
2152 C, Clauses, AssociatedStmt,
2153 numLoopChildren(CollapsedNum, OMPD_target_teams_distribute_parallel_for) +
2155 StartLoc, EndLoc, CollapsedNum);
2159 Dir->setPreCond(Exprs.
PreCond);
2160 Dir->setCond(Exprs.
Cond);
2161 Dir->setInit(Exprs.
Init);
2162 Dir->setInc(Exprs.
Inc);
2163 Dir->setIsLastIterVariable(Exprs.
IL);
2164 Dir->setLowerBoundVariable(Exprs.
LB);
2165 Dir->setUpperBoundVariable(Exprs.
UB);
2166 Dir->setStrideVariable(Exprs.
ST);
2167 Dir->setEnsureUpperBound(Exprs.
EUB);
2168 Dir->setNextLowerBound(Exprs.
NLB);
2169 Dir->setNextUpperBound(Exprs.
NUB);
2171 Dir->setPrevLowerBoundVariable(Exprs.
PrevLB);
2172 Dir->setPrevUpperBoundVariable(Exprs.
PrevUB);
2173 Dir->setDistInc(Exprs.
DistInc);
2174 Dir->setPrevEnsureUpperBound(Exprs.
PrevEUB);
2177 Dir->setInits(Exprs.
Inits);
2178 Dir->setUpdates(Exprs.
Updates);
2179 Dir->setFinals(Exprs.
Finals);
2193 Dir->setTaskReductionRefExpr(TaskRedRef);
2194 Dir->HasCancel = HasCancel;
2200 unsigned NumClauses,
2201 unsigned CollapsedNum,
2203 return createEmptyDirective<OMPTargetTeamsDistributeParallelForDirective>(
2204 C, NumClauses,
true,
2205 numLoopChildren(CollapsedNum, OMPD_target_teams_distribute_parallel_for) +
2215 auto *Dir = createDirective<OMPTargetTeamsDistributeParallelForSimdDirective>(
2216 C, Clauses, AssociatedStmt,
2218 OMPD_target_teams_distribute_parallel_for_simd),
2219 StartLoc, EndLoc, CollapsedNum);
2223 Dir->setPreCond(Exprs.
PreCond);
2224 Dir->setCond(Exprs.
Cond);
2225 Dir->setInit(Exprs.
Init);
2226 Dir->setInc(Exprs.
Inc);
2227 Dir->setIsLastIterVariable(Exprs.
IL);
2228 Dir->setLowerBoundVariable(Exprs.
LB);
2229 Dir->setUpperBoundVariable(Exprs.
UB);
2230 Dir->setStrideVariable(Exprs.
ST);
2231 Dir->setEnsureUpperBound(Exprs.
EUB);
2232 Dir->setNextLowerBound(Exprs.
NLB);
2233 Dir->setNextUpperBound(Exprs.
NUB);
2235 Dir->setPrevLowerBoundVariable(Exprs.
PrevLB);
2236 Dir->setPrevUpperBoundVariable(Exprs.
PrevUB);
2237 Dir->setDistInc(Exprs.
DistInc);
2238 Dir->setPrevEnsureUpperBound(Exprs.
PrevEUB);
2241 Dir->setInits(Exprs.
Inits);
2242 Dir->setUpdates(Exprs.
Updates);
2243 Dir->setFinals(Exprs.
Finals);
2262 const ASTContext &
C,
unsigned NumClauses,
unsigned CollapsedNum,
2264 return createEmptyDirective<OMPTargetTeamsDistributeParallelForSimdDirective>(
2265 C, NumClauses,
true,
2267 OMPD_target_teams_distribute_parallel_for_simd),
2276 auto *Dir = createDirective<OMPTargetTeamsDistributeSimdDirective>(
2277 C, Clauses, AssociatedStmt,
2279 StartLoc, EndLoc, CollapsedNum);
2283 Dir->setPreCond(Exprs.
PreCond);
2284 Dir->setCond(Exprs.
Cond);
2285 Dir->setInit(Exprs.
Init);
2286 Dir->setInc(Exprs.
Inc);
2287 Dir->setIsLastIterVariable(Exprs.
IL);
2288 Dir->setLowerBoundVariable(Exprs.
LB);
2289 Dir->setUpperBoundVariable(Exprs.
UB);
2290 Dir->setStrideVariable(Exprs.
ST);
2291 Dir->setEnsureUpperBound(Exprs.
EUB);
2292 Dir->setNextLowerBound(Exprs.
NLB);
2293 Dir->setNextUpperBound(Exprs.
NUB);
2297 Dir->setInits(Exprs.
Inits);
2298 Dir->setUpdates(Exprs.
Updates);
2299 Dir->setFinals(Exprs.
Finals);
2309 unsigned NumClauses,
2310 unsigned CollapsedNum,
2312 return createEmptyDirective<OMPTargetTeamsDistributeSimdDirective>(
2313 C, NumClauses,
true,
2322 return createDirective<OMPInteropDirective>(
2323 C, Clauses,
nullptr, 0, StartLoc,
2328 unsigned NumClauses,
2330 return createEmptyDirective<OMPInteropDirective>(
C, NumClauses);
2337 auto *Dir = createDirective<OMPDispatchDirective>(
2338 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
2339 Dir->setTargetCallLoc(TargetCallLoc);
2344 unsigned NumClauses,
2346 return createEmptyDirective<OMPDispatchDirective>(
C, NumClauses,
2355 Stmt *AssociatedStmt) {
2356 return createDirective<OMPMaskedDirective>(
C, Clauses, AssociatedStmt,
2362 unsigned NumClauses,
2364 return createEmptyDirective<OMPMaskedDirective>(
C, NumClauses,
2372 auto *Dir = createDirective<OMPGenericLoopDirective>(
2374 StartLoc, EndLoc, CollapsedNum);
2378 Dir->setPreCond(Exprs.
PreCond);
2379 Dir->setCond(Exprs.
Cond);
2380 Dir->setInit(Exprs.
Init);
2381 Dir->setInc(Exprs.
Inc);
2382 Dir->setIsLastIterVariable(Exprs.
IL);
2383 Dir->setLowerBoundVariable(Exprs.
LB);
2384 Dir->setUpperBoundVariable(Exprs.
UB);
2385 Dir->setStrideVariable(Exprs.
ST);
2386 Dir->setEnsureUpperBound(Exprs.
EUB);
2387 Dir->setNextLowerBound(Exprs.
NLB);
2388 Dir->setNextUpperBound(Exprs.
NUB);
2392 Dir->setInits(Exprs.
Inits);
2393 Dir->setUpdates(Exprs.
Updates);
2394 Dir->setFinals(Exprs.
Finals);
2405 return createEmptyDirective<OMPGenericLoopDirective>(
2406 C, NumClauses,
true,
2414 auto *Dir = createDirective<OMPTeamsGenericLoopDirective>(
2415 C, Clauses, AssociatedStmt,
2421 Dir->setPreCond(Exprs.
PreCond);
2422 Dir->setCond(Exprs.
Cond);
2423 Dir->setInit(Exprs.
Init);
2424 Dir->setInc(Exprs.
Inc);
2425 Dir->setIsLastIterVariable(Exprs.
IL);
2426 Dir->setLowerBoundVariable(Exprs.
LB);
2427 Dir->setUpperBoundVariable(Exprs.
UB);
2428 Dir->setStrideVariable(Exprs.
ST);
2429 Dir->setEnsureUpperBound(Exprs.
EUB);
2430 Dir->setNextLowerBound(Exprs.
NLB);
2431 Dir->setNextUpperBound(Exprs.
NUB);
2433 Dir->setPrevLowerBoundVariable(Exprs.
PrevLB);
2434 Dir->setPrevUpperBoundVariable(Exprs.
PrevUB);
2435 Dir->setDistInc(Exprs.
DistInc);
2436 Dir->setPrevEnsureUpperBound(Exprs.
PrevEUB);
2439 Dir->setInits(Exprs.
Inits);
2440 Dir->setUpdates(Exprs.
Updates);
2441 Dir->setFinals(Exprs.
Finals);
2460 unsigned NumClauses,
2462 return createEmptyDirective<OMPTeamsGenericLoopDirective>(
2463 C, NumClauses,
true,
2470 const HelperExprs &Exprs,
bool CanBeParallelFor) {
2471 auto *Dir = createDirective<OMPTargetTeamsGenericLoopDirective>(
2472 C, Clauses, AssociatedStmt,
2473 numLoopChildren(CollapsedNum, OMPD_target_teams_loop), StartLoc, EndLoc,
2478 Dir->setPreCond(Exprs.
PreCond);
2479 Dir->setCond(Exprs.
Cond);
2480 Dir->setInit(Exprs.
Init);
2481 Dir->setInc(Exprs.
Inc);
2482 Dir->setIsLastIterVariable(Exprs.
IL);
2483 Dir->setLowerBoundVariable(Exprs.
LB);
2484 Dir->setUpperBoundVariable(Exprs.
UB);
2485 Dir->setStrideVariable(Exprs.
ST);
2486 Dir->setEnsureUpperBound(Exprs.
EUB);
2487 Dir->setNextLowerBound(Exprs.
NLB);
2488 Dir->setNextUpperBound(Exprs.
NUB);
2490 Dir->setPrevLowerBoundVariable(Exprs.
PrevLB);
2491 Dir->setPrevUpperBoundVariable(Exprs.
PrevUB);
2492 Dir->setDistInc(Exprs.
DistInc);
2493 Dir->setPrevEnsureUpperBound(Exprs.
PrevEUB);
2496 Dir->setInits(Exprs.
Inits);
2497 Dir->setUpdates(Exprs.
Updates);
2498 Dir->setFinals(Exprs.
Finals);
2512 Dir->setCanBeParallelFor(CanBeParallelFor);
2518 unsigned NumClauses,
2519 unsigned CollapsedNum,
2521 return createEmptyDirective<OMPTargetTeamsGenericLoopDirective>(
2522 C, NumClauses,
true,
2530 auto *Dir = createDirective<OMPParallelGenericLoopDirective>(
2531 C, Clauses, AssociatedStmt,
2537 Dir->setPreCond(Exprs.
PreCond);
2538 Dir->setCond(Exprs.
Cond);
2539 Dir->setInit(Exprs.
Init);
2540 Dir->setInc(Exprs.
Inc);
2541 Dir->setIsLastIterVariable(Exprs.
IL);
2542 Dir->setLowerBoundVariable(Exprs.
LB);
2543 Dir->setUpperBoundVariable(Exprs.
UB);
2544 Dir->setStrideVariable(Exprs.
ST);
2545 Dir->setEnsureUpperBound(Exprs.
EUB);
2546 Dir->setNextLowerBound(Exprs.
NLB);
2547 Dir->setNextUpperBound(Exprs.
NUB);
2551 Dir->setInits(Exprs.
Inits);
2552 Dir->setUpdates(Exprs.
Updates);
2553 Dir->setFinals(Exprs.
Finals);
2562 const ASTContext &
C,
unsigned NumClauses,
unsigned CollapsedNum,
2564 return createEmptyDirective<OMPParallelGenericLoopDirective>(
2565 C, NumClauses,
true,
2574 auto *Dir = createDirective<OMPTargetParallelGenericLoopDirective>(
2575 C, Clauses, AssociatedStmt,
2577 EndLoc, CollapsedNum);
2581 Dir->setPreCond(Exprs.
PreCond);
2582 Dir->setCond(Exprs.
Cond);
2583 Dir->setInit(Exprs.
Init);
2584 Dir->setInc(Exprs.
Inc);
2585 Dir->setIsLastIterVariable(Exprs.
IL);
2586 Dir->setLowerBoundVariable(Exprs.
LB);
2587 Dir->setUpperBoundVariable(Exprs.
UB);
2588 Dir->setStrideVariable(Exprs.
ST);
2589 Dir->setEnsureUpperBound(Exprs.
EUB);
2590 Dir->setNextLowerBound(Exprs.
NLB);
2591 Dir->setNextUpperBound(Exprs.
NUB);
2595 Dir->setInits(Exprs.
Inits);
2596 Dir->setUpdates(Exprs.
Updates);
2597 Dir->setFinals(Exprs.
Finals);
2607 unsigned NumClauses,
2608 unsigned CollapsedNum,
2610 return createEmptyDirective<OMPTargetParallelGenericLoopDirective>(
2611 C, NumClauses,
true,
2612 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.
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, Stmt *TransformedStmt, Stmt *PreInits)
Create a new AST node representation for '#pragma omp reverse'.
static OMPReverseDirective * CreateEmpty(const ASTContext &C)
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.
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 '#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....