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,
807 return createDirective<OMPAssumeDirective>(
C, Clauses, AStmt,
815 return createEmptyDirective<OMPAssumeDirective>(
C, NumClauses,
823 return createDirective<OMPErrorDirective>(
824 C, Clauses,
nullptr, 0, StartLoc,
831 return createEmptyDirective<OMPErrorDirective>(
C, NumClauses);
849 return createDirective<OMPTaskwaitDirective>(
850 C, Clauses,
nullptr, 0, StartLoc,
857 return createEmptyDirective<OMPTaskwaitDirective>(
C, NumClauses);
863 auto *Dir = createDirective<OMPTaskgroupDirective>(
864 C, Clauses, AssociatedStmt, 1, StartLoc, EndLoc);
865 Dir->setReductionRef(ReductionRef);
872 return createEmptyDirective<OMPTaskgroupDirective>(
873 C, NumClauses,
true, 1);
880 Dir->setCancelRegion(CancelRegion);
893 auto *Dir = createDirective<OMPCancelDirective>(
894 C, Clauses,
nullptr, 0, StartLoc,
896 Dir->setCancelRegion(CancelRegion);
903 return createEmptyDirective<OMPCancelDirective>(
C, NumClauses);
910 return createDirective<OMPFlushDirective>(
911 C, Clauses,
nullptr, 0, StartLoc,
918 return createEmptyDirective<OMPFlushDirective>(
C, NumClauses);
925 return createDirective<OMPDepobjDirective>(
927 0, StartLoc, EndLoc);
933 return createEmptyDirective<OMPDepobjDirective>(
C, NumClauses);
940 return createDirective<OMPScanDirective>(
C, Clauses,
942 0, StartLoc, EndLoc);
948 return createEmptyDirective<OMPScanDirective>(
C, NumClauses);
955 Stmt *AssociatedStmt) {
956 return createDirective<OMPOrderedDirective>(
957 C, Clauses, cast_or_null<CapturedStmt>(AssociatedStmt),
958 0, StartLoc, EndLoc);
965 return createEmptyDirective<OMPOrderedDirective>(
C, NumClauses,
973 auto *Dir = createDirective<OMPAtomicDirective>(
974 C, Clauses, AssociatedStmt, 7, StartLoc, EndLoc);
978 Dir->setExpr(Exprs.
E);
979 Dir->setUpdateExpr(Exprs.
UE);
981 Dir->setCond(Exprs.
Cond);
984 Dir->Flags.IsFailOnly = Exprs.
IsFailOnly ? 1 : 0;
991 return createEmptyDirective<OMPAtomicDirective>(
992 C, NumClauses,
true, 7);
999 Stmt *AssociatedStmt) {
1000 return createDirective<OMPTargetDirective>(
1001 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
1005 unsigned NumClauses,
1007 return createEmptyDirective<OMPTargetDirective>(
C, NumClauses,
1015 auto *Dir = createDirective<OMPTargetParallelDirective>(
1016 C, Clauses, AssociatedStmt, 1, StartLoc, EndLoc);
1017 Dir->setTaskReductionRefExpr(TaskRedRef);
1018 Dir->setHasCancel(HasCancel);
1025 return createEmptyDirective<OMPTargetParallelDirective>(
1026 C, NumClauses,
true, 1);
1033 auto *Dir = createDirective<OMPTargetParallelForDirective>(
1034 C, Clauses, AssociatedStmt,
1035 numLoopChildren(CollapsedNum, OMPD_target_parallel_for) + 1, StartLoc,
1036 EndLoc, CollapsedNum);
1040 Dir->setPreCond(Exprs.
PreCond);
1041 Dir->setCond(Exprs.
Cond);
1042 Dir->setInit(Exprs.
Init);
1043 Dir->setInc(Exprs.
Inc);
1044 Dir->setIsLastIterVariable(Exprs.
IL);
1045 Dir->setLowerBoundVariable(Exprs.
LB);
1046 Dir->setUpperBoundVariable(Exprs.
UB);
1047 Dir->setStrideVariable(Exprs.
ST);
1048 Dir->setEnsureUpperBound(Exprs.
EUB);
1049 Dir->setNextLowerBound(Exprs.
NLB);
1050 Dir->setNextUpperBound(Exprs.
NUB);
1054 Dir->setInits(Exprs.
Inits);
1055 Dir->setUpdates(Exprs.
Updates);
1056 Dir->setFinals(Exprs.
Finals);
1061 Dir->setTaskReductionRefExpr(TaskRedRef);
1062 Dir->setHasCancel(HasCancel);
1068 unsigned NumClauses,
1070 return createEmptyDirective<OMPTargetParallelForDirective>(
1071 C, NumClauses,
true,
1079 return createDirective<OMPTargetDataDirective>(
1080 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
1086 return createEmptyDirective<OMPTargetDataDirective>(
1093 return createDirective<OMPTargetEnterDataDirective>(
1094 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
1100 return createEmptyDirective<OMPTargetEnterDataDirective>(
1107 return createDirective<OMPTargetExitDataDirective>(
1108 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
1114 return createEmptyDirective<OMPTargetExitDataDirective>(
1122 Stmt *AssociatedStmt) {
1123 return createDirective<OMPTeamsDirective>(
1124 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
1128 unsigned NumClauses,
1130 return createEmptyDirective<OMPTeamsDirective>(
C, NumClauses,
1138 auto *Dir = createDirective<OMPTaskLoopDirective>(
1140 StartLoc, EndLoc, CollapsedNum);
1144 Dir->setPreCond(Exprs.
PreCond);
1145 Dir->setCond(Exprs.
Cond);
1146 Dir->setInit(Exprs.
Init);
1147 Dir->setInc(Exprs.
Inc);
1148 Dir->setIsLastIterVariable(Exprs.
IL);
1149 Dir->setLowerBoundVariable(Exprs.
LB);
1150 Dir->setUpperBoundVariable(Exprs.
UB);
1151 Dir->setStrideVariable(Exprs.
ST);
1152 Dir->setEnsureUpperBound(Exprs.
EUB);
1153 Dir->setNextLowerBound(Exprs.
NLB);
1154 Dir->setNextUpperBound(Exprs.
NUB);
1158 Dir->setInits(Exprs.
Inits);
1159 Dir->setUpdates(Exprs.
Updates);
1160 Dir->setFinals(Exprs.
Finals);
1165 Dir->setHasCancel(HasCancel);
1170 unsigned NumClauses,
1171 unsigned CollapsedNum,
1173 return createEmptyDirective<OMPTaskLoopDirective>(
1174 C, NumClauses,
true,
1182 auto *Dir = createDirective<OMPTaskLoopSimdDirective>(
1183 C, Clauses, AssociatedStmt,
1189 Dir->setPreCond(Exprs.
PreCond);
1190 Dir->setCond(Exprs.
Cond);
1191 Dir->setInit(Exprs.
Init);
1192 Dir->setInc(Exprs.
Inc);
1193 Dir->setIsLastIterVariable(Exprs.
IL);
1194 Dir->setLowerBoundVariable(Exprs.
LB);
1195 Dir->setUpperBoundVariable(Exprs.
UB);
1196 Dir->setStrideVariable(Exprs.
ST);
1197 Dir->setEnsureUpperBound(Exprs.
EUB);
1198 Dir->setNextLowerBound(Exprs.
NLB);
1199 Dir->setNextUpperBound(Exprs.
NUB);
1203 Dir->setInits(Exprs.
Inits);
1204 Dir->setUpdates(Exprs.
Updates);
1205 Dir->setFinals(Exprs.
Finals);
1216 return createEmptyDirective<OMPTaskLoopSimdDirective>(
1217 C, NumClauses,
true,
1225 auto *Dir = createDirective<OMPMasterTaskLoopDirective>(
1226 C, Clauses, AssociatedStmt,
1227 numLoopChildren(CollapsedNum, OMPD_master_taskloop), StartLoc, EndLoc,
1232 Dir->setPreCond(Exprs.
PreCond);
1233 Dir->setCond(Exprs.
Cond);
1234 Dir->setInit(Exprs.
Init);
1235 Dir->setInc(Exprs.
Inc);
1236 Dir->setIsLastIterVariable(Exprs.
IL);
1237 Dir->setLowerBoundVariable(Exprs.
LB);
1238 Dir->setUpperBoundVariable(Exprs.
UB);
1239 Dir->setStrideVariable(Exprs.
ST);
1240 Dir->setEnsureUpperBound(Exprs.
EUB);
1241 Dir->setNextLowerBound(Exprs.
NLB);
1242 Dir->setNextUpperBound(Exprs.
NUB);
1246 Dir->setInits(Exprs.
Inits);
1247 Dir->setUpdates(Exprs.
Updates);
1248 Dir->setFinals(Exprs.
Finals);
1253 Dir->setHasCancel(HasCancel);
1259 unsigned NumClauses,
1261 return createEmptyDirective<OMPMasterTaskLoopDirective>(
1262 C, NumClauses,
true,
1270 auto *Dir = createDirective<OMPMaskedTaskLoopDirective>(
1271 C, Clauses, AssociatedStmt,
1272 numLoopChildren(CollapsedNum, OMPD_masked_taskloop), StartLoc, EndLoc,
1277 Dir->setPreCond(Exprs.
PreCond);
1278 Dir->setCond(Exprs.
Cond);
1279 Dir->setInit(Exprs.
Init);
1280 Dir->setInc(Exprs.
Inc);
1281 Dir->setIsLastIterVariable(Exprs.
IL);
1282 Dir->setLowerBoundVariable(Exprs.
LB);
1283 Dir->setUpperBoundVariable(Exprs.
UB);
1284 Dir->setStrideVariable(Exprs.
ST);
1285 Dir->setEnsureUpperBound(Exprs.
EUB);
1286 Dir->setNextLowerBound(Exprs.
NLB);
1287 Dir->setNextUpperBound(Exprs.
NUB);
1291 Dir->setInits(Exprs.
Inits);
1292 Dir->setUpdates(Exprs.
Updates);
1293 Dir->setFinals(Exprs.
Finals);
1298 Dir->setHasCancel(HasCancel);
1304 unsigned NumClauses,
1306 return createEmptyDirective<OMPMaskedTaskLoopDirective>(
1307 C, NumClauses,
true,
1315 auto *Dir = createDirective<OMPMasterTaskLoopSimdDirective>(
1316 C, Clauses, AssociatedStmt,
1318 EndLoc, CollapsedNum);
1322 Dir->setPreCond(Exprs.
PreCond);
1323 Dir->setCond(Exprs.
Cond);
1324 Dir->setInit(Exprs.
Init);
1325 Dir->setInc(Exprs.
Inc);
1326 Dir->setIsLastIterVariable(Exprs.
IL);
1327 Dir->setLowerBoundVariable(Exprs.
LB);
1328 Dir->setUpperBoundVariable(Exprs.
UB);
1329 Dir->setStrideVariable(Exprs.
ST);
1330 Dir->setEnsureUpperBound(Exprs.
EUB);
1331 Dir->setNextLowerBound(Exprs.
NLB);
1332 Dir->setNextUpperBound(Exprs.
NUB);
1336 Dir->setInits(Exprs.
Inits);
1337 Dir->setUpdates(Exprs.
Updates);
1338 Dir->setFinals(Exprs.
Finals);
1348 unsigned NumClauses,
1350 return createEmptyDirective<OMPMasterTaskLoopSimdDirective>(
1351 C, NumClauses,
true,
1352 numLoopChildren(CollapsedNum, OMPD_master_taskloop_simd), CollapsedNum);
1359 auto *Dir = createDirective<OMPMaskedTaskLoopSimdDirective>(
1360 C, Clauses, AssociatedStmt,
1362 EndLoc, CollapsedNum);
1366 Dir->setPreCond(Exprs.
PreCond);
1367 Dir->setCond(Exprs.
Cond);
1368 Dir->setInit(Exprs.
Init);
1369 Dir->setInc(Exprs.
Inc);
1370 Dir->setIsLastIterVariable(Exprs.
IL);
1371 Dir->setLowerBoundVariable(Exprs.
LB);
1372 Dir->setUpperBoundVariable(Exprs.
UB);
1373 Dir->setStrideVariable(Exprs.
ST);
1374 Dir->setEnsureUpperBound(Exprs.
EUB);
1375 Dir->setNextLowerBound(Exprs.
NLB);
1376 Dir->setNextUpperBound(Exprs.
NUB);
1380 Dir->setInits(Exprs.
Inits);
1381 Dir->setUpdates(Exprs.
Updates);
1382 Dir->setFinals(Exprs.
Finals);
1392 unsigned NumClauses,
1394 return createEmptyDirective<OMPMaskedTaskLoopSimdDirective>(
1395 C, NumClauses,
true,
1396 numLoopChildren(CollapsedNum, OMPD_masked_taskloop_simd), CollapsedNum);
1403 auto *Dir = createDirective<OMPParallelMasterTaskLoopDirective>(
1404 C, Clauses, AssociatedStmt,
1405 numLoopChildren(CollapsedNum, OMPD_parallel_master_taskloop), StartLoc,
1406 EndLoc, CollapsedNum);
1410 Dir->setPreCond(Exprs.
PreCond);
1411 Dir->setCond(Exprs.
Cond);
1412 Dir->setInit(Exprs.
Init);
1413 Dir->setInc(Exprs.
Inc);
1414 Dir->setIsLastIterVariable(Exprs.
IL);
1415 Dir->setLowerBoundVariable(Exprs.
LB);
1416 Dir->setUpperBoundVariable(Exprs.
UB);
1417 Dir->setStrideVariable(Exprs.
ST);
1418 Dir->setEnsureUpperBound(Exprs.
EUB);
1419 Dir->setNextLowerBound(Exprs.
NLB);
1420 Dir->setNextUpperBound(Exprs.
NUB);
1424 Dir->setInits(Exprs.
Inits);
1425 Dir->setUpdates(Exprs.
Updates);
1426 Dir->setFinals(Exprs.
Finals);
1431 Dir->setHasCancel(HasCancel);
1437 unsigned NumClauses,
1438 unsigned CollapsedNum,
1440 return createEmptyDirective<OMPParallelMasterTaskLoopDirective>(
1441 C, NumClauses,
true,
1450 auto *Dir = createDirective<OMPParallelMaskedTaskLoopDirective>(
1451 C, Clauses, AssociatedStmt,
1452 numLoopChildren(CollapsedNum, OMPD_parallel_masked_taskloop), StartLoc,
1453 EndLoc, CollapsedNum);
1457 Dir->setPreCond(Exprs.
PreCond);
1458 Dir->setCond(Exprs.
Cond);
1459 Dir->setInit(Exprs.
Init);
1460 Dir->setInc(Exprs.
Inc);
1461 Dir->setIsLastIterVariable(Exprs.
IL);
1462 Dir->setLowerBoundVariable(Exprs.
LB);
1463 Dir->setUpperBoundVariable(Exprs.
UB);
1464 Dir->setStrideVariable(Exprs.
ST);
1465 Dir->setEnsureUpperBound(Exprs.
EUB);
1466 Dir->setNextLowerBound(Exprs.
NLB);
1467 Dir->setNextUpperBound(Exprs.
NUB);
1471 Dir->setInits(Exprs.
Inits);
1472 Dir->setUpdates(Exprs.
Updates);
1473 Dir->setFinals(Exprs.
Finals);
1478 Dir->setHasCancel(HasCancel);
1484 unsigned NumClauses,
1485 unsigned CollapsedNum,
1487 return createEmptyDirective<OMPParallelMaskedTaskLoopDirective>(
1488 C, NumClauses,
true,
1498 auto *Dir = createDirective<OMPParallelMasterTaskLoopSimdDirective>(
1499 C, Clauses, AssociatedStmt,
1501 StartLoc, EndLoc, CollapsedNum);
1505 Dir->setPreCond(Exprs.
PreCond);
1506 Dir->setCond(Exprs.
Cond);
1507 Dir->setInit(Exprs.
Init);
1508 Dir->setInc(Exprs.
Inc);
1509 Dir->setIsLastIterVariable(Exprs.
IL);
1510 Dir->setLowerBoundVariable(Exprs.
LB);
1511 Dir->setUpperBoundVariable(Exprs.
UB);
1512 Dir->setStrideVariable(Exprs.
ST);
1513 Dir->setEnsureUpperBound(Exprs.
EUB);
1514 Dir->setNextLowerBound(Exprs.
NLB);
1515 Dir->setNextUpperBound(Exprs.
NUB);
1519 Dir->setInits(Exprs.
Inits);
1520 Dir->setUpdates(Exprs.
Updates);
1521 Dir->setFinals(Exprs.
Finals);
1531 unsigned NumClauses,
1532 unsigned CollapsedNum,
1534 return createEmptyDirective<OMPParallelMasterTaskLoopSimdDirective>(
1535 C, NumClauses,
true,
1545 auto *Dir = createDirective<OMPParallelMaskedTaskLoopSimdDirective>(
1546 C, Clauses, AssociatedStmt,
1548 StartLoc, EndLoc, CollapsedNum);
1552 Dir->setPreCond(Exprs.
PreCond);
1553 Dir->setCond(Exprs.
Cond);
1554 Dir->setInit(Exprs.
Init);
1555 Dir->setInc(Exprs.
Inc);
1556 Dir->setIsLastIterVariable(Exprs.
IL);
1557 Dir->setLowerBoundVariable(Exprs.
LB);
1558 Dir->setUpperBoundVariable(Exprs.
UB);
1559 Dir->setStrideVariable(Exprs.
ST);
1560 Dir->setEnsureUpperBound(Exprs.
EUB);
1561 Dir->setNextLowerBound(Exprs.
NLB);
1562 Dir->setNextUpperBound(Exprs.
NUB);
1566 Dir->setInits(Exprs.
Inits);
1567 Dir->setUpdates(Exprs.
Updates);
1568 Dir->setFinals(Exprs.
Finals);
1578 unsigned NumClauses,
1579 unsigned CollapsedNum,
1581 return createEmptyDirective<OMPParallelMaskedTaskLoopSimdDirective>(
1582 C, NumClauses,
true,
1592 auto *Dir = createDirective<OMPDistributeDirective>(
1593 C, Clauses, AssociatedStmt,
1599 Dir->setPreCond(Exprs.
PreCond);
1600 Dir->setCond(Exprs.
Cond);
1601 Dir->setInit(Exprs.
Init);
1602 Dir->setInc(Exprs.
Inc);
1603 Dir->setIsLastIterVariable(Exprs.
IL);
1604 Dir->setLowerBoundVariable(Exprs.
LB);
1605 Dir->setUpperBoundVariable(Exprs.
UB);
1606 Dir->setStrideVariable(Exprs.
ST);
1607 Dir->setEnsureUpperBound(Exprs.
EUB);
1608 Dir->setNextLowerBound(Exprs.
NLB);
1609 Dir->setNextUpperBound(Exprs.
NUB);
1613 Dir->setInits(Exprs.
Inits);
1614 Dir->setUpdates(Exprs.
Updates);
1615 Dir->setFinals(Exprs.
Finals);
1626 return createEmptyDirective<OMPDistributeDirective>(
1627 C, NumClauses,
true,
1634 return createDirective<OMPTargetUpdateDirective>(
C, Clauses, AssociatedStmt,
1642 return createEmptyDirective<OMPTargetUpdateDirective>(
1643 C, NumClauses,
true);
1650 auto *Dir = createDirective<OMPDistributeParallelForDirective>(
1651 C, Clauses, AssociatedStmt,
1652 numLoopChildren(CollapsedNum, OMPD_distribute_parallel_for) + 1, StartLoc,
1653 EndLoc, CollapsedNum);
1657 Dir->setPreCond(Exprs.
PreCond);
1658 Dir->setCond(Exprs.
Cond);
1659 Dir->setInit(Exprs.
Init);
1660 Dir->setInc(Exprs.
Inc);
1661 Dir->setIsLastIterVariable(Exprs.
IL);
1662 Dir->setLowerBoundVariable(Exprs.
LB);
1663 Dir->setUpperBoundVariable(Exprs.
UB);
1664 Dir->setStrideVariable(Exprs.
ST);
1665 Dir->setEnsureUpperBound(Exprs.
EUB);
1666 Dir->setNextLowerBound(Exprs.
NLB);
1667 Dir->setNextUpperBound(Exprs.
NUB);
1669 Dir->setPrevLowerBoundVariable(Exprs.
PrevLB);
1670 Dir->setPrevUpperBoundVariable(Exprs.
PrevUB);
1671 Dir->setDistInc(Exprs.
DistInc);
1672 Dir->setPrevEnsureUpperBound(Exprs.
PrevEUB);
1675 Dir->setInits(Exprs.
Inits);
1676 Dir->setUpdates(Exprs.
Updates);
1677 Dir->setFinals(Exprs.
Finals);
1691 Dir->setTaskReductionRefExpr(TaskRedRef);
1692 Dir->HasCancel = HasCancel;
1698 unsigned NumClauses,
1699 unsigned CollapsedNum,
1701 return createEmptyDirective<OMPDistributeParallelForDirective>(
1702 C, NumClauses,
true,
1712 auto *Dir = createDirective<OMPDistributeParallelForSimdDirective>(
1713 C, Clauses, AssociatedStmt,
1715 StartLoc, EndLoc, CollapsedNum);
1719 Dir->setPreCond(Exprs.
PreCond);
1720 Dir->setCond(Exprs.
Cond);
1721 Dir->setInit(Exprs.
Init);
1722 Dir->setInc(Exprs.
Inc);
1723 Dir->setIsLastIterVariable(Exprs.
IL);
1724 Dir->setLowerBoundVariable(Exprs.
LB);
1725 Dir->setUpperBoundVariable(Exprs.
UB);
1726 Dir->setStrideVariable(Exprs.
ST);
1727 Dir->setEnsureUpperBound(Exprs.
EUB);
1728 Dir->setNextLowerBound(Exprs.
NLB);
1729 Dir->setNextUpperBound(Exprs.
NUB);
1731 Dir->setPrevLowerBoundVariable(Exprs.
PrevLB);
1732 Dir->setPrevUpperBoundVariable(Exprs.
PrevUB);
1733 Dir->setDistInc(Exprs.
DistInc);
1734 Dir->setPrevEnsureUpperBound(Exprs.
PrevEUB);
1737 Dir->setInits(Exprs.
Inits);
1738 Dir->setUpdates(Exprs.
Updates);
1739 Dir->setFinals(Exprs.
Finals);
1758 unsigned NumClauses,
1759 unsigned CollapsedNum,
1761 return createEmptyDirective<OMPDistributeParallelForSimdDirective>(
1762 C, NumClauses,
true,
1771 auto *Dir = createDirective<OMPDistributeSimdDirective>(
1772 C, Clauses, AssociatedStmt,
1773 numLoopChildren(CollapsedNum, OMPD_distribute_simd), StartLoc, EndLoc,
1778 Dir->setPreCond(Exprs.
PreCond);
1779 Dir->setCond(Exprs.
Cond);
1780 Dir->setInit(Exprs.
Init);
1781 Dir->setInc(Exprs.
Inc);
1782 Dir->setIsLastIterVariable(Exprs.
IL);
1783 Dir->setLowerBoundVariable(Exprs.
LB);
1784 Dir->setUpperBoundVariable(Exprs.
UB);
1785 Dir->setStrideVariable(Exprs.
ST);
1786 Dir->setEnsureUpperBound(Exprs.
EUB);
1787 Dir->setNextLowerBound(Exprs.
NLB);
1788 Dir->setNextUpperBound(Exprs.
NUB);
1792 Dir->setInits(Exprs.
Inits);
1793 Dir->setUpdates(Exprs.
Updates);
1794 Dir->setFinals(Exprs.
Finals);
1804 unsigned NumClauses,
1806 return createEmptyDirective<OMPDistributeSimdDirective>(
1807 C, NumClauses,
true,
1815 auto *Dir = createDirective<OMPTargetParallelForSimdDirective>(
1816 C, Clauses, AssociatedStmt,
1817 numLoopChildren(CollapsedNum, OMPD_target_parallel_for_simd), StartLoc,
1818 EndLoc, CollapsedNum);
1822 Dir->setPreCond(Exprs.
PreCond);
1823 Dir->setCond(Exprs.
Cond);
1824 Dir->setInit(Exprs.
Init);
1825 Dir->setInc(Exprs.
Inc);
1826 Dir->setIsLastIterVariable(Exprs.
IL);
1827 Dir->setLowerBoundVariable(Exprs.
LB);
1828 Dir->setUpperBoundVariable(Exprs.
UB);
1829 Dir->setStrideVariable(Exprs.
ST);
1830 Dir->setEnsureUpperBound(Exprs.
EUB);
1831 Dir->setNextLowerBound(Exprs.
NLB);
1832 Dir->setNextUpperBound(Exprs.
NUB);
1836 Dir->setInits(Exprs.
Inits);
1837 Dir->setUpdates(Exprs.
Updates);
1838 Dir->setFinals(Exprs.
Finals);
1848 unsigned NumClauses,
1849 unsigned CollapsedNum,
1851 return createEmptyDirective<OMPTargetParallelForSimdDirective>(
1852 C, NumClauses,
true,
1862 auto *Dir = createDirective<OMPTargetSimdDirective>(
1863 C, Clauses, AssociatedStmt,
1869 Dir->setPreCond(Exprs.
PreCond);
1870 Dir->setCond(Exprs.
Cond);
1871 Dir->setInit(Exprs.
Init);
1872 Dir->setInc(Exprs.
Inc);
1875 Dir->setInits(Exprs.
Inits);
1876 Dir->setUpdates(Exprs.
Updates);
1877 Dir->setFinals(Exprs.
Finals);
1888 return createEmptyDirective<OMPTargetSimdDirective>(
1889 C, NumClauses,
true,
1897 auto *Dir = createDirective<OMPTeamsDistributeDirective>(
1898 C, Clauses, AssociatedStmt,
1899 numLoopChildren(CollapsedNum, OMPD_teams_distribute), StartLoc, EndLoc,
1904 Dir->setPreCond(Exprs.
PreCond);
1905 Dir->setCond(Exprs.
Cond);
1906 Dir->setInit(Exprs.
Init);
1907 Dir->setInc(Exprs.
Inc);
1908 Dir->setIsLastIterVariable(Exprs.
IL);
1909 Dir->setLowerBoundVariable(Exprs.
LB);
1910 Dir->setUpperBoundVariable(Exprs.
UB);
1911 Dir->setStrideVariable(Exprs.
ST);
1912 Dir->setEnsureUpperBound(Exprs.
EUB);
1913 Dir->setNextLowerBound(Exprs.
NLB);
1914 Dir->setNextUpperBound(Exprs.
NUB);
1918 Dir->setInits(Exprs.
Inits);
1919 Dir->setUpdates(Exprs.
Updates);
1920 Dir->setFinals(Exprs.
Finals);
1930 unsigned NumClauses,
1932 return createEmptyDirective<OMPTeamsDistributeDirective>(
1933 C, NumClauses,
true,
1941 auto *Dir = createDirective<OMPTeamsDistributeSimdDirective>(
1942 C, Clauses, AssociatedStmt,
1944 EndLoc, CollapsedNum);
1948 Dir->setPreCond(Exprs.
PreCond);
1949 Dir->setCond(Exprs.
Cond);
1950 Dir->setInit(Exprs.
Init);
1951 Dir->setInc(Exprs.
Inc);
1952 Dir->setIsLastIterVariable(Exprs.
IL);
1953 Dir->setLowerBoundVariable(Exprs.
LB);
1954 Dir->setUpperBoundVariable(Exprs.
UB);
1955 Dir->setStrideVariable(Exprs.
ST);
1956 Dir->setEnsureUpperBound(Exprs.
EUB);
1957 Dir->setNextLowerBound(Exprs.
NLB);
1958 Dir->setNextUpperBound(Exprs.
NUB);
1962 Dir->setInits(Exprs.
Inits);
1963 Dir->setUpdates(Exprs.
Updates);
1964 Dir->setFinals(Exprs.
Finals);
1973 const ASTContext &
C,
unsigned NumClauses,
unsigned CollapsedNum,
1975 return createEmptyDirective<OMPTeamsDistributeSimdDirective>(
1976 C, NumClauses,
true,
1977 numLoopChildren(CollapsedNum, OMPD_teams_distribute_simd), CollapsedNum);
1985 auto *Dir = createDirective<OMPTeamsDistributeParallelForSimdDirective>(
1986 C, Clauses, AssociatedStmt,
1987 numLoopChildren(CollapsedNum, OMPD_teams_distribute_parallel_for_simd),
1988 StartLoc, EndLoc, CollapsedNum);
1992 Dir->setPreCond(Exprs.
PreCond);
1993 Dir->setCond(Exprs.
Cond);
1994 Dir->setInit(Exprs.
Init);
1995 Dir->setInc(Exprs.
Inc);
1996 Dir->setIsLastIterVariable(Exprs.
IL);
1997 Dir->setLowerBoundVariable(Exprs.
LB);
1998 Dir->setUpperBoundVariable(Exprs.
UB);
1999 Dir->setStrideVariable(Exprs.
ST);
2000 Dir->setEnsureUpperBound(Exprs.
EUB);
2001 Dir->setNextLowerBound(Exprs.
NLB);
2002 Dir->setNextUpperBound(Exprs.
NUB);
2004 Dir->setPrevLowerBoundVariable(Exprs.
PrevLB);
2005 Dir->setPrevUpperBoundVariable(Exprs.
PrevUB);
2006 Dir->setDistInc(Exprs.
DistInc);
2007 Dir->setPrevEnsureUpperBound(Exprs.
PrevEUB);
2010 Dir->setInits(Exprs.
Inits);
2011 Dir->setUpdates(Exprs.
Updates);
2012 Dir->setFinals(Exprs.
Finals);
2031 unsigned NumClauses,
2032 unsigned CollapsedNum,
2034 return createEmptyDirective<OMPTeamsDistributeParallelForSimdDirective>(
2035 C, NumClauses,
true,
2036 numLoopChildren(CollapsedNum, OMPD_teams_distribute_parallel_for_simd),
2045 auto *Dir = createDirective<OMPTeamsDistributeParallelForDirective>(
2046 C, Clauses, AssociatedStmt,
2047 numLoopChildren(CollapsedNum, OMPD_teams_distribute_parallel_for) + 1,
2048 StartLoc, EndLoc, CollapsedNum);
2052 Dir->setPreCond(Exprs.
PreCond);
2053 Dir->setCond(Exprs.
Cond);
2054 Dir->setInit(Exprs.
Init);
2055 Dir->setInc(Exprs.
Inc);
2056 Dir->setIsLastIterVariable(Exprs.
IL);
2057 Dir->setLowerBoundVariable(Exprs.
LB);
2058 Dir->setUpperBoundVariable(Exprs.
UB);
2059 Dir->setStrideVariable(Exprs.
ST);
2060 Dir->setEnsureUpperBound(Exprs.
EUB);
2061 Dir->setNextLowerBound(Exprs.
NLB);
2062 Dir->setNextUpperBound(Exprs.
NUB);
2064 Dir->setPrevLowerBoundVariable(Exprs.
PrevLB);
2065 Dir->setPrevUpperBoundVariable(Exprs.
PrevUB);
2066 Dir->setDistInc(Exprs.
DistInc);
2067 Dir->setPrevEnsureUpperBound(Exprs.
PrevEUB);
2070 Dir->setInits(Exprs.
Inits);
2071 Dir->setUpdates(Exprs.
Updates);
2072 Dir->setFinals(Exprs.
Finals);
2086 Dir->setTaskReductionRefExpr(TaskRedRef);
2087 Dir->HasCancel = HasCancel;
2093 unsigned NumClauses,
2094 unsigned CollapsedNum,
2096 return createEmptyDirective<OMPTeamsDistributeParallelForDirective>(
2097 C, NumClauses,
true,
2098 numLoopChildren(CollapsedNum, OMPD_teams_distribute_parallel_for) + 1,
2105 return createDirective<OMPTargetTeamsDirective>(
C, Clauses, AssociatedStmt,
2113 return createEmptyDirective<OMPTargetTeamsDirective>(
2114 C, NumClauses,
true);
2121 auto *Dir = createDirective<OMPTargetTeamsDistributeDirective>(
2122 C, Clauses, AssociatedStmt,
2123 numLoopChildren(CollapsedNum, OMPD_target_teams_distribute), StartLoc,
2124 EndLoc, CollapsedNum);
2128 Dir->setPreCond(Exprs.
PreCond);
2129 Dir->setCond(Exprs.
Cond);
2130 Dir->setInit(Exprs.
Init);
2131 Dir->setInc(Exprs.
Inc);
2132 Dir->setIsLastIterVariable(Exprs.
IL);
2133 Dir->setLowerBoundVariable(Exprs.
LB);
2134 Dir->setUpperBoundVariable(Exprs.
UB);
2135 Dir->setStrideVariable(Exprs.
ST);
2136 Dir->setEnsureUpperBound(Exprs.
EUB);
2137 Dir->setNextLowerBound(Exprs.
NLB);
2138 Dir->setNextUpperBound(Exprs.
NUB);
2142 Dir->setInits(Exprs.
Inits);
2143 Dir->setUpdates(Exprs.
Updates);
2144 Dir->setFinals(Exprs.
Finals);
2154 unsigned NumClauses,
2155 unsigned CollapsedNum,
2157 return createEmptyDirective<OMPTargetTeamsDistributeDirective>(
2158 C, NumClauses,
true,
2168 auto *Dir = createDirective<OMPTargetTeamsDistributeParallelForDirective>(
2169 C, Clauses, AssociatedStmt,
2170 numLoopChildren(CollapsedNum, OMPD_target_teams_distribute_parallel_for) +
2172 StartLoc, EndLoc, CollapsedNum);
2176 Dir->setPreCond(Exprs.
PreCond);
2177 Dir->setCond(Exprs.
Cond);
2178 Dir->setInit(Exprs.
Init);
2179 Dir->setInc(Exprs.
Inc);
2180 Dir->setIsLastIterVariable(Exprs.
IL);
2181 Dir->setLowerBoundVariable(Exprs.
LB);
2182 Dir->setUpperBoundVariable(Exprs.
UB);
2183 Dir->setStrideVariable(Exprs.
ST);
2184 Dir->setEnsureUpperBound(Exprs.
EUB);
2185 Dir->setNextLowerBound(Exprs.
NLB);
2186 Dir->setNextUpperBound(Exprs.
NUB);
2188 Dir->setPrevLowerBoundVariable(Exprs.
PrevLB);
2189 Dir->setPrevUpperBoundVariable(Exprs.
PrevUB);
2190 Dir->setDistInc(Exprs.
DistInc);
2191 Dir->setPrevEnsureUpperBound(Exprs.
PrevEUB);
2194 Dir->setInits(Exprs.
Inits);
2195 Dir->setUpdates(Exprs.
Updates);
2196 Dir->setFinals(Exprs.
Finals);
2210 Dir->setTaskReductionRefExpr(TaskRedRef);
2211 Dir->HasCancel = HasCancel;
2217 unsigned NumClauses,
2218 unsigned CollapsedNum,
2220 return createEmptyDirective<OMPTargetTeamsDistributeParallelForDirective>(
2221 C, NumClauses,
true,
2222 numLoopChildren(CollapsedNum, OMPD_target_teams_distribute_parallel_for) +
2232 auto *Dir = createDirective<OMPTargetTeamsDistributeParallelForSimdDirective>(
2233 C, Clauses, AssociatedStmt,
2235 OMPD_target_teams_distribute_parallel_for_simd),
2236 StartLoc, EndLoc, CollapsedNum);
2240 Dir->setPreCond(Exprs.
PreCond);
2241 Dir->setCond(Exprs.
Cond);
2242 Dir->setInit(Exprs.
Init);
2243 Dir->setInc(Exprs.
Inc);
2244 Dir->setIsLastIterVariable(Exprs.
IL);
2245 Dir->setLowerBoundVariable(Exprs.
LB);
2246 Dir->setUpperBoundVariable(Exprs.
UB);
2247 Dir->setStrideVariable(Exprs.
ST);
2248 Dir->setEnsureUpperBound(Exprs.
EUB);
2249 Dir->setNextLowerBound(Exprs.
NLB);
2250 Dir->setNextUpperBound(Exprs.
NUB);
2252 Dir->setPrevLowerBoundVariable(Exprs.
PrevLB);
2253 Dir->setPrevUpperBoundVariable(Exprs.
PrevUB);
2254 Dir->setDistInc(Exprs.
DistInc);
2255 Dir->setPrevEnsureUpperBound(Exprs.
PrevEUB);
2258 Dir->setInits(Exprs.
Inits);
2259 Dir->setUpdates(Exprs.
Updates);
2260 Dir->setFinals(Exprs.
Finals);
2279 const ASTContext &
C,
unsigned NumClauses,
unsigned CollapsedNum,
2281 return createEmptyDirective<OMPTargetTeamsDistributeParallelForSimdDirective>(
2282 C, NumClauses,
true,
2284 OMPD_target_teams_distribute_parallel_for_simd),
2293 auto *Dir = createDirective<OMPTargetTeamsDistributeSimdDirective>(
2294 C, Clauses, AssociatedStmt,
2296 StartLoc, EndLoc, CollapsedNum);
2300 Dir->setPreCond(Exprs.
PreCond);
2301 Dir->setCond(Exprs.
Cond);
2302 Dir->setInit(Exprs.
Init);
2303 Dir->setInc(Exprs.
Inc);
2304 Dir->setIsLastIterVariable(Exprs.
IL);
2305 Dir->setLowerBoundVariable(Exprs.
LB);
2306 Dir->setUpperBoundVariable(Exprs.
UB);
2307 Dir->setStrideVariable(Exprs.
ST);
2308 Dir->setEnsureUpperBound(Exprs.
EUB);
2309 Dir->setNextLowerBound(Exprs.
NLB);
2310 Dir->setNextUpperBound(Exprs.
NUB);
2314 Dir->setInits(Exprs.
Inits);
2315 Dir->setUpdates(Exprs.
Updates);
2316 Dir->setFinals(Exprs.
Finals);
2326 unsigned NumClauses,
2327 unsigned CollapsedNum,
2329 return createEmptyDirective<OMPTargetTeamsDistributeSimdDirective>(
2330 C, NumClauses,
true,
2339 return createDirective<OMPInteropDirective>(
2340 C, Clauses,
nullptr, 0, StartLoc,
2345 unsigned NumClauses,
2347 return createEmptyDirective<OMPInteropDirective>(
C, NumClauses);
2354 auto *Dir = createDirective<OMPDispatchDirective>(
2355 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
2356 Dir->setTargetCallLoc(TargetCallLoc);
2361 unsigned NumClauses,
2363 return createEmptyDirective<OMPDispatchDirective>(
C, NumClauses,
2372 Stmt *AssociatedStmt) {
2373 return createDirective<OMPMaskedDirective>(
C, Clauses, AssociatedStmt,
2379 unsigned NumClauses,
2381 return createEmptyDirective<OMPMaskedDirective>(
C, NumClauses,
2389 auto *Dir = createDirective<OMPGenericLoopDirective>(
2391 StartLoc, EndLoc, CollapsedNum);
2395 Dir->setPreCond(Exprs.
PreCond);
2396 Dir->setCond(Exprs.
Cond);
2397 Dir->setInit(Exprs.
Init);
2398 Dir->setInc(Exprs.
Inc);
2399 Dir->setIsLastIterVariable(Exprs.
IL);
2400 Dir->setLowerBoundVariable(Exprs.
LB);
2401 Dir->setUpperBoundVariable(Exprs.
UB);
2402 Dir->setStrideVariable(Exprs.
ST);
2403 Dir->setEnsureUpperBound(Exprs.
EUB);
2404 Dir->setNextLowerBound(Exprs.
NLB);
2405 Dir->setNextUpperBound(Exprs.
NUB);
2409 Dir->setInits(Exprs.
Inits);
2410 Dir->setUpdates(Exprs.
Updates);
2411 Dir->setFinals(Exprs.
Finals);
2422 return createEmptyDirective<OMPGenericLoopDirective>(
2423 C, NumClauses,
true,
2431 auto *Dir = createDirective<OMPTeamsGenericLoopDirective>(
2432 C, Clauses, AssociatedStmt,
2438 Dir->setPreCond(Exprs.
PreCond);
2439 Dir->setCond(Exprs.
Cond);
2440 Dir->setInit(Exprs.
Init);
2441 Dir->setInc(Exprs.
Inc);
2442 Dir->setIsLastIterVariable(Exprs.
IL);
2443 Dir->setLowerBoundVariable(Exprs.
LB);
2444 Dir->setUpperBoundVariable(Exprs.
UB);
2445 Dir->setStrideVariable(Exprs.
ST);
2446 Dir->setEnsureUpperBound(Exprs.
EUB);
2447 Dir->setNextLowerBound(Exprs.
NLB);
2448 Dir->setNextUpperBound(Exprs.
NUB);
2450 Dir->setPrevLowerBoundVariable(Exprs.
PrevLB);
2451 Dir->setPrevUpperBoundVariable(Exprs.
PrevUB);
2452 Dir->setDistInc(Exprs.
DistInc);
2453 Dir->setPrevEnsureUpperBound(Exprs.
PrevEUB);
2456 Dir->setInits(Exprs.
Inits);
2457 Dir->setUpdates(Exprs.
Updates);
2458 Dir->setFinals(Exprs.
Finals);
2477 unsigned NumClauses,
2479 return createEmptyDirective<OMPTeamsGenericLoopDirective>(
2480 C, NumClauses,
true,
2487 const HelperExprs &Exprs,
bool CanBeParallelFor) {
2488 auto *Dir = createDirective<OMPTargetTeamsGenericLoopDirective>(
2489 C, Clauses, AssociatedStmt,
2490 numLoopChildren(CollapsedNum, OMPD_target_teams_loop), StartLoc, EndLoc,
2495 Dir->setPreCond(Exprs.
PreCond);
2496 Dir->setCond(Exprs.
Cond);
2497 Dir->setInit(Exprs.
Init);
2498 Dir->setInc(Exprs.
Inc);
2499 Dir->setIsLastIterVariable(Exprs.
IL);
2500 Dir->setLowerBoundVariable(Exprs.
LB);
2501 Dir->setUpperBoundVariable(Exprs.
UB);
2502 Dir->setStrideVariable(Exprs.
ST);
2503 Dir->setEnsureUpperBound(Exprs.
EUB);
2504 Dir->setNextLowerBound(Exprs.
NLB);
2505 Dir->setNextUpperBound(Exprs.
NUB);
2507 Dir->setPrevLowerBoundVariable(Exprs.
PrevLB);
2508 Dir->setPrevUpperBoundVariable(Exprs.
PrevUB);
2509 Dir->setDistInc(Exprs.
DistInc);
2510 Dir->setPrevEnsureUpperBound(Exprs.
PrevEUB);
2513 Dir->setInits(Exprs.
Inits);
2514 Dir->setUpdates(Exprs.
Updates);
2515 Dir->setFinals(Exprs.
Finals);
2529 Dir->setCanBeParallelFor(CanBeParallelFor);
2535 unsigned NumClauses,
2536 unsigned CollapsedNum,
2538 return createEmptyDirective<OMPTargetTeamsGenericLoopDirective>(
2539 C, NumClauses,
true,
2547 auto *Dir = createDirective<OMPParallelGenericLoopDirective>(
2548 C, Clauses, AssociatedStmt,
2554 Dir->setPreCond(Exprs.
PreCond);
2555 Dir->setCond(Exprs.
Cond);
2556 Dir->setInit(Exprs.
Init);
2557 Dir->setInc(Exprs.
Inc);
2558 Dir->setIsLastIterVariable(Exprs.
IL);
2559 Dir->setLowerBoundVariable(Exprs.
LB);
2560 Dir->setUpperBoundVariable(Exprs.
UB);
2561 Dir->setStrideVariable(Exprs.
ST);
2562 Dir->setEnsureUpperBound(Exprs.
EUB);
2563 Dir->setNextLowerBound(Exprs.
NLB);
2564 Dir->setNextUpperBound(Exprs.
NUB);
2568 Dir->setInits(Exprs.
Inits);
2569 Dir->setUpdates(Exprs.
Updates);
2570 Dir->setFinals(Exprs.
Finals);
2579 const ASTContext &
C,
unsigned NumClauses,
unsigned CollapsedNum,
2581 return createEmptyDirective<OMPParallelGenericLoopDirective>(
2582 C, NumClauses,
true,
2591 auto *Dir = createDirective<OMPTargetParallelGenericLoopDirective>(
2592 C, Clauses, AssociatedStmt,
2594 EndLoc, CollapsedNum);
2598 Dir->setPreCond(Exprs.
PreCond);
2599 Dir->setCond(Exprs.
Cond);
2600 Dir->setInit(Exprs.
Init);
2601 Dir->setInc(Exprs.
Inc);
2602 Dir->setIsLastIterVariable(Exprs.
IL);
2603 Dir->setLowerBoundVariable(Exprs.
LB);
2604 Dir->setUpperBoundVariable(Exprs.
UB);
2605 Dir->setStrideVariable(Exprs.
ST);
2606 Dir->setEnsureUpperBound(Exprs.
EUB);
2607 Dir->setNextLowerBound(Exprs.
NLB);
2608 Dir->setNextUpperBound(Exprs.
NUB);
2612 Dir->setInits(Exprs.
Inits);
2613 Dir->setUpdates(Exprs.
Updates);
2614 Dir->setFinals(Exprs.
Finals);
2624 unsigned NumClauses,
2625 unsigned CollapsedNum,
2627 return createEmptyDirective<OMPTargetParallelGenericLoopDirective>(
2628 C, NumClauses,
true,
2629 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, 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....