19using namespace llvm::omp;
22const OMPInvariantPredicateBoundAttr *
23OMPLoopBasedDirective::getIntraTileHint(
const Stmt *S) {
24 if (
const auto *AS = dyn_cast_or_null<AttributedStmt>(S))
30Stmt *OMPLoopBasedDirective::ignoreIntraTileHint(
Stmt *S) {
31 if (
auto *AS = dyn_cast_or_null<AttributedStmt>(S))
33 return AS->getSubStmt();
38 auto *CS = dyn_cast_or_null<CompoundStmt>(Body);
39 if (!CS || CS->size() < 2)
41 return ArrayRef(CS->body_begin(), CS->size() - 1);
50 if (
auto *AS = dyn_cast_or_null<AttributedStmt>(S)) {
56 if (
auto *CS = dyn_cast_or_null<CompoundStmt>(S)) {
67size_t OMPChildren::size(
unsigned NumClauses,
bool HasAssociatedStmt,
68 unsigned NumChildren) {
70 totalSizeToAlloc<OMPClause *, Stmt *>(
71 NumClauses, NumChildren + (HasAssociatedStmt ? 1 : 0)),
72 alignof(OMPChildren));
76 assert(Clauses.size() == NumClauses &&
77 "Number of clauses is not the same as the preallocated buffer");
78 llvm::copy(Clauses, getTrailingObjects<OMPClause *>());
82 return getTrailingObjects<Stmt *>(NumChildren);
87 Data->setClauses(Clauses);
92 Stmt *S,
unsigned NumChildren) {
93 auto *
Data = CreateEmpty(Mem, Clauses.size(), S, NumChildren);
94 Data->setClauses(Clauses);
96 Data->setAssociatedStmt(S);
100OMPChildren *OMPChildren::CreateEmpty(
void *Mem,
unsigned NumClauses,
101 bool HasAssociatedStmt,
102 unsigned NumChildren) {
103 return new (Mem) OMPChildren(NumClauses, NumChildren, HasAssociatedStmt);
106bool OMPExecutableDirective::isStandaloneDirective()
const {
114 return !hasAssociatedStmt();
117Stmt *OMPExecutableDirective::getStructuredBlock() {
118 assert(!isStandaloneDirective() &&
119 "Standalone Executable Directives don't have Structured Blocks.");
122 if (
auto *LD = dyn_cast<OMPLoopDirective>(
this))
123 if (Stmt *Body = LD->getBody())
129OMPLoopBasedDirective::tryToFindNextInnerLoop(
Stmt *CurStmt,
130 bool TryImperfectlyNestedLoops) {
131 Stmt *OrigStmt = CurStmt;
134 if (TryImperfectlyNestedLoops) {
135 if (
auto *CS = dyn_cast<CompoundStmt>(CurStmt)) {
137 SmallVector<CompoundStmt *, 4> Statements(1, CS);
138 SmallVector<CompoundStmt *, 4> NextStatements;
139 while (!Statements.empty()) {
140 CS = Statements.pop_back_val();
143 for (Stmt *S : CS->body()) {
153 if (
auto *CanonLoop = dyn_cast<OMPCanonicalLoop>(Inner))
154 Inner = CanonLoop->getLoopStmt();
155 Inner = OMPLoopBasedDirective::ignoreIntraTileHint(Inner);
167 S = OMPLoopBasedDirective::ignoreIntraTileHint(S);
168 if (
auto *InnerCS = dyn_cast_or_null<CompoundStmt>(S))
169 NextStatements.push_back(InnerCS);
171 if (Statements.empty()) {
175 Statements.swap(NextStatements);
185bool OMPLoopBasedDirective::doForAllLoops(
186 Stmt *CurStmt,
bool TryImperfectlyNestedLoops,
unsigned NumLoops,
187 llvm::function_ref<
bool(
unsigned,
Stmt *,
Stmt *)> Callback,
192 for (
unsigned Cnt = 0; Cnt < NumLoops; ++Cnt) {
197 bool PeeledTransformation =
false;
199 auto *Dir = dyn_cast<OMPLoopTransformationDirective>(CurStmt);
205 Stmt *TransformedStmt = Dir->getTransformedStmt();
206 if (!TransformedStmt) {
207 unsigned NumGeneratedTopLevelLoops =
208 Dir->getNumGeneratedTopLevelLoops();
209 if (NumGeneratedTopLevelLoops == 0) {
214 if (NumGeneratedTopLevelLoops > 0) {
222 CurStmt = TransformedStmt;
223 PeeledTransformation =
true;
225 if (
auto *CanonLoop = dyn_cast<OMPCanonicalLoop>(CurStmt))
226 CurStmt = CanonLoop->getLoopStmt();
229 Stmt *LoopStmt = ignoreIntraTileHint(CurStmt);
230 Stmt *HintWrapper = LoopStmt != CurStmt ? CurStmt :
nullptr;
231 if (
Callback(Cnt, LoopStmt, HintWrapper))
238 if (
auto *For = dyn_cast<ForStmt>(LoopStmt)) {
239 CurStmt = For->getBody();
242 "Expected canonical for or range-based for loops.");
246 !getStmtsBeforeNestedLoop(CurStmt).empty())
248 CurStmt = OMPLoopBasedDirective::tryToFindNextInnerLoop(
249 CurStmt, TryImperfectlyNestedLoops);
254void OMPLoopBasedDirective::doForAllLoopsBodies(
255 Stmt *CurStmt,
bool TryImperfectlyNestedLoops,
unsigned NumLoops,
256 llvm::function_ref<
void(
unsigned,
Stmt *,
Stmt *)> Callback) {
257 bool Res = OMPLoopBasedDirective::doForAllLoops(
258 CurStmt, TryImperfectlyNestedLoops, NumLoops,
260 Stmt *Body =
nullptr;
261 if (
auto *For = dyn_cast<ForStmt>(
Loop)) {
262 Body = For->getBody();
265 "Expected canonical for or range-based for loops.");
268 if (
auto *CanonLoop = dyn_cast<OMPCanonicalLoop>(Body))
269 Body = CanonLoop->getLoopStmt();
273 assert(Res &&
"Expected only loops");
279 Stmt *Body =
nullptr;
280 OMPLoopBasedDirective::doForAllLoopsBodies(
281 Data->getRawStmt(),
true,
283 [&Body](
unsigned,
Stmt *,
Stmt *BodyStmt) { Body = BodyStmt; });
288 assert(A.size() == getLoopsNumber() &&
289 "Number of loop counters is not the same as the collapsed number");
290 llvm::copy(A, getCounters().begin());
294 assert(A.size() == getLoopsNumber() &&
"Number of loop private counters "
295 "is not the same as the collapsed "
297 llvm::copy(A, getPrivateCounters().begin());
301 assert(A.size() == getLoopsNumber() &&
302 "Number of counter inits is not the same as the collapsed number");
307 assert(A.size() == getLoopsNumber() &&
308 "Number of counter updates is not the same as the collapsed number");
313 assert(A.size() == getLoopsNumber() &&
314 "Number of counter finals is not the same as the collapsed number");
320 A.size() == getLoopsNumber() &&
321 "Number of dependent counters is not the same as the collapsed number");
322 llvm::copy(A, getDependentCounters().begin());
326 assert(A.size() == getLoopsNumber() &&
327 "Number of dependent inits is not the same as the collapsed number");
328 llvm::copy(A, getDependentInits().begin());
332 assert(A.size() == getLoopsNumber() &&
333 "Number of finals conditions is not the same as the collapsed number");
334 llvm::copy(A, getFinalsConditions().begin());
357 if (ArraysOffset == DefaultEnd)
368 if (ArraysOffset == WorksharingEnd)
386 unsigned NumVariants,
393 auto *
Data = OMPChildren::CreateEmpty(
395 false, 2 * NumVariants);
405 assert(Variants.size() == Conditions.size() &&
406 Variants.size() == TraitInfos.size() &&
407 "Expected one condition and one trait info per variant");
408 OMPMetaDirective *Dir = allocate(
C, Variants.size(), StartLoc, EndLoc);
409 llvm::copy(Variants, Dir->getTrailingVariants().begin());
410 llvm::copy(Conditions, Dir->getTrailingConditions().begin());
411 llvm::copy(TraitInfos, Dir->getTrailingTraitInfos().begin());
412 Dir->setHasImplicitOtherwise(HasImplicitOtherwise);
417 unsigned NumVariants,
422OMPParallelDirective *OMPParallelDirective::Create(
426 auto *Dir = createDirective<OMPParallelDirective>(
427 C, Clauses, AssociatedStmt, 1, StartLoc, EndLoc);
428 Dir->setTaskReductionRefExpr(TaskRedRef);
429 Dir->setHasCancel(HasCancel);
433OMPParallelDirective *OMPParallelDirective::CreateEmpty(
const ASTContext &
C,
436 return createEmptyDirective<OMPParallelDirective>(
C, NumClauses,
445 const HelperExprs &Exprs) {
446 auto *Dir = createDirective<OMPSimdDirective>(
448 StartLoc, EndLoc, CollapsedNum);
449 Dir->setHelperExprs(Exprs);
455 unsigned CollapsedNum,
457 return createEmptyDirective<OMPSimdDirective>(
465 const HelperExprs &Exprs,
Expr *TaskRedRef,
bool HasCancel) {
466 auto *Dir = createDirective<OMPForDirective>(
468 StartLoc, EndLoc, CollapsedNum);
469 Dir->setHelperExprs(Exprs);
470 Dir->setTaskReductionRefExpr(TaskRedRef);
471 Dir->setHasCancel(HasCancel);
476 if (
auto *D = dyn_cast<OMPCanonicalLoopNestTransformationDirective>(S))
477 return D->getTransformedStmt();
478 if (
auto *D = dyn_cast<OMPCanonicalLoopSequenceTransformationDirective>(S))
479 return D->getTransformedStmt();
480 llvm_unreachable(
"unexpected object type");
484 if (
auto *D = dyn_cast<OMPCanonicalLoopNestTransformationDirective>(S))
485 return D->getPreInits();
486 if (
auto *D = dyn_cast<OMPCanonicalLoopSequenceTransformationDirective>(S))
487 return D->getPreInits();
488 llvm_unreachable(
"unexpected object type");
492 if (
auto *D = dyn_cast<OMPCanonicalLoopNestTransformationDirective>(S))
493 return D->getFinals();
494 if (
auto *D = dyn_cast<OMPCanonicalLoopSequenceTransformationDirective>(S))
495 return D->getFinals();
496 llvm_unreachable(
"unexpected object type");
500 switch (getStmtClass()) {
501#define STMT(CLASS, PARENT)
502#define ABSTRACT_STMT(CLASS)
503#define OMPCANONICALLOOPNESTTRANSFORMATIONDIRECTIVE(CLASS, PARENT) \
504 case Stmt::CLASS##Class: \
505 return static_cast<const CLASS *>(this)->getTransformedStmt();
506#include "clang/AST/StmtNodes.inc"
508 llvm_unreachable(
"Not a loop transformation for canonical loop nests");
513 switch (getStmtClass()) {
514#define STMT(CLASS, PARENT)
515#define ABSTRACT_STMT(CLASS)
516#define OMPCANONICALLOOPNESTTRANSFORMATIONDIRECTIVE(CLASS, PARENT) \
517 case Stmt::CLASS##Class: \
518 return static_cast<const CLASS *>(this)->getPreInits();
519#include "clang/AST/StmtNodes.inc"
521 llvm_unreachable(
"Not a loop transformation for canonical loop nests");
526 switch (getStmtClass()) {
527#define STMT(CLASS, PARENT)
528#define ABSTRACT_STMT(CLASS)
529#define OMPCANONICALLOOPNESTTRANSFORMATIONDIRECTIVE(CLASS, PARENT) \
530 case Stmt::CLASS##Class: \
531 return static_cast<const CLASS *>(this)->getFinals();
532#include "clang/AST/StmtNodes.inc"
534 llvm_unreachable(
"Not a loop transformation for canonical loop nests");
540 switch (getStmtClass()) {
541#define STMT(CLASS, PARENT)
542#define ABSTRACT_STMT(CLASS)
543#define OMPCANONICALLOOPSEQUENCETRANSFORMATIONDIRECTIVE(CLASS, PARENT) \
544 case Stmt::CLASS##Class: \
545 return static_cast<const CLASS *>(this)->getTransformedStmt();
546#include "clang/AST/StmtNodes.inc"
548 llvm_unreachable(
"Not a loop transformation for canonical loop sequences");
553 switch (getStmtClass()) {
554#define STMT(CLASS, PARENT)
555#define ABSTRACT_STMT(CLASS)
556#define OMPCANONICALLOOPSEQUENCETRANSFORMATIONDIRECTIVE(CLASS, PARENT) \
557 case Stmt::CLASS##Class: \
558 return static_cast<const CLASS *>(this)->getPreInits();
559#include "clang/AST/StmtNodes.inc"
561 llvm_unreachable(
"Not a loop transformation for canonical loop sequences");
566 switch (getStmtClass()) {
567#define STMT(CLASS, PARENT)
568#define ABSTRACT_STMT(CLASS)
569#define OMPCANONICALLOOPSEQUENCETRANSFORMATIONDIRECTIVE(CLASS, PARENT) \
570 case Stmt::CLASS##Class: \
571 return static_cast<const CLASS *>(this)->getFinals();
572#include "clang/AST/StmtNodes.inc"
574 llvm_unreachable(
"Not a loop transformation for canonical loop sequences");
580 unsigned CollapsedNum,
582 return createEmptyDirective<OMPForDirective>(
590 unsigned NumLoops,
Stmt *AssociatedStmt,
592 OMPTileDirective *Dir = createDirective<OMPTileDirective>(
593 C, Clauses, AssociatedStmt, FinalsOffset + 1, StartLoc, EndLoc, NumLoops);
594 Dir->setTransformedStmt(TransformedStmt);
595 Dir->setPreInits(PreInits);
596 Dir->setFinals(Finals);
603 return createEmptyDirective<OMPTileDirective>(
604 C, NumClauses,
true, FinalsOffset + 1,
612 OMPStripeDirective *Dir = createDirective<OMPStripeDirective>(
613 C, Clauses, AssociatedStmt, FinalsOffset + 1, StartLoc, EndLoc, NumLoops);
614 Dir->setTransformedStmt(TransformedStmt);
615 Dir->setPreInits(PreInits);
616 Dir->setFinals(Finals);
623 return createEmptyDirective<OMPStripeDirective>(
624 C, NumClauses,
true, FinalsOffset + 1,
631 unsigned NumGeneratedTopLevelLoops,
Stmt *TransformedStmt,
Stmt *PreInits,
633 assert(NumGeneratedTopLevelLoops <= 1 &&
634 "Unrolling generates at most one loop");
636 auto *Dir = createDirective<OMPUnrollDirective>(
637 C, Clauses, AssociatedStmt, FinalsOffset + 1, StartLoc, EndLoc);
638 Dir->setNumGeneratedTopLevelLoops(NumGeneratedTopLevelLoops);
639 Dir->setTransformedStmt(TransformedStmt);
640 Dir->setPreInits(PreInits);
641 Dir->setFinals(Finals);
646 unsigned NumClauses) {
647 return createEmptyDirective<OMPUnrollDirective>(
648 C, NumClauses,
true, FinalsOffset + 1,
655 unsigned NumLoops,
Stmt *TransformedStmt,
657 OMPReverseDirective *Dir = createDirective<OMPReverseDirective>(
658 C, {}, AssociatedStmt, FinalsOffset + 1, StartLoc, EndLoc, NumLoops);
659 Dir->setTransformedStmt(TransformedStmt);
660 Dir->setPreInits(PreInits);
661 Dir->setFinals(Finals);
667 return createEmptyDirective<OMPReverseDirective>(
668 C, 0,
true, FinalsOffset + 1,
676 OMPInterchangeDirective *Dir = createDirective<OMPInterchangeDirective>(
677 C, Clauses, AssociatedStmt, FinalsOffset + 1, StartLoc, EndLoc, NumLoops);
678 Dir->setTransformedStmt(TransformedStmt);
679 Dir->setPreInits(PreInits);
680 Dir->setFinals(Finals);
687 return createEmptyDirective<OMPInterchangeDirective>(
688 C, NumClauses,
true, FinalsOffset + 1,
696 OMPFlattenDirective *Dir = createDirective<OMPFlattenDirective>(
697 C, Clauses, AssociatedStmt, FinalsOffset + 1, StartLoc, EndLoc, NumLoops);
698 Dir->setTransformedStmt(TransformedStmt);
699 Dir->setPreInits(PreInits);
700 Dir->setFinals(Finals);
707 return createEmptyDirective<OMPFlattenDirective>(
708 C, NumClauses,
true, FinalsOffset + 1,
715 unsigned NumLoops,
Stmt *AssociatedStmt,
717 OMPSplitDirective *Dir = createDirective<OMPSplitDirective>(
718 C, Clauses, AssociatedStmt, FinalsOffset + 1, StartLoc, EndLoc, NumLoops);
719 Dir->setTransformedStmt(TransformedStmt);
720 Dir->setPreInits(PreInits);
721 Dir->setFinals(Finals);
728 return createEmptyDirective<OMPSplitDirective>(
729 C, NumClauses,
true, FinalsOffset + 1,
736 Stmt *AssociatedStmt,
Stmt *TransformedStmt,
Stmt *PreInits,
Stmt *Finals) {
738 OMPFuseDirective *Dir = createDirective<OMPFuseDirective>(
739 C, Clauses, AssociatedStmt, FinalsOffset + 1, StartLoc, EndLoc);
740 Dir->setTransformedStmt(TransformedStmt);
741 Dir->setPreInits(PreInits);
742 Dir->setFinals(Finals);
748 unsigned NumClauses) {
749 OMPFuseDirective *Dir = createEmptyDirective<OMPFuseDirective>(
750 C, NumClauses,
true, FinalsOffset + 1,
759 const HelperExprs &Exprs) {
760 auto *Dir = createDirective<OMPForSimdDirective>(
762 StartLoc, EndLoc, CollapsedNum);
763 Dir->setHelperExprs(Exprs);
769 unsigned CollapsedNum,
771 return createEmptyDirective<OMPForSimdDirective>(
780 auto *Dir = createDirective<OMPSectionsDirective>(
C, Clauses, AssociatedStmt,
783 Dir->setTaskReductionRefExpr(TaskRedRef);
784 Dir->setHasCancel(HasCancel);
791 return createEmptyDirective<OMPSectionsDirective>(
C, NumClauses,
799 Stmt *AssociatedStmt,
802 createDirective<OMPSectionDirective>(
C, {}, AssociatedStmt,
803 0, StartLoc, EndLoc);
810 return createEmptyDirective<OMPSectionDirective>(
C, 0,
818 Stmt *AssociatedStmt) {
819 return createDirective<OMPScopeDirective>(
C, Clauses, AssociatedStmt,
827 return createEmptyDirective<OMPScopeDirective>(
C, NumClauses,
835 Stmt *AssociatedStmt) {
836 return createDirective<OMPSingleDirective>(
C, Clauses, AssociatedStmt,
844 return createEmptyDirective<OMPSingleDirective>(
C, NumClauses,
851 Stmt *AssociatedStmt) {
852 return createDirective<OMPMasterDirective>(
C, {}, AssociatedStmt,
859 return createEmptyDirective<OMPMasterDirective>(
C, 0,
867 return createDirective<OMPCriticalDirective>(
C, Clauses, AssociatedStmt,
875 return createEmptyDirective<OMPCriticalDirective>(
C, NumClauses,
882 const HelperExprs &Exprs,
Expr *TaskRedRef,
bool HasCancel) {
883 auto *Dir = createDirective<OMPParallelForDirective>(
884 C, Clauses, AssociatedStmt,
885 numLoopChildren(CollapsedNum, OMPD_parallel_for) + 1, StartLoc, EndLoc,
887 Dir->setHelperExprs(Exprs);
888 Dir->setTaskReductionRefExpr(TaskRedRef);
889 Dir->setHasCancel(HasCancel);
895 unsigned CollapsedNum, EmptyShell) {
896 return createEmptyDirective<OMPParallelForDirective>(
904 const HelperExprs &Exprs) {
905 auto *Dir = createDirective<OMPParallelForSimdDirective>(
906 C, Clauses, AssociatedStmt,
907 numLoopChildren(CollapsedNum, OMPD_parallel_for_simd), StartLoc, EndLoc,
909 Dir->setHelperExprs(Exprs);
916 unsigned CollapsedNum, EmptyShell) {
917 return createEmptyDirective<OMPParallelForSimdDirective>(
925 auto *Dir = createDirective<OMPParallelMasterDirective>(
926 C, Clauses, AssociatedStmt, 1, StartLoc, EndLoc);
927 Dir->setTaskReductionRefExpr(TaskRedRef);
933 unsigned NumClauses, EmptyShell) {
934 return createEmptyDirective<OMPParallelMasterDirective>(
935 C, NumClauses,
true, 1);
941 auto *Dir = createDirective<OMPParallelMaskedDirective>(
942 C, Clauses, AssociatedStmt, 1, StartLoc, EndLoc);
943 Dir->setTaskReductionRefExpr(TaskRedRef);
949 unsigned NumClauses, EmptyShell) {
950 return createEmptyDirective<OMPParallelMaskedDirective>(
951 C, NumClauses,
true, 1);
958 auto *Dir = createDirective<OMPParallelSectionsDirective>(
959 C, Clauses, AssociatedStmt, 1, StartLoc, EndLoc);
960 Dir->setTaskReductionRefExpr(TaskRedRef);
961 Dir->setHasCancel(HasCancel);
967 unsigned NumClauses, EmptyShell) {
968 return createEmptyDirective<OMPParallelSectionsDirective>(
969 C, NumClauses,
true, 1);
975 Stmt *AssociatedStmt,
bool HasCancel) {
976 auto *Dir = createDirective<OMPTaskDirective>(
977 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
978 Dir->setHasCancel(HasCancel);
985 return createEmptyDirective<OMPTaskDirective>(
C, NumClauses,
992 return new (
C) OMPTaskyieldDirective(StartLoc, EndLoc);
997 return new (
C) OMPTaskyieldDirective();
1005 return createDirective<OMPAssumeDirective>(
C, Clauses, AStmt,
1011 unsigned NumClauses,
1013 return createEmptyDirective<OMPAssumeDirective>(
C, NumClauses,
1021 return createDirective<OMPErrorDirective>(
1022 C, Clauses,
nullptr, 0, StartLoc,
1027 unsigned NumClauses,
1029 return createEmptyDirective<OMPErrorDirective>(
C, NumClauses);
1035 return new (
C) OMPBarrierDirective(StartLoc, EndLoc);
1040 return new (
C) OMPBarrierDirective();
1047 return createDirective<OMPTaskwaitDirective>(
1048 C, Clauses,
nullptr, 0, StartLoc,
1053 unsigned NumClauses,
1055 return createEmptyDirective<OMPTaskwaitDirective>(
C, NumClauses);
1061 auto *Dir = createDirective<OMPTaskgroupDirective>(
1062 C, Clauses, AssociatedStmt, 1, StartLoc, EndLoc);
1063 Dir->setReductionRef(ReductionRef);
1068 unsigned NumClauses,
1070 return createEmptyDirective<OMPTaskgroupDirective>(
1071 C, NumClauses,
true, 1);
1077 auto *Dir =
new (
C) OMPCancellationPointDirective(StartLoc, EndLoc);
1078 Dir->setCancelRegion(CancelRegion);
1084 return new (
C) OMPCancellationPointDirective();
1091 auto *Dir = createDirective<OMPCancelDirective>(
1092 C, Clauses,
nullptr, 0, StartLoc,
1094 Dir->setCancelRegion(CancelRegion);
1099 unsigned NumClauses,
1101 return createEmptyDirective<OMPCancelDirective>(
C, NumClauses);
1108 return createDirective<OMPFlushDirective>(
1109 C, Clauses,
nullptr, 0, StartLoc,
1114 unsigned NumClauses,
1116 return createEmptyDirective<OMPFlushDirective>(
C, NumClauses);
1123 return createDirective<OMPDepobjDirective>(
1124 C, Clauses,
nullptr,
1125 0, StartLoc, EndLoc);
1129 unsigned NumClauses,
1131 return createEmptyDirective<OMPDepobjDirective>(
C, NumClauses);
1138 return createDirective<OMPScanDirective>(
C, Clauses,
1140 0, StartLoc, EndLoc);
1144 unsigned NumClauses,
1146 return createEmptyDirective<OMPScanDirective>(
C, NumClauses);
1152 return createDirective<OMPOrderedStandaloneDirective>(
1153 C, Clauses,
nullptr, 0, StartLoc,
1159 unsigned NumClauses, EmptyShell) {
1160 return createEmptyDirective<OMPOrderedStandaloneDirective>(
C, NumClauses);
1166 return createDirective<OMPOrderedBlockAssocDirective>(
1173 unsigned NumClauses, EmptyShell) {
1174 return createEmptyDirective<OMPOrderedBlockAssocDirective>(
1175 C, NumClauses,
true);
1182 auto *Dir = createDirective<OMPAtomicDirective>(
1183 C, Clauses, AssociatedStmt, 7, StartLoc, EndLoc);
1187 Dir->setExpr(Exprs.
E);
1188 Dir->setUpdateExpr(Exprs.
UE);
1190 Dir->setCond(Exprs.
Cond);
1193 Dir->Flags.IsFailOnly = Exprs.
IsFailOnly ? 1 : 0;
1198 unsigned NumClauses,
1200 return createEmptyDirective<OMPAtomicDirective>(
1201 C, NumClauses,
true, 7);
1208 Stmt *AssociatedStmt) {
1209 return createDirective<OMPTargetDirective>(
1210 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
1214 unsigned NumClauses,
1216 return createEmptyDirective<OMPTargetDirective>(
C, NumClauses,
1224 auto *Dir = createDirective<OMPTargetParallelDirective>(
1225 C, Clauses, AssociatedStmt, 1, StartLoc, EndLoc);
1226 Dir->setTaskReductionRefExpr(TaskRedRef);
1227 Dir->setHasCancel(HasCancel);
1233 unsigned NumClauses, EmptyShell) {
1234 return createEmptyDirective<OMPTargetParallelDirective>(
1235 C, NumClauses,
true, 1);
1241 const HelperExprs &Exprs,
Expr *TaskRedRef,
bool HasCancel) {
1242 auto *Dir = createDirective<OMPTargetParallelForDirective>(
1243 C, Clauses, AssociatedStmt,
1244 numLoopChildren(CollapsedNum, OMPD_target_parallel_for) + 1, StartLoc,
1245 EndLoc, CollapsedNum);
1246 Dir->setHelperExprs(Exprs);
1247 Dir->setTaskReductionRefExpr(TaskRedRef);
1248 Dir->setHasCancel(HasCancel);
1254 unsigned NumClauses,
1255 unsigned CollapsedNum, EmptyShell) {
1256 return createEmptyDirective<OMPTargetParallelForDirective>(
1257 C, NumClauses,
true,
1265 return createDirective<OMPTargetDataDirective>(
1266 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
1272 return createEmptyDirective<OMPTargetDataDirective>(
1279 return createDirective<OMPTargetEnterDataDirective>(
1280 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
1286 return createEmptyDirective<OMPTargetEnterDataDirective>(
1293 return createDirective<OMPTargetExitDataDirective>(
1294 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
1300 return createEmptyDirective<OMPTargetExitDataDirective>(
1308 Stmt *AssociatedStmt) {
1309 return createDirective<OMPTeamsDirective>(
1310 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
1314 unsigned NumClauses,
1316 return createEmptyDirective<OMPTeamsDirective>(
C, NumClauses,
1323 const HelperExprs &Exprs,
bool HasCancel) {
1324 auto *Dir = createDirective<OMPTaskLoopDirective>(
1326 StartLoc, EndLoc, CollapsedNum);
1327 Dir->setHelperExprs(Exprs);
1328 Dir->setHasCancel(HasCancel);
1333 unsigned NumClauses,
1334 unsigned CollapsedNum,
1336 return createEmptyDirective<OMPTaskLoopDirective>(
1337 C, NumClauses,
true,
1344 const HelperExprs &Exprs) {
1345 auto *Dir = createDirective<OMPTaskLoopSimdDirective>(
1346 C, Clauses, AssociatedStmt,
1349 Dir->setHelperExprs(Exprs);
1355 unsigned CollapsedNum, EmptyShell) {
1356 return createEmptyDirective<OMPTaskLoopSimdDirective>(
1357 C, NumClauses,
true,
1364 const HelperExprs &Exprs,
bool HasCancel) {
1365 auto *Dir = createDirective<OMPMasterTaskLoopDirective>(
1366 C, Clauses, AssociatedStmt,
1367 numLoopChildren(CollapsedNum, OMPD_master_taskloop), StartLoc, EndLoc,
1369 Dir->setHelperExprs(Exprs);
1370 Dir->setHasCancel(HasCancel);
1376 unsigned NumClauses,
1377 unsigned CollapsedNum, EmptyShell) {
1378 return createEmptyDirective<OMPMasterTaskLoopDirective>(
1379 C, NumClauses,
true,
1386 const HelperExprs &Exprs,
bool HasCancel) {
1387 auto *Dir = createDirective<OMPMaskedTaskLoopDirective>(
1388 C, Clauses, AssociatedStmt,
1389 numLoopChildren(CollapsedNum, OMPD_masked_taskloop), StartLoc, EndLoc,
1391 Dir->setHelperExprs(Exprs);
1392 Dir->setHasCancel(HasCancel);
1398 unsigned NumClauses,
1399 unsigned CollapsedNum, EmptyShell) {
1400 return createEmptyDirective<OMPMaskedTaskLoopDirective>(
1401 C, NumClauses,
true,
1408 const HelperExprs &Exprs) {
1409 auto *Dir = createDirective<OMPMasterTaskLoopSimdDirective>(
1410 C, Clauses, AssociatedStmt,
1412 EndLoc, CollapsedNum);
1413 Dir->setHelperExprs(Exprs);
1419 unsigned NumClauses,
1420 unsigned CollapsedNum, EmptyShell) {
1421 return createEmptyDirective<OMPMasterTaskLoopSimdDirective>(
1422 C, NumClauses,
true,
1423 numLoopChildren(CollapsedNum, OMPD_master_taskloop_simd), CollapsedNum);
1429 const HelperExprs &Exprs) {
1430 auto *Dir = createDirective<OMPMaskedTaskLoopSimdDirective>(
1431 C, Clauses, AssociatedStmt,
1433 EndLoc, CollapsedNum);
1434 Dir->setHelperExprs(Exprs);
1440 unsigned NumClauses,
1441 unsigned CollapsedNum, EmptyShell) {
1442 return createEmptyDirective<OMPMaskedTaskLoopSimdDirective>(
1443 C, NumClauses,
true,
1444 numLoopChildren(CollapsedNum, OMPD_masked_taskloop_simd), CollapsedNum);
1450 const HelperExprs &Exprs,
bool HasCancel) {
1451 auto *Dir = createDirective<OMPParallelMasterTaskLoopDirective>(
1452 C, Clauses, AssociatedStmt,
1453 numLoopChildren(CollapsedNum, OMPD_parallel_master_taskloop), StartLoc,
1454 EndLoc, CollapsedNum);
1455 Dir->setHelperExprs(Exprs);
1456 Dir->setHasCancel(HasCancel);
1462 unsigned NumClauses,
1463 unsigned CollapsedNum,
1465 return createEmptyDirective<OMPParallelMasterTaskLoopDirective>(
1466 C, NumClauses,
true,
1474 const HelperExprs &Exprs,
bool HasCancel) {
1475 auto *Dir = createDirective<OMPParallelMaskedTaskLoopDirective>(
1476 C, Clauses, AssociatedStmt,
1477 numLoopChildren(CollapsedNum, OMPD_parallel_masked_taskloop), StartLoc,
1478 EndLoc, CollapsedNum);
1479 Dir->setHelperExprs(Exprs);
1480 Dir->setHasCancel(HasCancel);
1486 unsigned NumClauses,
1487 unsigned CollapsedNum,
1489 return createEmptyDirective<OMPParallelMaskedTaskLoopDirective>(
1490 C, NumClauses,
true,
1499 const HelperExprs &Exprs) {
1500 auto *Dir = createDirective<OMPParallelMasterTaskLoopSimdDirective>(
1501 C, Clauses, AssociatedStmt,
1503 StartLoc, EndLoc, CollapsedNum);
1504 Dir->setHelperExprs(Exprs);
1510 unsigned NumClauses,
1511 unsigned CollapsedNum,
1513 return createEmptyDirective<OMPParallelMasterTaskLoopSimdDirective>(
1514 C, NumClauses,
true,
1523 const HelperExprs &Exprs) {
1524 auto *Dir = createDirective<OMPParallelMaskedTaskLoopSimdDirective>(
1525 C, Clauses, AssociatedStmt,
1527 StartLoc, EndLoc, CollapsedNum);
1528 Dir->setHelperExprs(Exprs);
1534 unsigned NumClauses,
1535 unsigned CollapsedNum,
1537 return createEmptyDirective<OMPParallelMaskedTaskLoopSimdDirective>(
1538 C, NumClauses,
true,
1547 Stmt *AssociatedStmt,
const HelperExprs &Exprs) {
1548 auto *Dir = createDirective<OMPDistributeDirective>(
1549 C, Clauses, AssociatedStmt,
1552 Dir->setHelperExprs(Exprs);
1558 unsigned CollapsedNum, EmptyShell) {
1559 return createEmptyDirective<OMPDistributeDirective>(
1560 C, NumClauses,
true,
1567 return createDirective<OMPTargetUpdateDirective>(
C, Clauses, AssociatedStmt,
1575 return createEmptyDirective<OMPTargetUpdateDirective>(
1576 C, NumClauses,
true);
1582 const HelperExprs &Exprs,
Expr *TaskRedRef,
bool HasCancel) {
1583 auto *Dir = createDirective<OMPDistributeParallelForDirective>(
1584 C, Clauses, AssociatedStmt,
1585 numLoopChildren(CollapsedNum, OMPD_distribute_parallel_for) + 1, StartLoc,
1586 EndLoc, CollapsedNum);
1587 Dir->setHelperExprs(Exprs);
1588 Dir->setTaskReductionRefExpr(TaskRedRef);
1589 Dir->HasCancel = HasCancel;
1595 unsigned NumClauses,
1596 unsigned CollapsedNum,
1598 return createEmptyDirective<OMPDistributeParallelForDirective>(
1599 C, NumClauses,
true,
1608 const HelperExprs &Exprs) {
1609 auto *Dir = createDirective<OMPDistributeParallelForSimdDirective>(
1610 C, Clauses, AssociatedStmt,
1612 StartLoc, EndLoc, CollapsedNum);
1613 Dir->setHelperExprs(Exprs);
1619 unsigned NumClauses,
1620 unsigned CollapsedNum,
1622 return createEmptyDirective<OMPDistributeParallelForSimdDirective>(
1623 C, NumClauses,
true,
1631 const HelperExprs &Exprs) {
1632 auto *Dir = createDirective<OMPDistributeSimdDirective>(
1633 C, Clauses, AssociatedStmt,
1634 numLoopChildren(CollapsedNum, OMPD_distribute_simd), StartLoc, EndLoc,
1636 Dir->setHelperExprs(Exprs);
1642 unsigned NumClauses,
1643 unsigned CollapsedNum, EmptyShell) {
1644 return createEmptyDirective<OMPDistributeSimdDirective>(
1645 C, NumClauses,
true,
1652 const HelperExprs &Exprs) {
1653 auto *Dir = createDirective<OMPTargetParallelForSimdDirective>(
1654 C, Clauses, AssociatedStmt,
1655 numLoopChildren(CollapsedNum, OMPD_target_parallel_for_simd), StartLoc,
1656 EndLoc, CollapsedNum);
1657 Dir->setHelperExprs(Exprs);
1663 unsigned NumClauses,
1664 unsigned CollapsedNum,
1666 return createEmptyDirective<OMPTargetParallelForSimdDirective>(
1667 C, NumClauses,
true,
1676 Stmt *AssociatedStmt,
const HelperExprs &Exprs) {
1677 auto *Dir = createDirective<OMPTargetSimdDirective>(
1678 C, Clauses, AssociatedStmt,
1681 Dir->setHelperExprs(Exprs);
1687 unsigned CollapsedNum, EmptyShell) {
1688 return createEmptyDirective<OMPTargetSimdDirective>(
1689 C, NumClauses,
true,
1696 const HelperExprs &Exprs) {
1697 auto *Dir = createDirective<OMPTeamsDistributeDirective>(
1698 C, Clauses, AssociatedStmt,
1699 numLoopChildren(CollapsedNum, OMPD_teams_distribute), StartLoc, EndLoc,
1701 Dir->setHelperExprs(Exprs);
1707 unsigned NumClauses,
1708 unsigned CollapsedNum, EmptyShell) {
1709 return createEmptyDirective<OMPTeamsDistributeDirective>(
1710 C, NumClauses,
true,
1717 const HelperExprs &Exprs) {
1718 auto *Dir = createDirective<OMPTeamsDistributeSimdDirective>(
1719 C, Clauses, AssociatedStmt,
1721 EndLoc, CollapsedNum);
1722 Dir->setHelperExprs(Exprs);
1727 const ASTContext &
C,
unsigned NumClauses,
unsigned CollapsedNum,
1729 return createEmptyDirective<OMPTeamsDistributeSimdDirective>(
1730 C, NumClauses,
true,
1731 numLoopChildren(CollapsedNum, OMPD_teams_distribute_simd), CollapsedNum);
1738 const HelperExprs &Exprs) {
1739 auto *Dir = createDirective<OMPTeamsDistributeParallelForSimdDirective>(
1740 C, Clauses, AssociatedStmt,
1741 numLoopChildren(CollapsedNum, OMPD_teams_distribute_parallel_for_simd),
1742 StartLoc, EndLoc, CollapsedNum);
1743 Dir->setHelperExprs(Exprs);
1749 unsigned NumClauses,
1750 unsigned CollapsedNum,
1752 return createEmptyDirective<OMPTeamsDistributeParallelForSimdDirective>(
1753 C, NumClauses,
true,
1754 numLoopChildren(CollapsedNum, OMPD_teams_distribute_parallel_for_simd),
1762 const HelperExprs &Exprs,
Expr *TaskRedRef,
bool HasCancel) {
1763 auto *Dir = createDirective<OMPTeamsDistributeParallelForDirective>(
1764 C, Clauses, AssociatedStmt,
1765 numLoopChildren(CollapsedNum, OMPD_teams_distribute_parallel_for) + 1,
1766 StartLoc, EndLoc, CollapsedNum);
1767 Dir->setHelperExprs(Exprs);
1768 Dir->setTaskReductionRefExpr(TaskRedRef);
1769 Dir->HasCancel = HasCancel;
1775 unsigned NumClauses,
1776 unsigned CollapsedNum,
1778 return createEmptyDirective<OMPTeamsDistributeParallelForDirective>(
1779 C, NumClauses,
true,
1780 numLoopChildren(CollapsedNum, OMPD_teams_distribute_parallel_for) + 1,
1787 return createDirective<OMPTargetTeamsDirective>(
C, Clauses, AssociatedStmt,
1795 return createEmptyDirective<OMPTargetTeamsDirective>(
1796 C, NumClauses,
true);
1802 const HelperExprs &Exprs) {
1803 auto *Dir = createDirective<OMPTargetTeamsDistributeDirective>(
1804 C, Clauses, AssociatedStmt,
1805 numLoopChildren(CollapsedNum, OMPD_target_teams_distribute), StartLoc,
1806 EndLoc, CollapsedNum);
1807 Dir->setHelperExprs(Exprs);
1813 unsigned NumClauses,
1814 unsigned CollapsedNum,
1816 return createEmptyDirective<OMPTargetTeamsDistributeDirective>(
1817 C, NumClauses,
true,
1826 const HelperExprs &Exprs,
Expr *TaskRedRef,
bool HasCancel) {
1827 auto *Dir = createDirective<OMPTargetTeamsDistributeParallelForDirective>(
1828 C, Clauses, AssociatedStmt,
1829 numLoopChildren(CollapsedNum, OMPD_target_teams_distribute_parallel_for) +
1831 StartLoc, EndLoc, CollapsedNum);
1832 Dir->setHelperExprs(Exprs);
1833 Dir->setTaskReductionRefExpr(TaskRedRef);
1834 Dir->HasCancel = HasCancel;
1840 unsigned NumClauses,
1841 unsigned CollapsedNum,
1843 return createEmptyDirective<OMPTargetTeamsDistributeParallelForDirective>(
1844 C, NumClauses,
true,
1845 numLoopChildren(CollapsedNum, OMPD_target_teams_distribute_parallel_for) +
1854 const HelperExprs &Exprs) {
1855 auto *Dir = createDirective<OMPTargetTeamsDistributeParallelForSimdDirective>(
1856 C, Clauses, AssociatedStmt,
1858 OMPD_target_teams_distribute_parallel_for_simd),
1859 StartLoc, EndLoc, CollapsedNum);
1860 Dir->setHelperExprs(Exprs);
1866 const ASTContext &
C,
unsigned NumClauses,
unsigned CollapsedNum,
1868 return createEmptyDirective<OMPTargetTeamsDistributeParallelForSimdDirective>(
1869 C, NumClauses,
true,
1871 OMPD_target_teams_distribute_parallel_for_simd),
1879 const HelperExprs &Exprs) {
1880 auto *Dir = createDirective<OMPTargetTeamsDistributeSimdDirective>(
1881 C, Clauses, AssociatedStmt,
1883 StartLoc, EndLoc, CollapsedNum);
1884 Dir->setHelperExprs(Exprs);
1890 unsigned NumClauses,
1891 unsigned CollapsedNum,
1893 return createEmptyDirective<OMPTargetTeamsDistributeSimdDirective>(
1894 C, NumClauses,
true,
1903 return createDirective<OMPInteropDirective>(
1904 C, Clauses,
nullptr, 0, StartLoc,
1909 unsigned NumClauses,
1911 return createEmptyDirective<OMPInteropDirective>(
C, NumClauses);
1918 auto *Dir = createDirective<OMPDispatchDirective>(
1919 C, Clauses, AssociatedStmt, 0, StartLoc, EndLoc);
1920 Dir->setTargetCallLoc(TargetCallLoc);
1925 unsigned NumClauses,
1927 return createEmptyDirective<OMPDispatchDirective>(
C, NumClauses,
1936 Stmt *AssociatedStmt) {
1937 return createDirective<OMPMaskedDirective>(
C, Clauses, AssociatedStmt,
1943 unsigned NumClauses,
1945 return createEmptyDirective<OMPMaskedDirective>(
C, NumClauses,
1952 const HelperExprs &Exprs) {
1953 auto *Dir = createDirective<OMPGenericLoopDirective>(
1955 StartLoc, EndLoc, CollapsedNum);
1956 Dir->setHelperExprs(Exprs);
1962 unsigned CollapsedNum, EmptyShell) {
1963 return createEmptyDirective<OMPGenericLoopDirective>(
1964 C, NumClauses,
true,
1971 const HelperExprs &Exprs) {
1972 auto *Dir = createDirective<OMPTeamsGenericLoopDirective>(
1973 C, Clauses, AssociatedStmt,
1976 Dir->setHelperExprs(Exprs);
1982 unsigned NumClauses,
1983 unsigned CollapsedNum, EmptyShell) {
1984 return createEmptyDirective<OMPTeamsGenericLoopDirective>(
1985 C, NumClauses,
true,
1992 const HelperExprs &Exprs,
bool CanBeParallelFor) {
1993 auto *Dir = createDirective<OMPTargetTeamsGenericLoopDirective>(
1994 C, Clauses, AssociatedStmt,
1995 numLoopChildren(CollapsedNum, OMPD_target_teams_loop), StartLoc, EndLoc,
1997 Dir->setHelperExprs(Exprs);
1998 Dir->setCanBeParallelFor(CanBeParallelFor);
2004 unsigned NumClauses,
2005 unsigned CollapsedNum,
2007 return createEmptyDirective<OMPTargetTeamsGenericLoopDirective>(
2008 C, NumClauses,
true,
2015 const HelperExprs &Exprs) {
2016 auto *Dir = createDirective<OMPParallelGenericLoopDirective>(
2017 C, Clauses, AssociatedStmt,
2020 Dir->setHelperExprs(Exprs);
2025 const ASTContext &
C,
unsigned NumClauses,
unsigned CollapsedNum,
2027 return createEmptyDirective<OMPParallelGenericLoopDirective>(
2028 C, NumClauses,
true,
2036 const HelperExprs &Exprs) {
2037 auto *Dir = createDirective<OMPTargetParallelGenericLoopDirective>(
2038 C, Clauses, AssociatedStmt,
2040 EndLoc, CollapsedNum);
2041 Dir->setHelperExprs(Exprs);
2047 unsigned NumClauses,
2048 unsigned CollapsedNum,
2050 return createEmptyDirective<OMPTargetParallelGenericLoopDirective>(
2051 C, NumClauses,
true,
2052 numLoopChildren(CollapsedNum, OMPD_target_parallel_loop), CollapsedNum);
2058 const HelperExprs &Exprs) {
2059 auto *Dir = createDirective<OMPTargetGenericLoopDirective>(
2060 C, Clauses, AssociatedStmt,
2063 Dir->setHelperExprs(Exprs);
2069 unsigned NumClauses,
2070 unsigned CollapsedNum, EmptyShell) {
2071 return createEmptyDirective<OMPTargetGenericLoopDirective>(
2072 C, NumClauses,
true,
Defines the clang::ASTContext interface.
static Stmt * ignoreContainersKeepingIntraTileHint(Stmt *S)
Like Stmt::IgnoreContainers, but stops at (and preserves) an intra-tile hint wrapper so that the encl...
This file defines OpenMP AST classes for executable directives and clauses.
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...
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()
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.
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.
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.
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.
static OMPFlattenDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, unsigned NumLoops, Stmt *AssociatedStmt, Stmt *TransformedStmt, Stmt *PreInits, Stmt *Finals)
Create a new AST node representation for 'pragma omp flatten'.
static OMPFlattenDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned NumLoops)
Build an empty 'pragma omp flatten' AST node for deserialization.
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.
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.
static OMPFuseDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses)
Build an empty 'pragma omp fuse' AST node for deserialization.
static OMPFuseDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, unsigned NumGeneratedTopLevelLoops, Stmt *AssociatedStmt, Stmt *TransformedStmt, Stmt *PreInits, Stmt *Finals)
Create a new AST node representation for pragma omp fuse'.
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, Stmt *Finals)
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.
void setCombinedNextUpperBound(Expr *CombNUB)
void setNextUpperBound(Expr *NUB)
void setFinals(ArrayRef< Expr * > A)
static unsigned numLoopChildren(unsigned CollapsedNum, OpenMPDirectiveKind Kind)
Children number.
void setUpperBoundVariable(Expr *UB)
void setIsLastIterVariable(Expr *IL)
void setPrevEnsureUpperBound(Expr *PrevEUB)
void setCombinedLowerBoundVariable(Expr *CombLB)
void setPreInits(Stmt *PreInits)
void setDependentCounters(ArrayRef< Expr * > A)
void setNextLowerBound(Expr *NLB)
void setCombinedParForInDistCond(Expr *CombParForInDistCond)
void setEnsureUpperBound(Expr *EUB)
void setCombinedNextLowerBound(Expr *CombNLB)
void setFinalsConditions(ArrayRef< Expr * > A)
void setPrevLowerBoundVariable(Expr *PrevLB)
void setCombinedCond(Expr *CombCond)
void setLowerBoundVariable(Expr *LB)
void setPrevUpperBoundVariable(Expr *PrevUB)
void setCombinedUpperBoundVariable(Expr *CombUB)
void setStrideVariable(Expr *ST)
void setCombinedDistCond(Expr *CombDistCond)
void setInits(ArrayRef< Expr * > A)
void setCalcLastIteration(Expr *CLI)
void setDistInc(Expr *DistInc)
void setCombinedEnsureUpperBound(Expr *CombEUB)
void setHelperExprs(const HelperExprs &Exprs)
Set the helper expressions used by this directive kind.
void setIterationVariable(Expr *IV)
void setCounters(ArrayRef< Expr * > A)
void setDependentInits(ArrayRef< Expr * > A)
void setPreCond(Expr *PC)
static unsigned getArraysOffset(OpenMPDirectiveKind Kind)
Offset to the start of children expression arrays.
void setNumIterations(Expr *NI)
void setLastIteration(Expr *LI)
void setCombinedInit(Expr *CombInit)
void setUpdates(ArrayRef< Expr * > A)
void setPrivateCounters(ArrayRef< Expr * > A)
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.
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 block-associated 'pragma omp ordered' directive.
static OMPOrderedBlockAssocDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive.
static OMPOrderedBlockAssocDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
This represents standalone 'pragma omp ordered' directive.
static OMPOrderedStandaloneDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
static OMPOrderedStandaloneDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses)
Creates directive.
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.
static OMPParallelGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPParallelGenericLoopDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
This represents 'pragma omp parallel masked' directive.
static OMPParallelMaskedDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPParallelMaskedDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef)
Creates directive with a list of Clauses.
This represents 'pragma omp parallel masked taskloop' directive.
static OMPParallelMaskedTaskLoopDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel)
Creates directive with a list of Clauses.
static OMPParallelMaskedTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents 'pragma omp parallel masked taskloop simd' directive.
static OMPParallelMaskedTaskLoopSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPParallelMaskedTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents 'pragma omp parallel master' directive.
static OMPParallelMasterDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef)
Creates directive with a list of Clauses.
static OMPParallelMasterDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents 'pragma omp parallel master taskloop' directive.
static OMPParallelMasterTaskLoopDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel)
Creates directive with a list of Clauses.
static OMPParallelMasterTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents 'pragma omp parallel master taskloop simd' directive.
static OMPParallelMasterTaskLoopSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPParallelMasterTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents 'pragma omp parallel sections' directive.
static OMPParallelSectionsDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef, bool HasCancel)
Creates directive with a list of Clauses.
static OMPParallelSectionsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Represents the 'pragma omp reverse' loop transformation directive.
static OMPReverseDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AssociatedStmt, unsigned NumLoops, Stmt *TransformedStmt, Stmt *PreInits, Stmt *Finals)
Create a new AST node representation for 'pragma omp reverse'.
static OMPReverseDirective * CreateEmpty(const ASTContext &C, unsigned NumLoops)
Build an empty 'pragma omp reverse' AST node for deserialization.
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.
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.
void setHasCancel(bool Has)
Set cancel state.
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.
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.
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.
Represents the 'pragma omp split' loop transformation directive.
static OMPSplitDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, unsigned NumLoops, Stmt *AssociatedStmt, Stmt *TransformedStmt, Stmt *PreInits, Stmt *Finals)
Create a new AST node representation for 'pragma omp split'.
static OMPSplitDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned NumLoops)
Build an empty 'pragma omp split' AST node for deserialization.
static OMPStripeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned NumLoops)
Build an empty 'pragma omp stripe' AST node for deserialization.
static OMPStripeDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, unsigned NumLoops, Stmt *AssociatedStmt, Stmt *TransformedStmt, Stmt *PreInits, Stmt *Finals)
Create a new AST node representation for 'pragma omp stripe'.
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.
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 loop' directive.
static OMPTargetGenericLoopDirective * 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 OMPTargetGenericLoopDirective * 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' 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.
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.
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.
static OMPTaskyieldDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
static OMPTaskyieldDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc)
Creates 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.
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, Stmt *Finals)
Create a new AST node representation for 'pragma omp tile'.
static OMPUnrollDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, unsigned NumGeneratedTopLevelLoops, Stmt *TransformedStmt, Stmt *PreInits, Stmt *Finals)
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.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
This represents one expression.
Encodes a location in the source.
Stmt - This represents one statement.
Top level wrappers for InstallAPI frontend operations.
static OMPLinearClause * CreateEmpty(const ASTContext &C, unsigned NumVars)
Creates an empty clause with the place for NumVars variables.
bool isa(CodeGen::Address addr)
MutableArrayRef< Expr * > getFinals()
Sets the list of final update expressions for linear variables.
Stmt Stmt llvm::function_ref< void(OMPLoopTransformationDirective *)> OnTransformationCallback
Stmt Stmt llvm::function_ref< void(OMPLoopTransformationDirective *)> bool RelaxNestForPeeledTransformation
bool hasSpecificAttr(const Container &container)
auto * getSpecificAttr(const Container &container)
llvm::omp::Directive OpenMPDirectiveKind
OpenMP directives.
MutableArrayRef< Expr * > getUpdates()
Sets the list of update expressions for linear variables.
MutableArrayRef< Expr * > getInits()
U cast(CodeGen::Address addr)
Expr * Cond
Conditional expression in atomic compare construct. */.
Expr * X
'x' part of the associated expression/statement.
bool IsXLHSInRHSPart
True if UE has the first form and false if the second.
Expr * E
'expr' part of the associated expression/statement.
Expr * D
'd' part of the associated expression/statement.
Expr * V
'v' part of the associated expression/statement.
bool IsFailOnly
True if 'v' is updated only when the condition is false (compare capture only).
Expr * UE
UE Helper expression of the form: 'OpaqueValueExpr(x) binop OpaqueValueExpr(expr)' or 'OpaqueValueExp...
bool IsPostfixUpdate
True if original value of 'x' must be stored in 'v', not an updated one.
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspon...