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, {}, AssociatedStmt, TransformedStmtOffset + 1, StartLoc, EndLoc);
456 Dir->setTransformedStmt(TransformedStmt);
457 Dir->setPreInits(PreInits);
462 return createEmptyDirective<OMPReverseDirective>(
470 Stmt *TransformedStmt,
Stmt *PreInits) {
472 C, Clauses, AssociatedStmt, TransformedStmtOffset + 1, StartLoc, EndLoc,
474 Dir->setTransformedStmt(TransformedStmt);
475 Dir->setPreInits(PreInits);
482 return createEmptyDirective<OMPInterchangeDirective>(
483 C, NumClauses,
true, TransformedStmtOffset + 1,
492 auto *Dir = createDirective<OMPForSimdDirective>(
494 StartLoc, EndLoc, CollapsedNum);
498 Dir->setPreCond(Exprs.
PreCond);
499 Dir->setCond(Exprs.
Cond);
500 Dir->setInit(Exprs.
Init);
501 Dir->setInc(Exprs.
Inc);
502 Dir->setIsLastIterVariable(Exprs.
IL);
503 Dir->setLowerBoundVariable(Exprs.
LB);
504 Dir->setUpperBoundVariable(Exprs.
UB);
505 Dir->setStrideVariable(Exprs.
ST);
506 Dir->setEnsureUpperBound(Exprs.
EUB);
507 Dir->setNextLowerBound(Exprs.
NLB);
508 Dir->setNextUpperBound(Exprs.
NUB);
512 Dir->setInits(Exprs.
Inits);
513 Dir->setUpdates(Exprs.
Updates);
514 Dir->setFinals(Exprs.
Finals);
524 unsigned CollapsedNum,
526 return createEmptyDirective<OMPForSimdDirective>(
535 auto *Dir = createDirective<OMPSectionsDirective>(
C, Clauses, AssociatedStmt,
538 Dir->setTaskReductionRefExpr(TaskRedRef);
539 Dir->setHasCancel(HasCancel);
546 return createEmptyDirective<OMPSectionsDirective>(
C, NumClauses,
554 Stmt *AssociatedStmt,
557 createDirective<OMPSectionDirective>(
C, {}, AssociatedStmt,
558 0, StartLoc, EndLoc);
565 return createEmptyDirective<OMPSectionDirective>(
C, 0,
573 Stmt *AssociatedStmt) {
574 return createDirective<OMPScopeDirective>(
C, Clauses, AssociatedStmt,
582 return createEmptyDirective<OMPScopeDirective>(
C, NumClauses,
590 Stmt *AssociatedStmt) {
591 return createDirective<OMPSingleDirective>(
C, Clauses, AssociatedStmt,
599 return createEmptyDirective<OMPSingleDirective>(
C, NumClauses,
606 Stmt *AssociatedStmt) {
607 return createDirective<OMPMasterDirective>(
C, {}, AssociatedStmt,
614 return createEmptyDirective<OMPMasterDirective>(
C, 0,
622 return createDirective<OMPCriticalDirective>(
C, Clauses, AssociatedStmt,
630 return createEmptyDirective<OMPCriticalDirective>(
C, NumClauses,
638 auto *Dir = createDirective<OMPParallelForDirective>(
639 C, Clauses, AssociatedStmt,
640 numLoopChildren(CollapsedNum, OMPD_parallel_for) + 1, StartLoc, EndLoc,
645 Dir->setPreCond(Exprs.
PreCond);
646 Dir->setCond(Exprs.
Cond);
647 Dir->setInit(Exprs.
Init);
648 Dir->setInc(Exprs.
Inc);
649 Dir->setIsLastIterVariable(Exprs.
IL);
650 Dir->setLowerBoundVariable(Exprs.
LB);
651 Dir->setUpperBoundVariable(Exprs.
UB);
652 Dir->setStrideVariable(Exprs.
ST);
653 Dir->setEnsureUpperBound(Exprs.
EUB);
654 Dir->setNextLowerBound(Exprs.
NLB);
655 Dir->setNextUpperBound(Exprs.
NUB);
659 Dir->setInits(Exprs.
Inits);
660 Dir->setUpdates(Exprs.
Updates);
661 Dir->setFinals(Exprs.
Finals);
666 Dir->setTaskReductionRefExpr(TaskRedRef);
667 Dir->setHasCancel(HasCancel);
674 return createEmptyDirective<OMPParallelForDirective>(
683 auto *Dir = createDirective<OMPParallelForSimdDirective>(
684 C, Clauses, AssociatedStmt,
685 numLoopChildren(CollapsedNum, OMPD_parallel_for_simd), StartLoc, EndLoc,
690 Dir->setPreCond(Exprs.
PreCond);
691 Dir->setCond(Exprs.
Cond);
692 Dir->setInit(Exprs.
Init);
693 Dir->setInc(Exprs.
Inc);
694 Dir->setIsLastIterVariable(Exprs.
IL);
695 Dir->setLowerBoundVariable(Exprs.
LB);
696 Dir->setUpperBoundVariable(Exprs.
UB);
697 Dir->setStrideVariable(Exprs.
ST);
698 Dir->setEnsureUpperBound(Exprs.
EUB);
699 Dir->setNextLowerBound(Exprs.
NLB);
700 Dir->setNextUpperBound(Exprs.
NUB);
704 Dir->setInits(Exprs.
Inits);
705 Dir->setUpdates(Exprs.
Updates);
706 Dir->setFinals(Exprs.
Finals);
718 return createEmptyDirective<OMPParallelForSimdDirective>(
726 auto *Dir = createDirective<OMPParallelMasterDirective>(
727 C, Clauses, AssociatedStmt, 1, StartLoc, EndLoc);
728 Dir->setTaskReductionRefExpr(TaskRedRef);
735 return createEmptyDirective<OMPParallelMasterDirective>(
736 C, NumClauses,
true, 1);
742 auto *Dir = createDirective<OMPParallelMaskedDirective>(
743 C, Clauses, AssociatedStmt, 1, StartLoc, EndLoc);
744 Dir->setTaskReductionRefExpr(TaskRedRef);
751 return createEmptyDirective<OMPParallelMaskedDirective>(
752 C, NumClauses,
true, 1);
759 auto *Dir = createDirective<OMPParallelSectionsDirective>(
760 C, Clauses, AssociatedStmt, 1, StartLoc, EndLoc);
761 Dir->setTaskReductionRefExpr(TaskRedRef);
762 Dir->setHasCancel(HasCancel);
769 return createEmptyDirective<OMPParallelSectionsDirective>(
770 C, NumClauses,
true, 1);
776 Stmt *AssociatedStmt,
bool HasCancel) {
777 auto *Dir = createDirective<OMPTaskDirective>(
778 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
779 Dir->setHasCancel(HasCancel);
786 return createEmptyDirective<OMPTaskDirective>(
C, NumClauses,
806 return createDirective<OMPAssumeDirective>(
C, Clauses, AStmt,
814 return createEmptyDirective<OMPAssumeDirective>(
C, NumClauses,
822 return createDirective<OMPErrorDirective>(
823 C, Clauses,
nullptr, 0, StartLoc,
830 return createEmptyDirective<OMPErrorDirective>(
C, NumClauses);
848 return createDirective<OMPTaskwaitDirective>(
849 C, Clauses,
nullptr, 0, StartLoc,
856 return createEmptyDirective<OMPTaskwaitDirective>(
C, NumClauses);
862 auto *Dir = createDirective<OMPTaskgroupDirective>(
863 C, Clauses, AssociatedStmt, 1, StartLoc, EndLoc);
864 Dir->setReductionRef(ReductionRef);
871 return createEmptyDirective<OMPTaskgroupDirective>(
872 C, NumClauses,
true, 1);
879 Dir->setCancelRegion(CancelRegion);
892 auto *Dir = createDirective<OMPCancelDirective>(
893 C, Clauses,
nullptr, 0, StartLoc,
895 Dir->setCancelRegion(CancelRegion);
902 return createEmptyDirective<OMPCancelDirective>(
C, NumClauses);
909 return createDirective<OMPFlushDirective>(
910 C, Clauses,
nullptr, 0, StartLoc,
917 return createEmptyDirective<OMPFlushDirective>(
C, NumClauses);
924 return createDirective<OMPDepobjDirective>(
926 0, StartLoc, EndLoc);
932 return createEmptyDirective<OMPDepobjDirective>(
C, NumClauses);
939 return createDirective<OMPScanDirective>(
C, Clauses,
941 0, StartLoc, EndLoc);
947 return createEmptyDirective<OMPScanDirective>(
C, NumClauses);
954 Stmt *AssociatedStmt) {
955 return createDirective<OMPOrderedDirective>(
956 C, Clauses, cast_or_null<CapturedStmt>(AssociatedStmt),
957 0, StartLoc, EndLoc);
964 return createEmptyDirective<OMPOrderedDirective>(
C, NumClauses,
972 auto *Dir = createDirective<OMPAtomicDirective>(
973 C, Clauses, AssociatedStmt, 7, StartLoc, EndLoc);
977 Dir->setExpr(Exprs.
E);
978 Dir->setUpdateExpr(Exprs.
UE);
980 Dir->setCond(Exprs.
Cond);
983 Dir->Flags.IsFailOnly = Exprs.
IsFailOnly ? 1 : 0;
990 return createEmptyDirective<OMPAtomicDirective>(
991 C, NumClauses,
true, 7);
998 Stmt *AssociatedStmt) {
999 return createDirective<OMPTargetDirective>(
1000 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
1004 unsigned NumClauses,
1006 return createEmptyDirective<OMPTargetDirective>(
C, NumClauses,
1014 auto *Dir = createDirective<OMPTargetParallelDirective>(
1015 C, Clauses, AssociatedStmt, 1, StartLoc, EndLoc);
1016 Dir->setTaskReductionRefExpr(TaskRedRef);
1017 Dir->setHasCancel(HasCancel);
1024 return createEmptyDirective<OMPTargetParallelDirective>(
1025 C, NumClauses,
true, 1);
1032 auto *Dir = createDirective<OMPTargetParallelForDirective>(
1033 C, Clauses, AssociatedStmt,
1034 numLoopChildren(CollapsedNum, OMPD_target_parallel_for) + 1, StartLoc,
1035 EndLoc, CollapsedNum);
1039 Dir->setPreCond(Exprs.
PreCond);
1040 Dir->setCond(Exprs.
Cond);
1041 Dir->setInit(Exprs.
Init);
1042 Dir->setInc(Exprs.
Inc);
1043 Dir->setIsLastIterVariable(Exprs.
IL);
1044 Dir->setLowerBoundVariable(Exprs.
LB);
1045 Dir->setUpperBoundVariable(Exprs.
UB);
1046 Dir->setStrideVariable(Exprs.
ST);
1047 Dir->setEnsureUpperBound(Exprs.
EUB);
1048 Dir->setNextLowerBound(Exprs.
NLB);
1049 Dir->setNextUpperBound(Exprs.
NUB);
1053 Dir->setInits(Exprs.
Inits);
1054 Dir->setUpdates(Exprs.
Updates);
1055 Dir->setFinals(Exprs.
Finals);
1060 Dir->setTaskReductionRefExpr(TaskRedRef);
1061 Dir->setHasCancel(HasCancel);
1067 unsigned NumClauses,
1069 return createEmptyDirective<OMPTargetParallelForDirective>(
1070 C, NumClauses,
true,
1078 return createDirective<OMPTargetDataDirective>(
1079 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
1085 return createEmptyDirective<OMPTargetDataDirective>(
1092 return createDirective<OMPTargetEnterDataDirective>(
1093 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
1099 return createEmptyDirective<OMPTargetEnterDataDirective>(
1106 return createDirective<OMPTargetExitDataDirective>(
1107 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
1113 return createEmptyDirective<OMPTargetExitDataDirective>(
1121 Stmt *AssociatedStmt) {
1122 return createDirective<OMPTeamsDirective>(
1123 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
1127 unsigned NumClauses,
1129 return createEmptyDirective<OMPTeamsDirective>(
C, NumClauses,
1137 auto *Dir = createDirective<OMPTaskLoopDirective>(
1139 StartLoc, EndLoc, CollapsedNum);
1143 Dir->setPreCond(Exprs.
PreCond);
1144 Dir->setCond(Exprs.
Cond);
1145 Dir->setInit(Exprs.
Init);
1146 Dir->setInc(Exprs.
Inc);
1147 Dir->setIsLastIterVariable(Exprs.
IL);
1148 Dir->setLowerBoundVariable(Exprs.
LB);
1149 Dir->setUpperBoundVariable(Exprs.
UB);
1150 Dir->setStrideVariable(Exprs.
ST);
1151 Dir->setEnsureUpperBound(Exprs.
EUB);
1152 Dir->setNextLowerBound(Exprs.
NLB);
1153 Dir->setNextUpperBound(Exprs.
NUB);
1157 Dir->setInits(Exprs.
Inits);
1158 Dir->setUpdates(Exprs.
Updates);
1159 Dir->setFinals(Exprs.
Finals);
1164 Dir->setHasCancel(HasCancel);
1169 unsigned NumClauses,
1170 unsigned CollapsedNum,
1172 return createEmptyDirective<OMPTaskLoopDirective>(
1173 C, NumClauses,
true,
1181 auto *Dir = createDirective<OMPTaskLoopSimdDirective>(
1182 C, Clauses, AssociatedStmt,
1188 Dir->setPreCond(Exprs.
PreCond);
1189 Dir->setCond(Exprs.
Cond);
1190 Dir->setInit(Exprs.
Init);
1191 Dir->setInc(Exprs.
Inc);
1192 Dir->setIsLastIterVariable(Exprs.
IL);
1193 Dir->setLowerBoundVariable(Exprs.
LB);
1194 Dir->setUpperBoundVariable(Exprs.
UB);
1195 Dir->setStrideVariable(Exprs.
ST);
1196 Dir->setEnsureUpperBound(Exprs.
EUB);
1197 Dir->setNextLowerBound(Exprs.
NLB);
1198 Dir->setNextUpperBound(Exprs.
NUB);
1202 Dir->setInits(Exprs.
Inits);
1203 Dir->setUpdates(Exprs.
Updates);
1204 Dir->setFinals(Exprs.
Finals);
1215 return createEmptyDirective<OMPTaskLoopSimdDirective>(
1216 C, NumClauses,
true,
1224 auto *Dir = createDirective<OMPMasterTaskLoopDirective>(
1225 C, Clauses, AssociatedStmt,
1226 numLoopChildren(CollapsedNum, OMPD_master_taskloop), StartLoc, EndLoc,
1231 Dir->setPreCond(Exprs.
PreCond);
1232 Dir->setCond(Exprs.
Cond);
1233 Dir->setInit(Exprs.
Init);
1234 Dir->setInc(Exprs.
Inc);
1235 Dir->setIsLastIterVariable(Exprs.
IL);
1236 Dir->setLowerBoundVariable(Exprs.
LB);
1237 Dir->setUpperBoundVariable(Exprs.
UB);
1238 Dir->setStrideVariable(Exprs.
ST);
1239 Dir->setEnsureUpperBound(Exprs.
EUB);
1240 Dir->setNextLowerBound(Exprs.
NLB);
1241 Dir->setNextUpperBound(Exprs.
NUB);
1245 Dir->setInits(Exprs.
Inits);
1246 Dir->setUpdates(Exprs.
Updates);
1247 Dir->setFinals(Exprs.
Finals);
1252 Dir->setHasCancel(HasCancel);
1258 unsigned NumClauses,
1260 return createEmptyDirective<OMPMasterTaskLoopDirective>(
1261 C, NumClauses,
true,
1269 auto *Dir = createDirective<OMPMaskedTaskLoopDirective>(
1270 C, Clauses, AssociatedStmt,
1271 numLoopChildren(CollapsedNum, OMPD_masked_taskloop), StartLoc, EndLoc,
1276 Dir->setPreCond(Exprs.
PreCond);
1277 Dir->setCond(Exprs.
Cond);
1278 Dir->setInit(Exprs.
Init);
1279 Dir->setInc(Exprs.
Inc);
1280 Dir->setIsLastIterVariable(Exprs.
IL);
1281 Dir->setLowerBoundVariable(Exprs.
LB);
1282 Dir->setUpperBoundVariable(Exprs.
UB);
1283 Dir->setStrideVariable(Exprs.
ST);
1284 Dir->setEnsureUpperBound(Exprs.
EUB);
1285 Dir->setNextLowerBound(Exprs.
NLB);
1286 Dir->setNextUpperBound(Exprs.
NUB);
1290 Dir->setInits(Exprs.
Inits);
1291 Dir->setUpdates(Exprs.
Updates);
1292 Dir->setFinals(Exprs.
Finals);
1297 Dir->setHasCancel(HasCancel);
1303 unsigned NumClauses,
1305 return createEmptyDirective<OMPMaskedTaskLoopDirective>(
1306 C, NumClauses,
true,
1314 auto *Dir = createDirective<OMPMasterTaskLoopSimdDirective>(
1315 C, Clauses, AssociatedStmt,
1317 EndLoc, CollapsedNum);
1321 Dir->setPreCond(Exprs.
PreCond);
1322 Dir->setCond(Exprs.
Cond);
1323 Dir->setInit(Exprs.
Init);
1324 Dir->setInc(Exprs.
Inc);
1325 Dir->setIsLastIterVariable(Exprs.
IL);
1326 Dir->setLowerBoundVariable(Exprs.
LB);
1327 Dir->setUpperBoundVariable(Exprs.
UB);
1328 Dir->setStrideVariable(Exprs.
ST);
1329 Dir->setEnsureUpperBound(Exprs.
EUB);
1330 Dir->setNextLowerBound(Exprs.
NLB);
1331 Dir->setNextUpperBound(Exprs.
NUB);
1335 Dir->setInits(Exprs.
Inits);
1336 Dir->setUpdates(Exprs.
Updates);
1337 Dir->setFinals(Exprs.
Finals);
1347 unsigned NumClauses,
1349 return createEmptyDirective<OMPMasterTaskLoopSimdDirective>(
1350 C, NumClauses,
true,
1351 numLoopChildren(CollapsedNum, OMPD_master_taskloop_simd), CollapsedNum);
1358 auto *Dir = createDirective<OMPMaskedTaskLoopSimdDirective>(
1359 C, Clauses, AssociatedStmt,
1361 EndLoc, CollapsedNum);
1365 Dir->setPreCond(Exprs.
PreCond);
1366 Dir->setCond(Exprs.
Cond);
1367 Dir->setInit(Exprs.
Init);
1368 Dir->setInc(Exprs.
Inc);
1369 Dir->setIsLastIterVariable(Exprs.
IL);
1370 Dir->setLowerBoundVariable(Exprs.
LB);
1371 Dir->setUpperBoundVariable(Exprs.
UB);
1372 Dir->setStrideVariable(Exprs.
ST);
1373 Dir->setEnsureUpperBound(Exprs.
EUB);
1374 Dir->setNextLowerBound(Exprs.
NLB);
1375 Dir->setNextUpperBound(Exprs.
NUB);
1379 Dir->setInits(Exprs.
Inits);
1380 Dir->setUpdates(Exprs.
Updates);
1381 Dir->setFinals(Exprs.
Finals);
1391 unsigned NumClauses,
1393 return createEmptyDirective<OMPMaskedTaskLoopSimdDirective>(
1394 C, NumClauses,
true,
1395 numLoopChildren(CollapsedNum, OMPD_masked_taskloop_simd), CollapsedNum);
1402 auto *Dir = createDirective<OMPParallelMasterTaskLoopDirective>(
1403 C, Clauses, AssociatedStmt,
1404 numLoopChildren(CollapsedNum, OMPD_parallel_master_taskloop), StartLoc,
1405 EndLoc, CollapsedNum);
1409 Dir->setPreCond(Exprs.
PreCond);
1410 Dir->setCond(Exprs.
Cond);
1411 Dir->setInit(Exprs.
Init);
1412 Dir->setInc(Exprs.
Inc);
1413 Dir->setIsLastIterVariable(Exprs.
IL);
1414 Dir->setLowerBoundVariable(Exprs.
LB);
1415 Dir->setUpperBoundVariable(Exprs.
UB);
1416 Dir->setStrideVariable(Exprs.
ST);
1417 Dir->setEnsureUpperBound(Exprs.
EUB);
1418 Dir->setNextLowerBound(Exprs.
NLB);
1419 Dir->setNextUpperBound(Exprs.
NUB);
1423 Dir->setInits(Exprs.
Inits);
1424 Dir->setUpdates(Exprs.
Updates);
1425 Dir->setFinals(Exprs.
Finals);
1430 Dir->setHasCancel(HasCancel);
1436 unsigned NumClauses,
1437 unsigned CollapsedNum,
1439 return createEmptyDirective<OMPParallelMasterTaskLoopDirective>(
1440 C, NumClauses,
true,
1449 auto *Dir = createDirective<OMPParallelMaskedTaskLoopDirective>(
1450 C, Clauses, AssociatedStmt,
1451 numLoopChildren(CollapsedNum, OMPD_parallel_masked_taskloop), StartLoc,
1452 EndLoc, CollapsedNum);
1456 Dir->setPreCond(Exprs.
PreCond);
1457 Dir->setCond(Exprs.
Cond);
1458 Dir->setInit(Exprs.
Init);
1459 Dir->setInc(Exprs.
Inc);
1460 Dir->setIsLastIterVariable(Exprs.
IL);
1461 Dir->setLowerBoundVariable(Exprs.
LB);
1462 Dir->setUpperBoundVariable(Exprs.
UB);
1463 Dir->setStrideVariable(Exprs.
ST);
1464 Dir->setEnsureUpperBound(Exprs.
EUB);
1465 Dir->setNextLowerBound(Exprs.
NLB);
1466 Dir->setNextUpperBound(Exprs.
NUB);
1470 Dir->setInits(Exprs.
Inits);
1471 Dir->setUpdates(Exprs.
Updates);
1472 Dir->setFinals(Exprs.
Finals);
1477 Dir->setHasCancel(HasCancel);
1483 unsigned NumClauses,
1484 unsigned CollapsedNum,
1486 return createEmptyDirective<OMPParallelMaskedTaskLoopDirective>(
1487 C, NumClauses,
true,
1497 auto *Dir = createDirective<OMPParallelMasterTaskLoopSimdDirective>(
1498 C, Clauses, AssociatedStmt,
1500 StartLoc, EndLoc, CollapsedNum);
1504 Dir->setPreCond(Exprs.
PreCond);
1505 Dir->setCond(Exprs.
Cond);
1506 Dir->setInit(Exprs.
Init);
1507 Dir->setInc(Exprs.
Inc);
1508 Dir->setIsLastIterVariable(Exprs.
IL);
1509 Dir->setLowerBoundVariable(Exprs.
LB);
1510 Dir->setUpperBoundVariable(Exprs.
UB);
1511 Dir->setStrideVariable(Exprs.
ST);
1512 Dir->setEnsureUpperBound(Exprs.
EUB);
1513 Dir->setNextLowerBound(Exprs.
NLB);
1514 Dir->setNextUpperBound(Exprs.
NUB);
1518 Dir->setInits(Exprs.
Inits);
1519 Dir->setUpdates(Exprs.
Updates);
1520 Dir->setFinals(Exprs.
Finals);
1530 unsigned NumClauses,
1531 unsigned CollapsedNum,
1533 return createEmptyDirective<OMPParallelMasterTaskLoopSimdDirective>(
1534 C, NumClauses,
true,
1544 auto *Dir = createDirective<OMPParallelMaskedTaskLoopSimdDirective>(
1545 C, Clauses, AssociatedStmt,
1547 StartLoc, EndLoc, CollapsedNum);
1551 Dir->setPreCond(Exprs.
PreCond);
1552 Dir->setCond(Exprs.
Cond);
1553 Dir->setInit(Exprs.
Init);
1554 Dir->setInc(Exprs.
Inc);
1555 Dir->setIsLastIterVariable(Exprs.
IL);
1556 Dir->setLowerBoundVariable(Exprs.
LB);
1557 Dir->setUpperBoundVariable(Exprs.
UB);
1558 Dir->setStrideVariable(Exprs.
ST);
1559 Dir->setEnsureUpperBound(Exprs.
EUB);
1560 Dir->setNextLowerBound(Exprs.
NLB);
1561 Dir->setNextUpperBound(Exprs.
NUB);
1565 Dir->setInits(Exprs.
Inits);
1566 Dir->setUpdates(Exprs.
Updates);
1567 Dir->setFinals(Exprs.
Finals);
1577 unsigned NumClauses,
1578 unsigned CollapsedNum,
1580 return createEmptyDirective<OMPParallelMaskedTaskLoopSimdDirective>(
1581 C, NumClauses,
true,
1591 auto *Dir = createDirective<OMPDistributeDirective>(
1592 C, Clauses, AssociatedStmt,
1598 Dir->setPreCond(Exprs.
PreCond);
1599 Dir->setCond(Exprs.
Cond);
1600 Dir->setInit(Exprs.
Init);
1601 Dir->setInc(Exprs.
Inc);
1602 Dir->setIsLastIterVariable(Exprs.
IL);
1603 Dir->setLowerBoundVariable(Exprs.
LB);
1604 Dir->setUpperBoundVariable(Exprs.
UB);
1605 Dir->setStrideVariable(Exprs.
ST);
1606 Dir->setEnsureUpperBound(Exprs.
EUB);
1607 Dir->setNextLowerBound(Exprs.
NLB);
1608 Dir->setNextUpperBound(Exprs.
NUB);
1612 Dir->setInits(Exprs.
Inits);
1613 Dir->setUpdates(Exprs.
Updates);
1614 Dir->setFinals(Exprs.
Finals);
1625 return createEmptyDirective<OMPDistributeDirective>(
1626 C, NumClauses,
true,
1633 return createDirective<OMPTargetUpdateDirective>(
C, Clauses, AssociatedStmt,
1641 return createEmptyDirective<OMPTargetUpdateDirective>(
1642 C, NumClauses,
true);
1649 auto *Dir = createDirective<OMPDistributeParallelForDirective>(
1650 C, Clauses, AssociatedStmt,
1651 numLoopChildren(CollapsedNum, OMPD_distribute_parallel_for) + 1, StartLoc,
1652 EndLoc, CollapsedNum);
1656 Dir->setPreCond(Exprs.
PreCond);
1657 Dir->setCond(Exprs.
Cond);
1658 Dir->setInit(Exprs.
Init);
1659 Dir->setInc(Exprs.
Inc);
1660 Dir->setIsLastIterVariable(Exprs.
IL);
1661 Dir->setLowerBoundVariable(Exprs.
LB);
1662 Dir->setUpperBoundVariable(Exprs.
UB);
1663 Dir->setStrideVariable(Exprs.
ST);
1664 Dir->setEnsureUpperBound(Exprs.
EUB);
1665 Dir->setNextLowerBound(Exprs.
NLB);
1666 Dir->setNextUpperBound(Exprs.
NUB);
1668 Dir->setPrevLowerBoundVariable(Exprs.
PrevLB);
1669 Dir->setPrevUpperBoundVariable(Exprs.
PrevUB);
1670 Dir->setDistInc(Exprs.
DistInc);
1671 Dir->setPrevEnsureUpperBound(Exprs.
PrevEUB);
1674 Dir->setInits(Exprs.
Inits);
1675 Dir->setUpdates(Exprs.
Updates);
1676 Dir->setFinals(Exprs.
Finals);
1690 Dir->setTaskReductionRefExpr(TaskRedRef);
1691 Dir->HasCancel = HasCancel;
1697 unsigned NumClauses,
1698 unsigned CollapsedNum,
1700 return createEmptyDirective<OMPDistributeParallelForDirective>(
1701 C, NumClauses,
true,
1711 auto *Dir = createDirective<OMPDistributeParallelForSimdDirective>(
1712 C, Clauses, AssociatedStmt,
1714 StartLoc, EndLoc, CollapsedNum);
1718 Dir->setPreCond(Exprs.
PreCond);
1719 Dir->setCond(Exprs.
Cond);
1720 Dir->setInit(Exprs.
Init);
1721 Dir->setInc(Exprs.
Inc);
1722 Dir->setIsLastIterVariable(Exprs.
IL);
1723 Dir->setLowerBoundVariable(Exprs.
LB);
1724 Dir->setUpperBoundVariable(Exprs.
UB);
1725 Dir->setStrideVariable(Exprs.
ST);
1726 Dir->setEnsureUpperBound(Exprs.
EUB);
1727 Dir->setNextLowerBound(Exprs.
NLB);
1728 Dir->setNextUpperBound(Exprs.
NUB);
1730 Dir->setPrevLowerBoundVariable(Exprs.
PrevLB);
1731 Dir->setPrevUpperBoundVariable(Exprs.
PrevUB);
1732 Dir->setDistInc(Exprs.
DistInc);
1733 Dir->setPrevEnsureUpperBound(Exprs.
PrevEUB);
1736 Dir->setInits(Exprs.
Inits);
1737 Dir->setUpdates(Exprs.
Updates);
1738 Dir->setFinals(Exprs.
Finals);
1757 unsigned NumClauses,
1758 unsigned CollapsedNum,
1760 return createEmptyDirective<OMPDistributeParallelForSimdDirective>(
1761 C, NumClauses,
true,
1770 auto *Dir = createDirective<OMPDistributeSimdDirective>(
1771 C, Clauses, AssociatedStmt,
1772 numLoopChildren(CollapsedNum, OMPD_distribute_simd), StartLoc, EndLoc,
1777 Dir->setPreCond(Exprs.
PreCond);
1778 Dir->setCond(Exprs.
Cond);
1779 Dir->setInit(Exprs.
Init);
1780 Dir->setInc(Exprs.
Inc);
1781 Dir->setIsLastIterVariable(Exprs.
IL);
1782 Dir->setLowerBoundVariable(Exprs.
LB);
1783 Dir->setUpperBoundVariable(Exprs.
UB);
1784 Dir->setStrideVariable(Exprs.
ST);
1785 Dir->setEnsureUpperBound(Exprs.
EUB);
1786 Dir->setNextLowerBound(Exprs.
NLB);
1787 Dir->setNextUpperBound(Exprs.
NUB);
1791 Dir->setInits(Exprs.
Inits);
1792 Dir->setUpdates(Exprs.
Updates);
1793 Dir->setFinals(Exprs.
Finals);
1803 unsigned NumClauses,
1805 return createEmptyDirective<OMPDistributeSimdDirective>(
1806 C, NumClauses,
true,
1814 auto *Dir = createDirective<OMPTargetParallelForSimdDirective>(
1815 C, Clauses, AssociatedStmt,
1816 numLoopChildren(CollapsedNum, OMPD_target_parallel_for_simd), StartLoc,
1817 EndLoc, CollapsedNum);
1821 Dir->setPreCond(Exprs.
PreCond);
1822 Dir->setCond(Exprs.
Cond);
1823 Dir->setInit(Exprs.
Init);
1824 Dir->setInc(Exprs.
Inc);
1825 Dir->setIsLastIterVariable(Exprs.
IL);
1826 Dir->setLowerBoundVariable(Exprs.
LB);
1827 Dir->setUpperBoundVariable(Exprs.
UB);
1828 Dir->setStrideVariable(Exprs.
ST);
1829 Dir->setEnsureUpperBound(Exprs.
EUB);
1830 Dir->setNextLowerBound(Exprs.
NLB);
1831 Dir->setNextUpperBound(Exprs.
NUB);
1835 Dir->setInits(Exprs.
Inits);
1836 Dir->setUpdates(Exprs.
Updates);
1837 Dir->setFinals(Exprs.
Finals);
1847 unsigned NumClauses,
1848 unsigned CollapsedNum,
1850 return createEmptyDirective<OMPTargetParallelForSimdDirective>(
1851 C, NumClauses,
true,
1861 auto *Dir = createDirective<OMPTargetSimdDirective>(
1862 C, Clauses, AssociatedStmt,
1868 Dir->setPreCond(Exprs.
PreCond);
1869 Dir->setCond(Exprs.
Cond);
1870 Dir->setInit(Exprs.
Init);
1871 Dir->setInc(Exprs.
Inc);
1874 Dir->setInits(Exprs.
Inits);
1875 Dir->setUpdates(Exprs.
Updates);
1876 Dir->setFinals(Exprs.
Finals);
1887 return createEmptyDirective<OMPTargetSimdDirective>(
1888 C, NumClauses,
true,
1896 auto *Dir = createDirective<OMPTeamsDistributeDirective>(
1897 C, Clauses, AssociatedStmt,
1898 numLoopChildren(CollapsedNum, OMPD_teams_distribute), StartLoc, EndLoc,
1903 Dir->setPreCond(Exprs.
PreCond);
1904 Dir->setCond(Exprs.
Cond);
1905 Dir->setInit(Exprs.
Init);
1906 Dir->setInc(Exprs.
Inc);
1907 Dir->setIsLastIterVariable(Exprs.
IL);
1908 Dir->setLowerBoundVariable(Exprs.
LB);
1909 Dir->setUpperBoundVariable(Exprs.
UB);
1910 Dir->setStrideVariable(Exprs.
ST);
1911 Dir->setEnsureUpperBound(Exprs.
EUB);
1912 Dir->setNextLowerBound(Exprs.
NLB);
1913 Dir->setNextUpperBound(Exprs.
NUB);
1917 Dir->setInits(Exprs.
Inits);
1918 Dir->setUpdates(Exprs.
Updates);
1919 Dir->setFinals(Exprs.
Finals);
1929 unsigned NumClauses,
1931 return createEmptyDirective<OMPTeamsDistributeDirective>(
1932 C, NumClauses,
true,
1940 auto *Dir = createDirective<OMPTeamsDistributeSimdDirective>(
1941 C, Clauses, AssociatedStmt,
1943 EndLoc, CollapsedNum);
1947 Dir->setPreCond(Exprs.
PreCond);
1948 Dir->setCond(Exprs.
Cond);
1949 Dir->setInit(Exprs.
Init);
1950 Dir->setInc(Exprs.
Inc);
1951 Dir->setIsLastIterVariable(Exprs.
IL);
1952 Dir->setLowerBoundVariable(Exprs.
LB);
1953 Dir->setUpperBoundVariable(Exprs.
UB);
1954 Dir->setStrideVariable(Exprs.
ST);
1955 Dir->setEnsureUpperBound(Exprs.
EUB);
1956 Dir->setNextLowerBound(Exprs.
NLB);
1957 Dir->setNextUpperBound(Exprs.
NUB);
1961 Dir->setInits(Exprs.
Inits);
1962 Dir->setUpdates(Exprs.
Updates);
1963 Dir->setFinals(Exprs.
Finals);
1972 const ASTContext &
C,
unsigned NumClauses,
unsigned CollapsedNum,
1974 return createEmptyDirective<OMPTeamsDistributeSimdDirective>(
1975 C, NumClauses,
true,
1976 numLoopChildren(CollapsedNum, OMPD_teams_distribute_simd), CollapsedNum);
1984 auto *Dir = createDirective<OMPTeamsDistributeParallelForSimdDirective>(
1985 C, Clauses, AssociatedStmt,
1986 numLoopChildren(CollapsedNum, OMPD_teams_distribute_parallel_for_simd),
1987 StartLoc, EndLoc, CollapsedNum);
1991 Dir->setPreCond(Exprs.
PreCond);
1992 Dir->setCond(Exprs.
Cond);
1993 Dir->setInit(Exprs.
Init);
1994 Dir->setInc(Exprs.
Inc);
1995 Dir->setIsLastIterVariable(Exprs.
IL);
1996 Dir->setLowerBoundVariable(Exprs.
LB);
1997 Dir->setUpperBoundVariable(Exprs.
UB);
1998 Dir->setStrideVariable(Exprs.
ST);
1999 Dir->setEnsureUpperBound(Exprs.
EUB);
2000 Dir->setNextLowerBound(Exprs.
NLB);
2001 Dir->setNextUpperBound(Exprs.
NUB);
2003 Dir->setPrevLowerBoundVariable(Exprs.
PrevLB);
2004 Dir->setPrevUpperBoundVariable(Exprs.
PrevUB);
2005 Dir->setDistInc(Exprs.
DistInc);
2006 Dir->setPrevEnsureUpperBound(Exprs.
PrevEUB);
2009 Dir->setInits(Exprs.
Inits);
2010 Dir->setUpdates(Exprs.
Updates);
2011 Dir->setFinals(Exprs.
Finals);
2030 unsigned NumClauses,
2031 unsigned CollapsedNum,
2033 return createEmptyDirective<OMPTeamsDistributeParallelForSimdDirective>(
2034 C, NumClauses,
true,
2035 numLoopChildren(CollapsedNum, OMPD_teams_distribute_parallel_for_simd),
2044 auto *Dir = createDirective<OMPTeamsDistributeParallelForDirective>(
2045 C, Clauses, AssociatedStmt,
2046 numLoopChildren(CollapsedNum, OMPD_teams_distribute_parallel_for) + 1,
2047 StartLoc, EndLoc, CollapsedNum);
2051 Dir->setPreCond(Exprs.
PreCond);
2052 Dir->setCond(Exprs.
Cond);
2053 Dir->setInit(Exprs.
Init);
2054 Dir->setInc(Exprs.
Inc);
2055 Dir->setIsLastIterVariable(Exprs.
IL);
2056 Dir->setLowerBoundVariable(Exprs.
LB);
2057 Dir->setUpperBoundVariable(Exprs.
UB);
2058 Dir->setStrideVariable(Exprs.
ST);
2059 Dir->setEnsureUpperBound(Exprs.
EUB);
2060 Dir->setNextLowerBound(Exprs.
NLB);
2061 Dir->setNextUpperBound(Exprs.
NUB);
2063 Dir->setPrevLowerBoundVariable(Exprs.
PrevLB);
2064 Dir->setPrevUpperBoundVariable(Exprs.
PrevUB);
2065 Dir->setDistInc(Exprs.
DistInc);
2066 Dir->setPrevEnsureUpperBound(Exprs.
PrevEUB);
2069 Dir->setInits(Exprs.
Inits);
2070 Dir->setUpdates(Exprs.
Updates);
2071 Dir->setFinals(Exprs.
Finals);
2085 Dir->setTaskReductionRefExpr(TaskRedRef);
2086 Dir->HasCancel = HasCancel;
2092 unsigned NumClauses,
2093 unsigned CollapsedNum,
2095 return createEmptyDirective<OMPTeamsDistributeParallelForDirective>(
2096 C, NumClauses,
true,
2097 numLoopChildren(CollapsedNum, OMPD_teams_distribute_parallel_for) + 1,
2104 return createDirective<OMPTargetTeamsDirective>(
C, Clauses, AssociatedStmt,
2112 return createEmptyDirective<OMPTargetTeamsDirective>(
2113 C, NumClauses,
true);
2120 auto *Dir = createDirective<OMPTargetTeamsDistributeDirective>(
2121 C, Clauses, AssociatedStmt,
2122 numLoopChildren(CollapsedNum, OMPD_target_teams_distribute), StartLoc,
2123 EndLoc, CollapsedNum);
2127 Dir->setPreCond(Exprs.
PreCond);
2128 Dir->setCond(Exprs.
Cond);
2129 Dir->setInit(Exprs.
Init);
2130 Dir->setInc(Exprs.
Inc);
2131 Dir->setIsLastIterVariable(Exprs.
IL);
2132 Dir->setLowerBoundVariable(Exprs.
LB);
2133 Dir->setUpperBoundVariable(Exprs.
UB);
2134 Dir->setStrideVariable(Exprs.
ST);
2135 Dir->setEnsureUpperBound(Exprs.
EUB);
2136 Dir->setNextLowerBound(Exprs.
NLB);
2137 Dir->setNextUpperBound(Exprs.
NUB);
2141 Dir->setInits(Exprs.
Inits);
2142 Dir->setUpdates(Exprs.
Updates);
2143 Dir->setFinals(Exprs.
Finals);
2153 unsigned NumClauses,
2154 unsigned CollapsedNum,
2156 return createEmptyDirective<OMPTargetTeamsDistributeDirective>(
2157 C, NumClauses,
true,
2167 auto *Dir = createDirective<OMPTargetTeamsDistributeParallelForDirective>(
2168 C, Clauses, AssociatedStmt,
2169 numLoopChildren(CollapsedNum, OMPD_target_teams_distribute_parallel_for) +
2171 StartLoc, EndLoc, CollapsedNum);
2175 Dir->setPreCond(Exprs.
PreCond);
2176 Dir->setCond(Exprs.
Cond);
2177 Dir->setInit(Exprs.
Init);
2178 Dir->setInc(Exprs.
Inc);
2179 Dir->setIsLastIterVariable(Exprs.
IL);
2180 Dir->setLowerBoundVariable(Exprs.
LB);
2181 Dir->setUpperBoundVariable(Exprs.
UB);
2182 Dir->setStrideVariable(Exprs.
ST);
2183 Dir->setEnsureUpperBound(Exprs.
EUB);
2184 Dir->setNextLowerBound(Exprs.
NLB);
2185 Dir->setNextUpperBound(Exprs.
NUB);
2187 Dir->setPrevLowerBoundVariable(Exprs.
PrevLB);
2188 Dir->setPrevUpperBoundVariable(Exprs.
PrevUB);
2189 Dir->setDistInc(Exprs.
DistInc);
2190 Dir->setPrevEnsureUpperBound(Exprs.
PrevEUB);
2193 Dir->setInits(Exprs.
Inits);
2194 Dir->setUpdates(Exprs.
Updates);
2195 Dir->setFinals(Exprs.
Finals);
2209 Dir->setTaskReductionRefExpr(TaskRedRef);
2210 Dir->HasCancel = HasCancel;
2216 unsigned NumClauses,
2217 unsigned CollapsedNum,
2219 return createEmptyDirective<OMPTargetTeamsDistributeParallelForDirective>(
2220 C, NumClauses,
true,
2221 numLoopChildren(CollapsedNum, OMPD_target_teams_distribute_parallel_for) +
2231 auto *Dir = createDirective<OMPTargetTeamsDistributeParallelForSimdDirective>(
2232 C, Clauses, AssociatedStmt,
2234 OMPD_target_teams_distribute_parallel_for_simd),
2235 StartLoc, EndLoc, CollapsedNum);
2239 Dir->setPreCond(Exprs.
PreCond);
2240 Dir->setCond(Exprs.
Cond);
2241 Dir->setInit(Exprs.
Init);
2242 Dir->setInc(Exprs.
Inc);
2243 Dir->setIsLastIterVariable(Exprs.
IL);
2244 Dir->setLowerBoundVariable(Exprs.
LB);
2245 Dir->setUpperBoundVariable(Exprs.
UB);
2246 Dir->setStrideVariable(Exprs.
ST);
2247 Dir->setEnsureUpperBound(Exprs.
EUB);
2248 Dir->setNextLowerBound(Exprs.
NLB);
2249 Dir->setNextUpperBound(Exprs.
NUB);
2251 Dir->setPrevLowerBoundVariable(Exprs.
PrevLB);
2252 Dir->setPrevUpperBoundVariable(Exprs.
PrevUB);
2253 Dir->setDistInc(Exprs.
DistInc);
2254 Dir->setPrevEnsureUpperBound(Exprs.
PrevEUB);
2257 Dir->setInits(Exprs.
Inits);
2258 Dir->setUpdates(Exprs.
Updates);
2259 Dir->setFinals(Exprs.
Finals);
2278 const ASTContext &
C,
unsigned NumClauses,
unsigned CollapsedNum,
2280 return createEmptyDirective<OMPTargetTeamsDistributeParallelForSimdDirective>(
2281 C, NumClauses,
true,
2283 OMPD_target_teams_distribute_parallel_for_simd),
2292 auto *Dir = createDirective<OMPTargetTeamsDistributeSimdDirective>(
2293 C, Clauses, AssociatedStmt,
2295 StartLoc, EndLoc, CollapsedNum);
2299 Dir->setPreCond(Exprs.
PreCond);
2300 Dir->setCond(Exprs.
Cond);
2301 Dir->setInit(Exprs.
Init);
2302 Dir->setInc(Exprs.
Inc);
2303 Dir->setIsLastIterVariable(Exprs.
IL);
2304 Dir->setLowerBoundVariable(Exprs.
LB);
2305 Dir->setUpperBoundVariable(Exprs.
UB);
2306 Dir->setStrideVariable(Exprs.
ST);
2307 Dir->setEnsureUpperBound(Exprs.
EUB);
2308 Dir->setNextLowerBound(Exprs.
NLB);
2309 Dir->setNextUpperBound(Exprs.
NUB);
2313 Dir->setInits(Exprs.
Inits);
2314 Dir->setUpdates(Exprs.
Updates);
2315 Dir->setFinals(Exprs.
Finals);
2325 unsigned NumClauses,
2326 unsigned CollapsedNum,
2328 return createEmptyDirective<OMPTargetTeamsDistributeSimdDirective>(
2329 C, NumClauses,
true,
2338 return createDirective<OMPInteropDirective>(
2339 C, Clauses,
nullptr, 0, StartLoc,
2344 unsigned NumClauses,
2346 return createEmptyDirective<OMPInteropDirective>(
C, NumClauses);
2353 auto *Dir = createDirective<OMPDispatchDirective>(
2354 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
2355 Dir->setTargetCallLoc(TargetCallLoc);
2360 unsigned NumClauses,
2362 return createEmptyDirective<OMPDispatchDirective>(
C, NumClauses,
2371 Stmt *AssociatedStmt) {
2372 return createDirective<OMPMaskedDirective>(
C, Clauses, AssociatedStmt,
2378 unsigned NumClauses,
2380 return createEmptyDirective<OMPMaskedDirective>(
C, NumClauses,
2388 auto *Dir = createDirective<OMPGenericLoopDirective>(
2390 StartLoc, EndLoc, CollapsedNum);
2394 Dir->setPreCond(Exprs.
PreCond);
2395 Dir->setCond(Exprs.
Cond);
2396 Dir->setInit(Exprs.
Init);
2397 Dir->setInc(Exprs.
Inc);
2398 Dir->setIsLastIterVariable(Exprs.
IL);
2399 Dir->setLowerBoundVariable(Exprs.
LB);
2400 Dir->setUpperBoundVariable(Exprs.
UB);
2401 Dir->setStrideVariable(Exprs.
ST);
2402 Dir->setEnsureUpperBound(Exprs.
EUB);
2403 Dir->setNextLowerBound(Exprs.
NLB);
2404 Dir->setNextUpperBound(Exprs.
NUB);
2408 Dir->setInits(Exprs.
Inits);
2409 Dir->setUpdates(Exprs.
Updates);
2410 Dir->setFinals(Exprs.
Finals);
2421 return createEmptyDirective<OMPGenericLoopDirective>(
2422 C, NumClauses,
true,
2430 auto *Dir = createDirective<OMPTeamsGenericLoopDirective>(
2431 C, Clauses, AssociatedStmt,
2437 Dir->setPreCond(Exprs.
PreCond);
2438 Dir->setCond(Exprs.
Cond);
2439 Dir->setInit(Exprs.
Init);
2440 Dir->setInc(Exprs.
Inc);
2441 Dir->setIsLastIterVariable(Exprs.
IL);
2442 Dir->setLowerBoundVariable(Exprs.
LB);
2443 Dir->setUpperBoundVariable(Exprs.
UB);
2444 Dir->setStrideVariable(Exprs.
ST);
2445 Dir->setEnsureUpperBound(Exprs.
EUB);
2446 Dir->setNextLowerBound(Exprs.
NLB);
2447 Dir->setNextUpperBound(Exprs.
NUB);
2449 Dir->setPrevLowerBoundVariable(Exprs.
PrevLB);
2450 Dir->setPrevUpperBoundVariable(Exprs.
PrevUB);
2451 Dir->setDistInc(Exprs.
DistInc);
2452 Dir->setPrevEnsureUpperBound(Exprs.
PrevEUB);
2455 Dir->setInits(Exprs.
Inits);
2456 Dir->setUpdates(Exprs.
Updates);
2457 Dir->setFinals(Exprs.
Finals);
2476 unsigned NumClauses,
2478 return createEmptyDirective<OMPTeamsGenericLoopDirective>(
2479 C, NumClauses,
true,
2486 const HelperExprs &Exprs,
bool CanBeParallelFor) {
2487 auto *Dir = createDirective<OMPTargetTeamsGenericLoopDirective>(
2488 C, Clauses, AssociatedStmt,
2489 numLoopChildren(CollapsedNum, OMPD_target_teams_loop), StartLoc, EndLoc,
2494 Dir->setPreCond(Exprs.
PreCond);
2495 Dir->setCond(Exprs.
Cond);
2496 Dir->setInit(Exprs.
Init);
2497 Dir->setInc(Exprs.
Inc);
2498 Dir->setIsLastIterVariable(Exprs.
IL);
2499 Dir->setLowerBoundVariable(Exprs.
LB);
2500 Dir->setUpperBoundVariable(Exprs.
UB);
2501 Dir->setStrideVariable(Exprs.
ST);
2502 Dir->setEnsureUpperBound(Exprs.
EUB);
2503 Dir->setNextLowerBound(Exprs.
NLB);
2504 Dir->setNextUpperBound(Exprs.
NUB);
2506 Dir->setPrevLowerBoundVariable(Exprs.
PrevLB);
2507 Dir->setPrevUpperBoundVariable(Exprs.
PrevUB);
2508 Dir->setDistInc(Exprs.
DistInc);
2509 Dir->setPrevEnsureUpperBound(Exprs.
PrevEUB);
2512 Dir->setInits(Exprs.
Inits);
2513 Dir->setUpdates(Exprs.
Updates);
2514 Dir->setFinals(Exprs.
Finals);
2528 Dir->setCanBeParallelFor(CanBeParallelFor);
2534 unsigned NumClauses,
2535 unsigned CollapsedNum,
2537 return createEmptyDirective<OMPTargetTeamsGenericLoopDirective>(
2538 C, NumClauses,
true,
2546 auto *Dir = createDirective<OMPParallelGenericLoopDirective>(
2547 C, Clauses, AssociatedStmt,
2553 Dir->setPreCond(Exprs.
PreCond);
2554 Dir->setCond(Exprs.
Cond);
2555 Dir->setInit(Exprs.
Init);
2556 Dir->setInc(Exprs.
Inc);
2557 Dir->setIsLastIterVariable(Exprs.
IL);
2558 Dir->setLowerBoundVariable(Exprs.
LB);
2559 Dir->setUpperBoundVariable(Exprs.
UB);
2560 Dir->setStrideVariable(Exprs.
ST);
2561 Dir->setEnsureUpperBound(Exprs.
EUB);
2562 Dir->setNextLowerBound(Exprs.
NLB);
2563 Dir->setNextUpperBound(Exprs.
NUB);
2567 Dir->setInits(Exprs.
Inits);
2568 Dir->setUpdates(Exprs.
Updates);
2569 Dir->setFinals(Exprs.
Finals);
2578 const ASTContext &
C,
unsigned NumClauses,
unsigned CollapsedNum,
2580 return createEmptyDirective<OMPParallelGenericLoopDirective>(
2581 C, NumClauses,
true,
2590 auto *Dir = createDirective<OMPTargetParallelGenericLoopDirective>(
2591 C, Clauses, AssociatedStmt,
2593 EndLoc, CollapsedNum);
2597 Dir->setPreCond(Exprs.
PreCond);
2598 Dir->setCond(Exprs.
Cond);
2599 Dir->setInit(Exprs.
Init);
2600 Dir->setInc(Exprs.
Inc);
2601 Dir->setIsLastIterVariable(Exprs.
IL);
2602 Dir->setLowerBoundVariable(Exprs.
LB);
2603 Dir->setUpperBoundVariable(Exprs.
UB);
2604 Dir->setStrideVariable(Exprs.
ST);
2605 Dir->setEnsureUpperBound(Exprs.
EUB);
2606 Dir->setNextLowerBound(Exprs.
NLB);
2607 Dir->setNextUpperBound(Exprs.
NUB);
2611 Dir->setInits(Exprs.
Inits);
2612 Dir->setUpdates(Exprs.
Updates);
2613 Dir->setFinals(Exprs.
Finals);
2623 unsigned NumClauses,
2624 unsigned CollapsedNum,
2626 return createEmptyDirective<OMPTargetParallelGenericLoopDirective>(
2627 C, NumClauses,
true,
2628 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.
void setHasCancel(bool Has)
Set cancel state.
static OMPSectionDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AssociatedStmt, bool HasCancel)
Creates directive.
This represents '#pragma omp sections' directive.
static OMPSectionsDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef, bool HasCancel)
Creates directive with a list of Clauses.
static OMPSectionsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp simd' directive.
static OMPSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp single' directive.
static OMPSingleDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
static OMPSingleDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#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....