clang: include/clang/AST/StmtOpenMP.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14#ifndef LLVM_CLANG_AST_STMTOPENMP_H
15#define LLVM_CLANG_AST_STMTOPENMP_H
16
24
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
145
146
147 enum {
148 LOOP_STMT,
149 DISTANCE_FUNC,
150 LOOPVAR_FUNC,
151 LOOPVAR_REF,
152 LastSubStmt = LOOPVAR_REF
153 };
154
155private:
156
157 Stmt *SubStmts[LastSubStmt + 1] = {};
158
159 OMPCanonicalLoop() : Stmt(StmtClass::OMPCanonicalLoopClass) {}
160
161public:
162
168 S->setLoopStmt(LoopStmt);
169 S->setDistanceFunc(DistanceFunc);
170 S->setLoopVarFunc(LoopVarFunc);
171 S->setLoopVarRef(LoopVarRef);
172 return S;
173 }
174
175
178 }
179
181 return S->getStmtClass() == StmtClass::OMPCanonicalLoopClass;
182 }
183
186
187
188
190 return child_range(&SubStmts[0], &SubStmts[0] + LastSubStmt + 1);
191 }
193 return const_child_range(&SubStmts[0], &SubStmts[0] + LastSubStmt + 1);
194 }
195
196
197
198
202 assert((isa(S) || isa(S)) &&
203 "Canonical loop must be a for loop (range-based or otherwise)");
204 SubStmts[LOOP_STMT] = S;
205 }
206
207
208
209
210
211
212
213
214
216 return cast(SubStmts[DISTANCE_FUNC]);
217 }
219 return cast(SubStmts[DISTANCE_FUNC]);
220 }
222 assert(S && "Expected non-null captured statement");
223 SubStmts[DISTANCE_FUNC] = S;
224 }
225
226
227
228
229
230
231
232
233
234
235
237 return cast(SubStmts[LOOPVAR_FUNC]);
238 }
240 return cast(SubStmts[LOOPVAR_FUNC]);
241 }
243 assert(S && "Expected non-null captured statement");
244 SubStmts[LOOPVAR_FUNC] = S;
245 }
246
247
248
249
251 return cast(SubStmts[LOOPVAR_REF]);
252 }
254 return cast(SubStmts[LOOPVAR_REF]);
255 }
257 assert(E && "Expected non-null loop variable");
258 SubStmts[LOOPVAR_REF] = E;
259 }
260
261};
262
263
264
265
269
270
272
274
276
277
280 return {};
282 }
283
284protected:
285
287
288
289
290
291
292
293
294
297 : Stmt(SC), Kind(K), StartLoc(std::move(StartLoc)),
298 EndLoc(std::move(EndLoc)) {}
299
300 template <typename T, typename... Params>
302 Stmt *AssociatedStmt, unsigned NumChildren,
303 Params &&... P) {
304 void *Mem =
305 C.Allocate(sizeof(T) + OMPChildren::size(Clauses.size(), AssociatedStmt,
306 NumChildren),
307 alignof(T));
308
309 auto *Data = OMPChildren::Create(reinterpret_cast<T *>(Mem) + 1, Clauses,
310 AssociatedStmt, NumChildren);
311 auto *Inst = new (Mem) T(std::forward(P)...);
312 Inst->Data = Data;
313 return Inst;
314 }
315
316 template <typename T, typename... Params>
318 bool HasAssociatedStmt, unsigned NumChildren,
319 Params &&... P) {
320 void *Mem =
321 C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
322 NumChildren),
323 alignof(T));
325 OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
326 HasAssociatedStmt, NumChildren);
327 auto *Inst = new (Mem) T(std::forward(P)...);
328 Inst->Data = Data;
329 return Inst;
330 }
331
332 template
334 bool HasAssociatedStmt = false,
335 unsigned NumChildren = 0) {
336 void *Mem =
337 C.Allocate(sizeof(T) + OMPChildren::size(NumClauses, HasAssociatedStmt,
338 NumChildren),
339 alignof(T));
341 OMPChildren::CreateEmpty(reinterpret_cast<T *>(Mem) + 1, NumClauses,
342 HasAssociatedStmt, NumChildren);
343 auto *Inst = new (Mem) T;
344 Inst->Data = Data;
345 return Inst;
346 }
347
348public:
349
351 : public llvm::iterator_adaptor_base<
352 used_clauses_child_iterator, ArrayRef<OMPClause *>::iterator,
353 std::forward_iterator_tag, Stmt *, ptrdiff_t, Stmt *, Stmt *> {
356
357 void MoveToNext() {
358 if (ChildI != ChildEnd)
359 return;
360 while (this->I != End) {
361 ++this->I;
362 if (this->I != End) {
363 ChildI = (*this->I)->used_children().begin();
364 ChildEnd = (*this->I)->used_children().end();
365 if (ChildI != ChildEnd)
366 return;
367 }
368 }
369 }
370
371 public:
374 End(Clauses.end()) {
375 if (this->I != End) {
376 ChildI = (*this->I)->used_children().begin();
377 ChildEnd = (*this->I)->used_children().end();
378 MoveToNext();
379 }
380 }
383
385 ++ChildI;
386 if (ChildI != ChildEnd)
387 return *this;
388 if (this->I != End) {
389 ++this->I;
390 if (this->I != End) {
391 ChildI = (*this->I)->used_children().begin();
392 ChildEnd = (*this->I)->used_children().end();
393 }
394 }
395 MoveToNext();
396 return *this;
397 }
398 };
399
400 static llvm::iterator_range<used_clauses_child_iterator>
402 return {
405 }
406
407
408
409
410
411 template
413 : public llvm::iterator_adaptor_base<
414 specific_clause_iterator,
415 ArrayRef<OMPClause *>::const_iterator, std::forward_iterator_tag,
416 const SpecificClause *, ptrdiff_t, const SpecificClause *,
417 const SpecificClause *> {
419
420 void SkipToNextClause() {
421 while (this->I != End && !isa(*this->I))
422 ++this->I;
423 }
424
425 public:
428 End(Clauses.end()) {
429 SkipToNextClause();
430 }
431
433 return cast(*this->I);
434 }
435 const SpecificClause *operator->() const { return **this; }
436
438 ++this->I;
439 SkipToNextClause();
440 return *this;
441 }
442 };
443
444 template
445 static llvm::iterator_range<specific_clause_iterator>
450 }
451
452 template
453 llvm::iterator_range<specific_clause_iterator>
455 return getClausesOfKind(clauses());
456 }
457
458
459
460
461
462
463 template
465 auto ClausesOfKind = getClausesOfKind(Clauses);
466
467 if (ClausesOfKind.begin() != ClausesOfKind.end()) {
468 assert(std::next(ClausesOfKind.begin()) == ClausesOfKind.end() &&
469 "There are at least 2 clauses of the specified kind");
470 return *ClausesOfKind.begin();
471 }
472 return nullptr;
473 }
474
475 template
477 return getSingleClause(clauses());
478 }
479
480
481
482 template
484 auto Clauses = getClausesOfKind();
485 return Clauses.begin() != Clauses.end();
486 }
487
488
490
492
493
494
495
496
498
499
500
501
503
504
507 return 0;
509 }
510
511
512
513
514
516
517
519
520
523 }
526 "Expected directive with the associated statement.");
528 }
529
530
531
532
533
536 "Expected directive with the associated statement.");
540 }
541
542
545 "Expected directive with the associated statement.");
549 }
550
554 }
555
557
559 return S->getStmtClass() >= firstOMPExecutableDirectiveConstant &&
560 S->getStmtClass() <= lastOMPExecutableDirectiveConstant;
561 }
562
567 }
568
571 }
572
575 return {};
577 }
578
579
580
581
582
584
585
586
587
590 }
592
595 }
598 "Expected directive with the associated statement.");
600 }
601};
602
603
604
605
606
607
608
609
610
611
615
616 bool HasCancel = false;
617
618
619
620
621
622
625 llvm::omp::OMPD_parallel, StartLoc, EndLoc) {}
626
627
628
633
634
635 void setTaskReductionRefExpr(Expr *E) { Data->getChildren()[0] = E; }
636
637
638 void setHasCancel(bool Has) { HasCancel = Has; }
639
640public:
641
642
643
644
645
646
647
648
649
650
651
652 static OMPParallelDirective *
653 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
654 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef,
655 bool HasCancel);
656
657
658
659
660
661
662 static OMPParallelDirective *CreateEmpty(const ASTContext &C,
663 unsigned NumClauses, EmptyShell);
664
665
668 }
671 }
672
673
675
677 return T->getStmtClass() == OMPParallelDirectiveClass;
678 }
679};
680
681
682
685
686protected:
687
689
690
691
692
693
694
695
696
697
703
704public:
705
706
708
709
711
712
714
715
717
718
719
721
722
724
725
727
728
730
731
733
734
735
737 };
738
739
740
742
744
746
748
750
752
754
756
758
760
762
764
766
768
770
772
773
775
776
778
779
780
782
783
784
785
786
788
790
792
794
796
798
799
801
802
804
805
807
809
810
812
813
814
818 Cond != nullptr && Init != nullptr && Inc != nullptr;
819 }
820
821
822
823
824
830 Cond = nullptr;
831 Init = nullptr;
832 Inc = nullptr;
833 IL = nullptr;
834 LB = nullptr;
835 UB = nullptr;
836 ST = nullptr;
837 EUB = nullptr;
838 NLB = nullptr;
839 NUB = nullptr;
847 Inits.resize(Size);
853 for (unsigned I = 0; I < Size; ++I) {
856 Inits[I] = nullptr;
862 }
873 }
874 };
875
876
878
879
880
881
882
884 bool TryImperfectlyNestedLoops);
886 bool TryImperfectlyNestedLoops) {
888 TryImperfectlyNestedLoops);
889 }
890
891
892
893 static bool
895 unsigned NumLoops,
896 llvm::function_ref<bool(unsigned, Stmt *)> Callback,
898 OnTransformationCallback);
899 static bool
901 unsigned NumLoops,
902 llvm::function_ref<bool(unsigned, const Stmt *)> Callback,
904 OnTransformationCallback) {
905 auto &&NewCallback = [Callback](unsigned Cnt, Stmt *CurStmt) {
906 return Callback(Cnt, CurStmt);
907 };
908 auto &&NewTransformCb =
910 OnTransformationCallback(A);
911 };
912 return doForAllLoops(const_cast<Stmt *>(CurStmt), TryImperfectlyNestedLoops,
913 NumLoops, NewCallback, NewTransformCb);
914 }
915
916
917
918 static bool
920 unsigned NumLoops,
921 llvm::function_ref<bool(unsigned, Stmt *)> Callback) {
923 return doForAllLoops(CurStmt, TryImperfectlyNestedLoops, NumLoops, Callback,
924 TransformCb);
925 }
926 static bool
928 unsigned NumLoops,
929 llvm::function_ref<bool(unsigned, const Stmt *)> Callback) {
930 auto &&NewCallback = [Callback](unsigned Cnt, const Stmt *CurStmt) {
931 return Callback(Cnt, CurStmt);
932 };
933 return doForAllLoops(const_cast<Stmt *>(CurStmt), TryImperfectlyNestedLoops,
934 NumLoops, NewCallback);
935 }
936
937
938
940 Stmt *CurStmt, bool TryImperfectlyNestedLoops, unsigned NumLoops,
941 llvm::function_ref<void(unsigned, Stmt *, Stmt *)> Callback);
943 const Stmt *CurStmt, bool TryImperfectlyNestedLoops, unsigned NumLoops,
944 llvm::function_ref<void(unsigned, const Stmt *, const Stmt *)> Callback) {
945 auto &&NewCallback = [Callback](unsigned Cnt, Stmt *Loop, Stmt *Body) {
946 Callback(Cnt, Loop, Body);
947 };
949 NumLoops, NewCallback);
950 }
951
953 if (auto *D = dyn_cast(T))
955 return false;
956 }
957};
958
959
962
963
964 unsigned NumGeneratedLoops = 0;
965
966protected:
973
974
976
977public:
978
980
981
983
984
985
986
987
988
990
991
993
996 return C == OMPTileDirectiveClass || C == OMPUnrollDirectiveClass ||
997 C == OMPReverseDirectiveClass || C == OMPInterchangeDirectiveClass;
998 }
999};
1000
1001
1002
1003
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023 enum {
1024 IterationVariableOffset = 0,
1025 LastIterationOffset = 1,
1026 CalcLastIterationOffset = 2,
1027 PreConditionOffset = 3,
1028 CondOffset = 4,
1029 InitOffset = 5,
1030 IncOffset = 6,
1031 PreInitsOffset = 7,
1032
1033
1034
1035
1036 DefaultEnd = 8,
1037
1038 IsLastIterVariableOffset = 8,
1039 LowerBoundVariableOffset = 9,
1040 UpperBoundVariableOffset = 10,
1041 StrideVariableOffset = 11,
1042 EnsureUpperBoundOffset = 12,
1043 NextLowerBoundOffset = 13,
1044 NextUpperBoundOffset = 14,
1045 NumIterationsOffset = 15,
1046
1047 WorksharingEnd = 16,
1048 PrevLowerBoundVariableOffset = 16,
1049 PrevUpperBoundVariableOffset = 17,
1050 DistIncOffset = 18,
1051 PrevEnsureUpperBoundOffset = 19,
1052 CombinedLowerBoundVariableOffset = 20,
1053 CombinedUpperBoundVariableOffset = 21,
1054 CombinedEnsureUpperBoundOffset = 22,
1055 CombinedInitOffset = 23,
1056 CombinedConditionOffset = 24,
1057 CombinedNextLowerBoundOffset = 25,
1058 CombinedNextUpperBoundOffset = 26,
1059 CombinedDistConditionOffset = 27,
1060 CombinedParForInDistConditionOffset = 28,
1061
1062
1063
1064 CombinedDistributeEnd = 29,
1065 };
1066
1067
1069 auto **Storage = reinterpret_cast<Expr **>(
1072 }
1073
1074
1075 MutableArrayRef<Expr *> getPrivateCounters() {
1076 auto **Storage = reinterpret_cast<Expr **>(
1080 }
1081
1082
1083 MutableArrayRef<Expr *> getInits() {
1084 auto **Storage = reinterpret_cast<Expr **>(
1088 }
1089
1090
1091 MutableArrayRef<Expr *> getUpdates() {
1092 auto **Storage = reinterpret_cast<Expr **>(
1096 }
1097
1098
1099 MutableArrayRef<Expr *> getFinals() {
1100 auto **Storage = reinterpret_cast<Expr **>(
1104 }
1105
1106
1107 MutableArrayRef<Expr *> getDependentCounters() {
1108 auto **Storage = reinterpret_cast<Expr **>(
1112 }
1113
1114
1115 MutableArrayRef<Expr *> getDependentInits() {
1116 auto **Storage = reinterpret_cast<Expr **>(
1120 }
1121
1122
1123 MutableArrayRef<Expr *> getFinalsConditions() {
1124 auto **Storage = reinterpret_cast<Expr **>(
1128 }
1129
1130protected:
1131
1132
1133
1134
1135
1136
1137
1138
1141 unsigned CollapsedNum)
1143
1144
1147 return CombinedDistributeEnd;
1150 return WorksharingEnd;
1151 return DefaultEnd;
1152 }
1153
1154
1158 8 * CollapsedNum;
1159
1160
1161 }
1162
1165 }
1168 }
1171 }
1178 }
1184 "expected worksharing loop directive");
1186 }
1192 "expected worksharing loop directive");
1194 }
1200 "expected worksharing loop directive");
1202 }
1208 "expected worksharing loop directive");
1210 }
1216 "expected worksharing loop directive");
1218 }
1224 "expected worksharing loop directive");
1226 }
1232 "expected worksharing loop directive");
1234 }
1240 "expected worksharing loop directive");
1242 }
1245 "expected loop bound sharing directive");
1246 Data->getChildren()[PrevLowerBoundVariableOffset] = PrevLB;
1247 }
1250 "expected loop bound sharing directive");
1251 Data->getChildren()[PrevUpperBoundVariableOffset] = PrevUB;
1252 }
1255 "expected loop bound sharing directive");
1257 }
1260 "expected loop bound sharing directive");
1261 Data->getChildren()[PrevEnsureUpperBoundOffset] = PrevEUB;
1262 }
1265 "expected loop bound sharing directive");
1266 Data->getChildren()[CombinedLowerBoundVariableOffset] = CombLB;
1267 }
1270 "expected loop bound sharing directive");
1271 Data->getChildren()[CombinedUpperBoundVariableOffset] = CombUB;
1272 }
1275 "expected loop bound sharing directive");
1276 Data->getChildren()[CombinedEnsureUpperBoundOffset] = CombEUB;
1277 }
1280 "expected loop bound sharing directive");
1282 }
1285 "expected loop bound sharing directive");
1286 Data->getChildren()[CombinedConditionOffset] = CombCond;
1287 }
1290 "expected loop bound sharing directive");
1291 Data->getChildren()[CombinedNextLowerBoundOffset] = CombNLB;
1292 }
1295 "expected loop bound sharing directive");
1296 Data->getChildren()[CombinedNextUpperBoundOffset] = CombNUB;
1297 }
1300 "expected loop bound distribute sharing directive");
1301 Data->getChildren()[CombinedDistConditionOffset] = CombDistCond;
1302 }
1305 "expected loop bound distribute sharing directive");
1306 Data->getChildren()[CombinedParForInDistConditionOffset] =
1307 CombParForInDistCond;
1308 }
1317
1318public:
1320 return cast(Data->getChildren()[IterationVariableOffset]);
1321 }
1323 return cast(Data->getChildren()[LastIterationOffset]);
1324 }
1326 return cast(Data->getChildren()[CalcLastIterationOffset]);
1327 }
1329 return cast(Data->getChildren()[PreConditionOffset]);
1330 }
1336 }
1343 "expected worksharing loop directive");
1344 return cast(Data->getChildren()[IsLastIterVariableOffset]);
1345 }
1351 "expected worksharing loop directive");
1352 return cast(Data->getChildren()[LowerBoundVariableOffset]);
1353 }
1359 "expected worksharing loop directive");
1360 return cast(Data->getChildren()[UpperBoundVariableOffset]);
1361 }
1367 "expected worksharing loop directive");
1368 return cast(Data->getChildren()[StrideVariableOffset]);
1369 }
1375 "expected worksharing loop directive");
1376 return cast(Data->getChildren()[EnsureUpperBoundOffset]);
1377 }
1383 "expected worksharing loop directive");
1384 return cast(Data->getChildren()[NextLowerBoundOffset]);
1385 }
1391 "expected worksharing loop directive");
1392 return cast(Data->getChildren()[NextUpperBoundOffset]);
1393 }
1399 "expected worksharing loop directive");
1400 return cast(Data->getChildren()[NumIterationsOffset]);
1401 }
1404 "expected loop bound sharing directive");
1405 return cast(Data->getChildren()[PrevLowerBoundVariableOffset]);
1406 }
1409 "expected loop bound sharing directive");
1410 return cast(Data->getChildren()[PrevUpperBoundVariableOffset]);
1411 }
1414 "expected loop bound sharing directive");
1416 }
1419 "expected loop bound sharing directive");
1420 return cast(Data->getChildren()[PrevEnsureUpperBoundOffset]);
1421 }
1424 "expected loop bound sharing directive");
1425 return cast(Data->getChildren()[CombinedLowerBoundVariableOffset]);
1426 }
1429 "expected loop bound sharing directive");
1430 return cast(Data->getChildren()[CombinedUpperBoundVariableOffset]);
1431 }
1434 "expected loop bound sharing directive");
1435 return cast(Data->getChildren()[CombinedEnsureUpperBoundOffset]);
1436 }
1439 "expected loop bound sharing directive");
1440 return cast(Data->getChildren()[CombinedInitOffset]);
1441 }
1444 "expected loop bound sharing directive");
1445 return cast(Data->getChildren()[CombinedConditionOffset]);
1446 }
1449 "expected loop bound sharing directive");
1450 return cast(Data->getChildren()[CombinedNextLowerBoundOffset]);
1451 }
1454 "expected loop bound sharing directive");
1455 return cast(Data->getChildren()[CombinedNextUpperBoundOffset]);
1456 }
1459 "expected loop bound distribute sharing directive");
1460 return cast(Data->getChildren()[CombinedDistConditionOffset]);
1461 }
1464 "expected loop bound distribute sharing directive");
1465 return cast(Data->getChildren()[CombinedParForInDistConditionOffset]);
1466 }
1470 }
1471
1473
1476 }
1477
1479
1481 return const_cast<OMPLoopDirective *>(this)->getPrivateCounters();
1482 }
1483
1485
1488 }
1489
1491
1494 }
1495
1497
1500 }
1501
1503
1505 return const_cast<OMPLoopDirective *>(this)->getDependentCounters();
1506 }
1507
1509
1511 return const_cast<OMPLoopDirective *>(this)->getDependentInits();
1512 }
1513
1515
1517 return const_cast<OMPLoopDirective *>(this)->getFinalsConditions();
1518 }
1519
1521 return T->getStmtClass() == OMPSimdDirectiveClass ||
1522 T->getStmtClass() == OMPForDirectiveClass ||
1523 T->getStmtClass() == OMPForSimdDirectiveClass ||
1524 T->getStmtClass() == OMPParallelForDirectiveClass ||
1525 T->getStmtClass() == OMPParallelForSimdDirectiveClass ||
1526 T->getStmtClass() == OMPTaskLoopDirectiveClass ||
1527 T->getStmtClass() == OMPTaskLoopSimdDirectiveClass ||
1528 T->getStmtClass() == OMPMaskedTaskLoopDirectiveClass ||
1529 T->getStmtClass() == OMPMaskedTaskLoopSimdDirectiveClass ||
1530 T->getStmtClass() == OMPMasterTaskLoopDirectiveClass ||
1531 T->getStmtClass() == OMPMasterTaskLoopSimdDirectiveClass ||
1532 T->getStmtClass() == OMPGenericLoopDirectiveClass ||
1533 T->getStmtClass() == OMPTeamsGenericLoopDirectiveClass ||
1534 T->getStmtClass() == OMPTargetTeamsGenericLoopDirectiveClass ||
1535 T->getStmtClass() == OMPParallelGenericLoopDirectiveClass ||
1536 T->getStmtClass() == OMPTargetParallelGenericLoopDirectiveClass ||
1537 T->getStmtClass() == OMPParallelMaskedTaskLoopDirectiveClass ||
1538 T->getStmtClass() == OMPParallelMaskedTaskLoopSimdDirectiveClass ||
1539 T->getStmtClass() == OMPParallelMasterTaskLoopDirectiveClass ||
1540 T->getStmtClass() == OMPParallelMasterTaskLoopSimdDirectiveClass ||
1541 T->getStmtClass() == OMPDistributeDirectiveClass ||
1542 T->getStmtClass() == OMPTargetParallelForDirectiveClass ||
1543 T->getStmtClass() == OMPDistributeParallelForDirectiveClass ||
1544 T->getStmtClass() == OMPDistributeParallelForSimdDirectiveClass ||
1545 T->getStmtClass() == OMPDistributeSimdDirectiveClass ||
1546 T->getStmtClass() == OMPTargetParallelForSimdDirectiveClass ||
1547 T->getStmtClass() == OMPTargetSimdDirectiveClass ||
1548 T->getStmtClass() == OMPTeamsDistributeDirectiveClass ||
1549 T->getStmtClass() == OMPTeamsDistributeSimdDirectiveClass ||
1550 T->getStmtClass() ==
1551 OMPTeamsDistributeParallelForSimdDirectiveClass ||
1552 T->getStmtClass() == OMPTeamsDistributeParallelForDirectiveClass ||
1553 T->getStmtClass() ==
1554 OMPTargetTeamsDistributeParallelForDirectiveClass ||
1555 T->getStmtClass() ==
1556 OMPTargetTeamsDistributeParallelForSimdDirectiveClass ||
1557 T->getStmtClass() == OMPTargetTeamsDistributeDirectiveClass ||
1558 T->getStmtClass() == OMPTargetTeamsDistributeSimdDirectiveClass;
1559 }
1560};
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1574
1575
1576
1577
1578
1579
1581 unsigned CollapsedNum)
1583 EndLoc, CollapsedNum) {}
1584
1585
1586
1587
1588
1592
1593public:
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604 static OMPSimdDirective *Create(const ASTContext &C, SourceLocation StartLoc,
1605 SourceLocation EndLoc, unsigned CollapsedNum,
1606 ArrayRef<OMPClause *> Clauses,
1607 Stmt *AssociatedStmt,
1608 const HelperExprs &Exprs);
1609
1610
1611
1612
1613
1614
1615
1616
1617 static OMPSimdDirective *CreateEmpty(const ASTContext &C, unsigned NumClauses,
1618 unsigned CollapsedNum, EmptyShell);
1619
1621 return T->getStmtClass() == OMPSimdDirectiveClass;
1622 }
1623};
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1637
1638 bool HasCancel = false;
1639
1640
1641
1642
1643
1644
1645
1647 unsigned CollapsedNum)
1649 EndLoc, CollapsedNum) {}
1650
1651
1652
1653
1654
1658
1659
1660 void setTaskReductionRefExpr(Expr *E) {
1662 llvm::omp::OMPD_for)] = E;
1663 }
1664
1665
1666 void setHasCancel(bool Has) { HasCancel = Has; }
1667
1668public:
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682 static OMPForDirective *Create(const ASTContext &C, SourceLocation StartLoc,
1683 SourceLocation EndLoc, unsigned CollapsedNum,
1684 ArrayRef<OMPClause *> Clauses,
1685 Stmt *AssociatedStmt, const HelperExprs &Exprs,
1686 Expr *TaskRedRef, bool HasCancel);
1687
1688
1689
1690
1691
1692
1693
1694
1695 static OMPForDirective *CreateEmpty(const ASTContext &C, unsigned NumClauses,
1696 unsigned CollapsedNum, EmptyShell);
1697
1698
1702 }
1705 }
1706
1707
1709
1711 return T->getStmtClass() == OMPForDirectiveClass;
1712 }
1713};
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1727
1728
1729
1730
1731
1732
1734 unsigned CollapsedNum)
1736 StartLoc, EndLoc, CollapsedNum) {}
1737
1738
1739
1740
1741
1745
1746public:
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757 static OMPForSimdDirective *
1758 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1759 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
1760 Stmt *AssociatedStmt, const HelperExprs &Exprs);
1761
1762
1763
1764
1765
1766
1767
1768
1769 static OMPForSimdDirective *CreateEmpty(const ASTContext &C,
1770 unsigned NumClauses,
1771 unsigned CollapsedNum, EmptyShell);
1772
1774 return T->getStmtClass() == OMPForSimdDirectiveClass;
1775 }
1776};
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1790
1791
1792 bool HasCancel = false;
1793
1794
1795
1796
1797
1798
1801 llvm::omp::OMPD_sections, StartLoc, EndLoc) {}
1802
1803
1804
1809
1810
1811 void setTaskReductionRefExpr(Expr *E) { Data->getChildren()[0] = E; }
1812
1813
1814 void setHasCancel(bool Has) { HasCancel = Has; }
1815
1816public:
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828 static OMPSectionsDirective *
1829 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1830 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef,
1831 bool HasCancel);
1832
1833
1834
1835
1836
1837
1838
1839 static OMPSectionsDirective *CreateEmpty(const ASTContext &C,
1840 unsigned NumClauses, EmptyShell);
1841
1842
1845 }
1848 }
1849
1850
1852
1854 return T->getStmtClass() == OMPSectionsDirectiveClass;
1855 }
1856};
1857
1858
1859
1860
1861
1862
1863
1867
1868
1869 bool HasCancel = false;
1870
1871
1872
1873
1874
1875
1878 llvm::omp::OMPD_section, StartLoc, EndLoc) {}
1879
1880
1881
1886
1887public:
1888
1889
1890
1891
1892
1893
1894
1895
1896 static OMPSectionDirective *Create(const ASTContext &C,
1897 SourceLocation StartLoc,
1898 SourceLocation EndLoc,
1899 Stmt *AssociatedStmt, bool HasCancel);
1900
1901
1902
1903
1904
1905 static OMPSectionDirective *CreateEmpty(const ASTContext &C, EmptyShell);
1906
1907
1909
1910
1912
1914 return T->getStmtClass() == OMPSectionDirectiveClass;
1915 }
1916};
1917
1918
1919
1920
1921
1922
1923
1924
1928
1929
1930
1931
1932
1933
1936 StartLoc, EndLoc) {}
1937
1938
1939
1943
1944public:
1945
1946
1947
1948
1949
1950
1951
1952 static OMPScopeDirective *Create(const ASTContext &C, SourceLocation StartLoc,
1953 SourceLocation EndLoc,
1954 ArrayRef<OMPClause *> Clauses,
1955 Stmt *AssociatedStmt);
1956
1957
1958
1959
1960
1961 static OMPScopeDirective *CreateEmpty(const ASTContext &C,
1962 unsigned NumClauses, EmptyShell);
1963
1965 return T->getStmtClass() == OMPScopeDirectiveClass;
1966 }
1967};
1968
1969
1970
1971
1972
1973
1974
1975
1976
1980
1981
1982
1983
1984
1987 StartLoc, EndLoc) {}
1988
1989
1990
1994
1995public:
1996
1997
1998
1999
2000
2001
2002
2003
2004 static OMPSingleDirective *
2005 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2006 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
2007
2008
2009
2010
2011
2012
2013
2014 static OMPSingleDirective *CreateEmpty(const ASTContext &C,
2015 unsigned NumClauses, EmptyShell);
2016
2018 return T->getStmtClass() == OMPSingleDirectiveClass;
2019 }
2020};
2021
2022
2023
2024
2025
2026
2027
2031
2032
2033
2034
2035
2038 StartLoc, EndLoc) {}
2039
2040
2041
2045
2046public:
2047
2048
2049
2050
2051
2052
2053
2054 static OMPMasterDirective *Create(const ASTContext &C,
2055 SourceLocation StartLoc,
2056 SourceLocation EndLoc,
2057 Stmt *AssociatedStmt);
2058
2059
2060
2061
2062
2063 static OMPMasterDirective *CreateEmpty(const ASTContext &C, EmptyShell);
2064
2066 return T->getStmtClass() == OMPMasterDirectiveClass;
2067 }
2068};
2069
2070
2071
2072
2073
2074
2075
2079
2081
2082
2083
2084
2085
2086
2090 llvm::omp::OMPD_critical, StartLoc, EndLoc),
2091 DirName(Name) {}
2092
2093
2094
2099
2100
2101
2102
2103
2104 void setDirectiveName(const DeclarationNameInfo &Name) { DirName = Name; }
2105
2106public:
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116 static OMPCriticalDirective *
2117 Create(const ASTContext &C, const DeclarationNameInfo &Name,
2118 SourceLocation StartLoc, SourceLocation EndLoc,
2119 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
2120
2121
2122
2123
2124
2125
2126 static OMPCriticalDirective *CreateEmpty(const ASTContext &C,
2127 unsigned NumClauses, EmptyShell);
2128
2129
2130
2132
2134 return T->getStmtClass() == OMPCriticalDirectiveClass;
2135 }
2136};
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2150
2151
2152 bool HasCancel = false;
2153
2154
2155
2156
2157
2158
2159
2161 unsigned CollapsedNum)
2163 llvm::omp::OMPD_parallel_for, StartLoc, EndLoc,
2164 CollapsedNum) {}
2165
2166
2167
2168
2169
2174
2175
2176 void setTaskReductionRefExpr(Expr *E) {
2178 llvm::omp::OMPD_parallel_for)] = E;
2179 }
2180
2181
2182 void setHasCancel(bool Has) { HasCancel = Has; }
2183
2184public:
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198 static OMPParallelForDirective *
2199 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2200 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
2201 Stmt *AssociatedStmt, const HelperExprs &Exprs, Expr *TaskRedRef,
2202 bool HasCancel);
2203
2204
2205
2206
2207
2208
2209
2210
2211 static OMPParallelForDirective *CreateEmpty(const ASTContext &C,
2212 unsigned NumClauses,
2213 unsigned CollapsedNum,
2214 EmptyShell);
2215
2216
2220 }
2224 }
2225
2226
2228
2230 return T->getStmtClass() == OMPParallelForDirectiveClass;
2231 }
2232};
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2247
2248
2249
2250
2251
2252
2254 unsigned CollapsedNum)
2256 llvm::omp::OMPD_parallel_for_simd, StartLoc, EndLoc,
2257 CollapsedNum) {}
2258
2259
2260
2261
2262
2267
2268public:
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279 static OMPParallelForSimdDirective *
2280 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2281 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
2282 Stmt *AssociatedStmt, const HelperExprs &Exprs);
2283
2284
2285
2286
2287
2288
2289
2290
2291 static OMPParallelForSimdDirective *CreateEmpty(const ASTContext &C,
2292 unsigned NumClauses,
2293 unsigned CollapsedNum,
2294 EmptyShell);
2295
2297 return T->getStmtClass() == OMPParallelForSimdDirectiveClass;
2298 }
2299};
2300
2301
2302
2303
2304
2305
2306
2307
2308
2312
2315 llvm::omp::OMPD_parallel_master, StartLoc,
2316 EndLoc) {}
2317
2320 llvm::omp::OMPD_parallel_master,
2322
2323
2324 void setTaskReductionRefExpr(Expr *E) { Data->getChildren()[0] = E; }
2325
2326public:
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337 static OMPParallelMasterDirective *
2338 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2339 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef);
2340
2341
2342
2343
2344
2345
2346
2347 static OMPParallelMasterDirective *
2348 CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell);
2349
2350
2353 }
2357 }
2358
2360 return T->getStmtClass() == OMPParallelMasterDirectiveClass;
2361 }
2362};
2363
2364
2365
2366
2367
2368
2369
2370
2371
2375
2378 llvm::omp::OMPD_parallel_masked, StartLoc,
2379 EndLoc) {}
2380
2383 llvm::omp::OMPD_parallel_masked,
2385
2386
2387 void setTaskReductionRefExpr(Expr *E) { Data->getChildren()[0] = E; }
2388
2389public:
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400 static OMPParallelMaskedDirective *
2401 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2402 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef);
2403
2404
2405
2406
2407
2408
2409
2410 static OMPParallelMaskedDirective *
2411 CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell);
2412
2413
2416 }
2420 }
2421
2423 return T->getStmtClass() == OMPParallelMaskedDirectiveClass;
2424 }
2425};
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2439
2440
2441 bool HasCancel = false;
2442
2443
2444
2445
2446
2447
2450 llvm::omp::OMPD_parallel_sections, StartLoc,
2451 EndLoc) {}
2452
2453
2454
2457 llvm::omp::OMPD_parallel_sections,
2459
2460
2461 void setTaskReductionRefExpr(Expr *E) { Data->getChildren()[0] = E; }
2462
2463
2464 void setHasCancel(bool Has) { HasCancel = Has; }
2465
2466public:
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478 static OMPParallelSectionsDirective *
2479 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2480 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef,
2481 bool HasCancel);
2482
2483
2484
2485
2486
2487
2488
2489 static OMPParallelSectionsDirective *
2490 CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell);
2491
2492
2495 }
2499 }
2500
2501
2503
2505 return T->getStmtClass() == OMPParallelSectionsDirectiveClass;
2506 }
2507};
2508
2509
2510
2511
2512
2513
2514
2515
2516
2520
2521 bool HasCancel = false;
2522
2523
2524
2525
2526
2527
2530 StartLoc, EndLoc) {}
2531
2532
2533
2537
2538
2539 void setHasCancel(bool Has) { HasCancel = Has; }
2540
2541public:
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551 static OMPTaskDirective *Create(const ASTContext &C, SourceLocation StartLoc,
2552 SourceLocation EndLoc,
2553 ArrayRef<OMPClause *> Clauses,
2554 Stmt *AssociatedStmt, bool HasCancel);
2555
2556
2557
2558
2559
2560
2561
2562 static OMPTaskDirective *CreateEmpty(const ASTContext &C, unsigned NumClauses,
2563 EmptyShell);
2564
2565
2567
2569 return T->getStmtClass() == OMPTaskDirectiveClass;
2570 }
2571};
2572
2573
2574
2575
2576
2577
2578
2582
2583
2584
2585
2586
2589 llvm::omp::OMPD_taskyield, StartLoc, EndLoc) {}
2590
2591
2592
2597
2598public:
2599
2600
2601
2602
2603
2604
2605 static OMPTaskyieldDirective *
2606 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc);
2607
2608
2609
2610
2611
2612 static OMPTaskyieldDirective *CreateEmpty(const ASTContext &C, EmptyShell);
2613
2615 return T->getStmtClass() == OMPTaskyieldDirectiveClass;
2616 }
2617};
2618
2619
2620
2621
2622
2623
2624
2628
2629
2630
2631
2632
2635 llvm::omp::OMPD_barrier, StartLoc, EndLoc) {}
2636
2637
2638
2643
2644public:
2645
2646
2647
2648
2649
2650
2651 static OMPBarrierDirective *
2652 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc);
2653
2654
2655
2656
2657
2658 static OMPBarrierDirective *CreateEmpty(const ASTContext &C, EmptyShell);
2659
2661 return T->getStmtClass() == OMPBarrierDirectiveClass;
2662 }
2663};
2664
2665
2666
2667
2668
2669
2670
2674
2675
2676
2677
2678
2681 llvm::omp::OMPD_taskwait, StartLoc, EndLoc) {}
2682
2683
2684
2689
2690public:
2691
2692
2693
2694
2695
2696
2697
2698 static OMPTaskwaitDirective *Create(const ASTContext &C,
2699 SourceLocation StartLoc,
2700 SourceLocation EndLoc,
2701 ArrayRef<OMPClause *> Clauses);
2702
2703
2704
2705
2706
2707
2708 static OMPTaskwaitDirective *CreateEmpty(const ASTContext &C,
2709 unsigned NumClauses, EmptyShell);
2710
2712 return T->getStmtClass() == OMPTaskwaitDirectiveClass;
2713 }
2714};
2715
2716
2717
2718
2719
2720
2721
2725
2726
2727
2728
2729
2732 llvm::omp::OMPD_taskgroup, StartLoc, EndLoc) {}
2733
2734
2735
2740
2741
2742 void setReductionRef(Expr *RR) { Data->getChildren()[0] = RR; }
2743
2744public:
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754 static OMPTaskgroupDirective *
2755 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2756 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
2757 Expr *ReductionRef);
2758
2759
2760
2761
2762
2763
2764 static OMPTaskgroupDirective *CreateEmpty(const ASTContext &C,
2765 unsigned NumClauses, EmptyShell);
2766
2767
2768
2771 }
2773
2775 return T->getStmtClass() == OMPTaskgroupDirectiveClass;
2776 }
2777};
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2792
2793
2794
2795
2796
2799 StartLoc, EndLoc) {}
2800
2801
2802
2806
2807public:
2808
2809
2810
2811
2812
2813
2814
2815
2816 static OMPFlushDirective *Create(const ASTContext &C, SourceLocation StartLoc,
2817 SourceLocation EndLoc,
2818 ArrayRef<OMPClause *> Clauses);
2819
2820
2821
2822
2823
2824
2825
2826 static OMPFlushDirective *CreateEmpty(const ASTContext &C,
2827 unsigned NumClauses, EmptyShell);
2828
2830 return T->getStmtClass() == OMPFlushDirectiveClass;
2831 }
2832};
2833
2834
2835
2836
2837
2838
2839
2840
2844
2845
2846
2847
2848
2849
2852 StartLoc, EndLoc) {}
2853
2854
2855
2859
2860public:
2861
2862
2863
2864
2865
2866
2867
2868 static OMPDepobjDirective *Create(const ASTContext &C,
2869 SourceLocation StartLoc,
2870 SourceLocation EndLoc,
2871 ArrayRef<OMPClause *> Clauses);
2872
2873
2874
2875
2876
2877
2878
2879 static OMPDepobjDirective *CreateEmpty(const ASTContext &C,
2880 unsigned NumClauses, EmptyShell);
2881
2883 return T->getStmtClass() == OMPDepobjDirectiveClass;
2884 }
2885};
2886
2887
2888
2889
2890
2891
2892
2896
2897
2898
2899
2900
2903 llvm::omp::OMPD_ordered, StartLoc, EndLoc) {}
2904
2905
2906
2911
2912public:
2913
2914
2915
2916
2917
2918
2919
2920
2921 static OMPOrderedDirective *
2922 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2923 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
2924
2925
2926
2927
2928
2929
2930
2931 static OMPOrderedDirective *CreateEmpty(const ASTContext &C,
2932 unsigned NumClauses,
2933 bool IsStandalone, EmptyShell);
2934
2936 return T->getStmtClass() == OMPOrderedDirectiveClass;
2937 }
2938};
2939
2940
2941
2942
2943
2944
2945
2946
2950
2951 struct FlagTy {
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961 LLVM_PREFERRED_TYPE(bool)
2962 uint8_t IsXLHSInRHSPart : 1;
2963
2964
2965
2966
2967
2968
2969
2970
2971 LLVM_PREFERRED_TYPE(bool)
2972 uint8_t IsPostfixUpdate : 1;
2973
2974
2975 LLVM_PREFERRED_TYPE(bool)
2976 uint8_t IsFailOnly : 1;
2977 } Flags;
2978
2979
2980
2981
2982
2983
2986 StartLoc, EndLoc) {}
2987
2988
2989
2990 explicit OMPAtomicDirective()
2992 SourceLocation(), SourceLocation()) {}
2993
2994 enum DataPositionTy : size_t {
2995 POS_X = 0,
2996 POS_V,
2997 POS_E,
2998 POS_UpdateExpr,
2999 POS_D,
3000 POS_Cond,
3001 POS_R,
3002 };
3003
3004
3005 void setX(Expr *X) { Data->getChildren()[DataPositionTy::POS_X] = X; }
3006
3007
3008
3009 void setUpdateExpr(Expr *UE) {
3010 Data->getChildren()[DataPositionTy::POS_UpdateExpr] = UE;
3011 }
3012
3013 void setV(Expr *V) { Data->getChildren()[DataPositionTy::POS_V] = V; }
3014
3015 void setR(Expr *R) { Data->getChildren()[DataPositionTy::POS_R] = R; }
3016
3017 void setExpr(Expr *E) { Data->getChildren()[DataPositionTy::POS_E] = E; }
3018
3019 void setD(Expr *D) { Data->getChildren()[DataPositionTy::POS_D] = D; }
3020
3021 void setCond(Expr *C) { Data->getChildren()[DataPositionTy::POS_Cond] = C; }
3022
3023public:
3025
3027
3029
3031
3033
3034
3035
3037
3039
3041
3043
3045
3046
3048 };
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3065
3066
3067
3068
3069
3070
3071
3074
3075
3077 return cast_or_null(Data->getChildren()[DataPositionTy::POS_X]);
3078 }
3080 return cast_or_null(Data->getChildren()[DataPositionTy::POS_X]);
3081 }
3082
3083
3084
3086 return cast_or_null(
3088 }
3090 return cast_or_null(
3092 }
3093
3094
3095
3097
3098
3100
3101
3102 bool isFailOnly() const { return Flags.IsFailOnly; }
3103
3105 return cast_or_null(Data->getChildren()[DataPositionTy::POS_V]);
3106 }
3108 return cast_or_null(Data->getChildren()[DataPositionTy::POS_V]);
3109 }
3110
3112 return cast_or_null(Data->getChildren()[DataPositionTy::POS_R]);
3113 }
3115 return cast_or_null(Data->getChildren()[DataPositionTy::POS_R]);
3116 }
3117
3119 return cast_or_null(Data->getChildren()[DataPositionTy::POS_E]);
3120 }
3122 return cast_or_null(Data->getChildren()[DataPositionTy::POS_E]);
3123 }
3124
3126 return cast_or_null(Data->getChildren()[DataPositionTy::POS_D]);
3127 }
3129 return cast_or_null(Data->getChildren()[DataPositionTy::POS_D]);
3130 }
3131
3133 return cast_or_null(Data->getChildren()[DataPositionTy::POS_Cond]);
3134 }
3136 return cast_or_null(Data->getChildren()[DataPositionTy::POS_Cond]);
3137 }
3138
3140 return T->getStmtClass() == OMPAtomicDirectiveClass;
3141 }
3142};
3143
3144
3145
3146
3147
3148
3149
3150
3151
3155
3156
3157
3158
3159
3162 StartLoc, EndLoc) {}
3163
3164
3165
3169
3170public:
3171
3172
3173
3174
3175
3176
3177
3178
3179 static OMPTargetDirective *
3180 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3181 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
3182
3183
3184
3185
3186
3187
3188
3189 static OMPTargetDirective *CreateEmpty(const ASTContext &C,
3190 unsigned NumClauses, EmptyShell);
3191
3193 return T->getStmtClass() == OMPTargetDirectiveClass;
3194 }
3195};
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3209
3210
3211
3212
3213
3216 llvm::omp::OMPD_target_data, StartLoc, EndLoc) {}
3217
3218
3219
3224
3225public:
3226
3227
3228
3229
3230
3231
3232
3233
3234 static OMPTargetDataDirective *
3235 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3236 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
3237
3238
3239
3240
3241
3242
3243 static OMPTargetDataDirective *CreateEmpty(const ASTContext &C, unsigned N,
3244 EmptyShell);
3245
3247 return T->getStmtClass() == OMPTargetDataDirectiveClass;
3248 }
3249};
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3263
3264
3265
3266
3267
3270 llvm::omp::OMPD_target_enter_data, StartLoc,
3271 EndLoc) {}
3272
3273
3274
3277 llvm::omp::OMPD_target_enter_data,
3279
3280public:
3281
3282
3283
3284
3285
3286
3287
3288
3289 static OMPTargetEnterDataDirective *
3290 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3291 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
3292
3293
3294
3295
3296
3297
3298 static OMPTargetEnterDataDirective *CreateEmpty(const ASTContext &C,
3299 unsigned N, EmptyShell);
3300
3302 return T->getStmtClass() == OMPTargetEnterDataDirectiveClass;
3303 }
3304};
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3318
3319
3320
3321
3322
3325 llvm::omp::OMPD_target_exit_data, StartLoc,
3326 EndLoc) {}
3327
3328
3329
3332 llvm::omp::OMPD_target_exit_data,
3334
3335public:
3336
3337
3338
3339
3340
3341
3342
3343
3344 static OMPTargetExitDataDirective *
3345 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3346 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
3347
3348
3349
3350
3351
3352
3353 static OMPTargetExitDataDirective *CreateEmpty(const ASTContext &C,
3354 unsigned N, EmptyShell);
3355
3357 return T->getStmtClass() == OMPTargetExitDataDirectiveClass;
3358 }
3359};
3360
3361
3362
3363
3364
3365
3366
3367
3368
3372
3373 bool HasCancel = false;
3374
3375
3376
3377
3378
3379
3382 llvm::omp::OMPD_target_parallel, StartLoc,
3383 EndLoc) {}
3384
3385
3386
3389 llvm::omp::OMPD_target_parallel,
3391
3392
3393 void setTaskReductionRefExpr(Expr *E) { Data->getChildren()[0] = E; }
3394
3395 void setHasCancel(bool Has) { HasCancel = Has; }
3396
3397public:
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409 static OMPTargetParallelDirective *
3410 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3411 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef,
3412 bool HasCancel);
3413
3414
3415
3416
3417
3418
3419
3420 static OMPTargetParallelDirective *
3421 CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell);
3422
3423
3426 }
3430 }
3431
3432
3434
3436 return T->getStmtClass() == OMPTargetParallelDirectiveClass;
3437 }
3438};
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3452
3453
3454 bool HasCancel = false;
3455
3456
3457
3458
3459
3460
3461
3463 unsigned CollapsedNum)
3465 llvm::omp::OMPD_target_parallel_for, StartLoc, EndLoc,
3466 CollapsedNum) {}
3467
3468
3469
3470
3471
3476
3477
3478 void setTaskReductionRefExpr(Expr *E) {
3480 getLoopsNumber(), llvm::omp::OMPD_target_parallel_for)] = E;
3481 }
3482
3483
3484 void setHasCancel(bool Has) { HasCancel = Has; }
3485
3486public:
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500 static OMPTargetParallelForDirective *
3501 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3502 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3503 Stmt *AssociatedStmt, const HelperExprs &Exprs, Expr *TaskRedRef,
3504 bool HasCancel);
3505
3506
3507
3508
3509
3510
3511
3512
3513 static OMPTargetParallelForDirective *CreateEmpty(const ASTContext &C,
3514 unsigned NumClauses,
3515 unsigned CollapsedNum,
3516 EmptyShell);
3517
3518
3521 getLoopsNumber(), llvm::omp::OMPD_target_parallel_for)]);
3522 }
3526 }
3527
3528
3530
3532 return T->getStmtClass() == OMPTargetParallelForDirectiveClass;
3533 }
3534};
3535
3536
3537
3538
3539
3540
3541
3542
3543
3547
3548
3549
3550
3551
3554 StartLoc, EndLoc) {}
3555
3556
3557
3561
3562public:
3563
3564
3565
3566
3567
3568
3569
3570
3571 static OMPTeamsDirective *Create(const ASTContext &C, SourceLocation StartLoc,
3572 SourceLocation EndLoc,
3573 ArrayRef<OMPClause *> Clauses,
3574 Stmt *AssociatedStmt);
3575
3576
3577
3578
3579
3580
3581
3582 static OMPTeamsDirective *CreateEmpty(const ASTContext &C,
3583 unsigned NumClauses, EmptyShell);
3584
3586 return T->getStmtClass() == OMPTeamsDirectiveClass;
3587 }
3588};
3589
3590
3591
3592
3593
3594
3595
3596
3601
3602
3603
3604
3605
3606
3609 llvm::omp::OMPD_cancellation_point, StartLoc,
3610 EndLoc) {}
3611
3612
3615 llvm::omp::OMPD_cancellation_point,
3617
3618
3619
3621
3622public:
3623
3624
3625
3626
3627
3628
3629 static OMPCancellationPointDirective *
3630 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3632
3633
3634
3635
3636
3637 static OMPCancellationPointDirective *CreateEmpty(const ASTContext &C,
3638 EmptyShell);
3639
3640
3642
3644 return T->getStmtClass() == OMPCancellationPointDirectiveClass;
3645 }
3646};
3647
3648
3649
3650
3651
3652
3653
3654
3659
3660
3661
3662
3663
3666 StartLoc, EndLoc) {}
3667
3668
3669
3673
3674
3675
3677
3678public:
3679
3680
3681
3682
3683
3684
3685
3686 static OMPCancelDirective *
3687 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3689
3690
3691
3692
3693
3694
3695 static OMPCancelDirective *CreateEmpty(const ASTContext &C,
3696 unsigned NumClauses, EmptyShell);
3697
3698
3700
3702 return T->getStmtClass() == OMPCancelDirectiveClass;
3703 }
3704};
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3718
3719 bool HasCancel = false;
3720
3721
3722
3723
3724
3725
3726
3728 unsigned CollapsedNum)
3730 StartLoc, EndLoc, CollapsedNum) {}
3731
3732
3733
3734
3735
3739
3740
3741 void setHasCancel(bool Has) { HasCancel = Has; }
3742
3743public:
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755 static OMPTaskLoopDirective *
3756 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3757 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3758 Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel);
3759
3760
3761
3762
3763
3764
3765
3766
3767 static OMPTaskLoopDirective *CreateEmpty(const ASTContext &C,
3768 unsigned NumClauses,
3769 unsigned CollapsedNum, EmptyShell);
3770
3771
3773
3775 return T->getStmtClass() == OMPTaskLoopDirectiveClass;
3776 }
3777};
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3791
3792
3793
3794
3795
3796
3798 unsigned CollapsedNum)
3800 llvm::omp::OMPD_taskloop_simd, StartLoc, EndLoc,
3801 CollapsedNum) {}
3802
3803
3804
3805
3806
3811
3812public:
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823 static OMPTaskLoopSimdDirective *
3824 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3825 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3826 Stmt *AssociatedStmt, const HelperExprs &Exprs);
3827
3828
3829
3830
3831
3832
3833
3834
3835 static OMPTaskLoopSimdDirective *CreateEmpty(const ASTContext &C,
3836 unsigned NumClauses,
3837 unsigned CollapsedNum,
3838 EmptyShell);
3839
3841 return T->getStmtClass() == OMPTaskLoopSimdDirectiveClass;
3842 }
3843};
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3857
3858 bool HasCancel = false;
3859
3860
3861
3862
3863
3864
3865
3867 unsigned CollapsedNum)
3869 llvm::omp::OMPD_master_taskloop, StartLoc, EndLoc,
3870 CollapsedNum) {}
3871
3872
3873
3874
3875
3880
3881
3882 void setHasCancel(bool Has) { HasCancel = Has; }
3883
3884public:
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896 static OMPMasterTaskLoopDirective *
3897 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3898 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3899 Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel);
3900
3901
3902
3903
3904
3905
3906
3907
3908 static OMPMasterTaskLoopDirective *CreateEmpty(const ASTContext &C,
3909 unsigned NumClauses,
3910 unsigned CollapsedNum,
3911 EmptyShell);
3912
3913
3915
3917 return T->getStmtClass() == OMPMasterTaskLoopDirectiveClass;
3918 }
3919};
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3933
3934 bool HasCancel = false;
3935
3936
3937
3938
3939
3940
3941
3943 unsigned CollapsedNum)
3945 llvm::omp::OMPD_masked_taskloop, StartLoc, EndLoc,
3946 CollapsedNum) {}
3947
3948
3949
3950
3951
3956
3957
3958 void setHasCancel(bool Has) { HasCancel = Has; }
3959
3960public:
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972 static OMPMaskedTaskLoopDirective *
3973 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
3974 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3975 Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel);
3976
3977
3978
3979
3980
3981
3982
3983
3984 static OMPMaskedTaskLoopDirective *CreateEmpty(const ASTContext &C,
3985 unsigned NumClauses,
3986 unsigned CollapsedNum,
3987 EmptyShell);
3988
3989
3991
3993 return T->getStmtClass() == OMPMaskedTaskLoopDirectiveClass;
3994 }
3995};
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4009
4010
4011
4012
4013
4014
4016 unsigned CollapsedNum)
4018 llvm::omp::OMPD_master_taskloop_simd, StartLoc, EndLoc,
4019 CollapsedNum) {}
4020
4021
4022
4023
4024
4029
4030public:
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041 static OMPMasterTaskLoopSimdDirective *
4042 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
4043 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
4044 Stmt *AssociatedStmt, const HelperExprs &Exprs);
4045
4046
4047
4048
4049
4050
4051
4052 static OMPMasterTaskLoopSimdDirective *CreateEmpty(const ASTContext &C,
4053 unsigned NumClauses,
4054 unsigned CollapsedNum,
4055 EmptyShell);
4056
4058 return T->getStmtClass() == OMPMasterTaskLoopSimdDirectiveClass;
4059 }
4060};
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4074
4075
4076
4077
4078
4079
4081 unsigned CollapsedNum)
4083 llvm::omp::OMPD_masked_taskloop_simd, StartLoc, EndLoc,
4084 CollapsedNum) {}
4085
4086
4087
4088
4089
4094
4095public:
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106 static OMPMaskedTaskLoopSimdDirective *
4107 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
4108 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
4109 Stmt *AssociatedStmt, const HelperExprs &Exprs);
4110
4111
4112
4113
4114
4115
4116
4117 static OMPMaskedTaskLoopSimdDirective *CreateEmpty(const ASTContext &C,
4118 unsigned NumClauses,
4119 unsigned CollapsedNum,
4120 EmptyShell);
4121
4123 return T->getStmtClass() == OMPMaskedTaskLoopSimdDirectiveClass;
4124 }
4125};
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4140
4141 bool HasCancel = false;
4142
4143
4144
4145
4146
4147
4148
4151 unsigned CollapsedNum)
4153 llvm::omp::OMPD_parallel_master_taskloop, StartLoc,
4154 EndLoc, CollapsedNum) {}
4155
4156
4157
4158
4159
4162 llvm::omp::OMPD_parallel_master_taskloop,
4164
4165
4166 void setHasCancel(bool Has) { HasCancel = Has; }
4167
4168public:
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180 static OMPParallelMasterTaskLoopDirective *
4181 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
4182 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
4183 Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel);
4184
4185
4186
4187
4188
4189
4190
4191
4192 static OMPParallelMasterTaskLoopDirective *CreateEmpty(const ASTContext &C,
4193 unsigned NumClauses,
4194 unsigned CollapsedNum,
4195 EmptyShell);
4196
4197
4199
4201 return T->getStmtClass() == OMPParallelMasterTaskLoopDirectiveClass;
4202 }
4203};
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4218
4219 bool HasCancel = false;
4220
4221
4222
4223
4224
4225
4226
4229 unsigned CollapsedNum)
4231 llvm::omp::OMPD_parallel_masked_taskloop, StartLoc,
4232 EndLoc, CollapsedNum) {}
4233
4234
4235
4236
4237
4240 llvm::omp::OMPD_parallel_masked_taskloop,
4242
4243
4244 void setHasCancel(bool Has) { HasCancel = Has; }
4245
4246public:
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258 static OMPParallelMaskedTaskLoopDirective *
4259 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
4260 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
4261 Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel);
4262
4263
4264
4265
4266
4267
4268
4269
4270 static OMPParallelMaskedTaskLoopDirective *CreateEmpty(const ASTContext &C,
4271 unsigned NumClauses,
4272 unsigned CollapsedNum,
4273 EmptyShell);
4274
4275
4277
4279 return T->getStmtClass() == OMPParallelMaskedTaskLoopDirectiveClass;
4280 }
4281};
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4296
4297
4298
4299
4300
4301
4304 unsigned CollapsedNum)
4305 : OMPLoopDirective(OMPParallelMasterTaskLoopSimdDirectiveClass,
4306 llvm::omp::OMPD_parallel_master_taskloop_simd,
4307 StartLoc, EndLoc, CollapsedNum) {}
4308
4309
4310
4311
4312
4314 : OMPLoopDirective(OMPParallelMasterTaskLoopSimdDirectiveClass,
4315 llvm::omp::OMPD_parallel_master_taskloop_simd,
4317
4318public:
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329 static OMPParallelMasterTaskLoopSimdDirective *
4330 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
4331 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
4332 Stmt *AssociatedStmt, const HelperExprs &Exprs);
4333
4334
4335
4336
4337
4338
4339
4340
4341 static OMPParallelMasterTaskLoopSimdDirective *
4342 CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum,
4343 EmptyShell);
4344
4346 return T->getStmtClass() == OMPParallelMasterTaskLoopSimdDirectiveClass;
4347 }
4348};
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4363
4364
4365
4366
4367
4368
4371 unsigned CollapsedNum)
4372 : OMPLoopDirective(OMPParallelMaskedTaskLoopSimdDirectiveClass,
4373 llvm::omp::OMPD_parallel_masked_taskloop_simd,
4374 StartLoc, EndLoc, CollapsedNum) {}
4375
4376
4377
4378
4379
4381 : OMPLoopDirective(OMPParallelMaskedTaskLoopSimdDirectiveClass,
4382 llvm::omp::OMPD_parallel_masked_taskloop_simd,
4384
4385public:
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396 static OMPParallelMaskedTaskLoopSimdDirective *
4397 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
4398 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
4399 Stmt *AssociatedStmt, const HelperExprs &Exprs);
4400
4401
4402
4403
4404
4405
4406
4407
4408 static OMPParallelMaskedTaskLoopSimdDirective *
4409 CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum,
4410 EmptyShell);
4411
4413 return T->getStmtClass() == OMPParallelMaskedTaskLoopSimdDirectiveClass;
4414 }
4415};
4416
4417
4418
4419
4420
4421
4422
4423
4424
4428
4429
4430
4431
4432
4433
4434
4436 unsigned CollapsedNum)
4438 llvm::omp::OMPD_distribute, StartLoc, EndLoc,
4439 CollapsedNum) {}
4440
4441
4442
4443
4444
4449
4450public:
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461 static OMPDistributeDirective *
4462 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
4463 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
4464 Stmt *AssociatedStmt, const HelperExprs &Exprs);
4465
4466
4467
4468
4469
4470
4471
4472
4473 static OMPDistributeDirective *CreateEmpty(const ASTContext &C,
4474 unsigned NumClauses,
4475 unsigned CollapsedNum, EmptyShell);
4476
4478 return T->getStmtClass() == OMPDistributeDirectiveClass;
4479 }
4480};
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4494
4495
4496
4497
4498
4501 llvm::omp::OMPD_target_update, StartLoc,
4502 EndLoc) {}
4503
4504
4505
4510
4511public:
4512
4513
4514
4515
4516
4517
4518
4519
4520 static OMPTargetUpdateDirective *
4521 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
4522 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
4523
4524
4525
4526
4527
4528
4529
4530 static OMPTargetUpdateDirective *CreateEmpty(const ASTContext &C,
4531 unsigned NumClauses, EmptyShell);
4532
4534 return T->getStmtClass() == OMPTargetUpdateDirectiveClass;
4535 }
4536};
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4550
4551 bool HasCancel = false;
4552
4553
4554
4555
4556
4557
4558
4561 unsigned CollapsedNum)
4563 llvm::omp::OMPD_distribute_parallel_for, StartLoc,
4564 EndLoc, CollapsedNum) {}
4565
4566
4567
4568
4569
4572 llvm::omp::OMPD_distribute_parallel_for,
4574
4575
4576 void setTaskReductionRefExpr(Expr *E) {
4578 getLoopsNumber(), llvm::omp::OMPD_distribute_parallel_for)] = E;
4579 }
4580
4581
4582 void setHasCancel(bool Has) { HasCancel = Has; }
4583
4584public:
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598 static OMPDistributeParallelForDirective *
4599 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
4600 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
4601 Stmt *AssociatedStmt, const HelperExprs &Exprs, Expr *TaskRedRef,
4602 bool HasCancel);
4603
4604
4605
4606
4607
4608
4609
4610
4611 static OMPDistributeParallelForDirective *CreateEmpty(const ASTContext &C,
4612 unsigned NumClauses,
4613 unsigned CollapsedNum,
4614 EmptyShell);
4615
4616
4619 getLoopsNumber(), llvm::omp::OMPD_distribute_parallel_for)]);
4620 }
4624 }
4625
4626
4628
4630 return T->getStmtClass() == OMPDistributeParallelForDirectiveClass;
4631 }
4632};
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4646
4647
4648
4649
4650
4651
4652
4655 unsigned CollapsedNum)
4656 : OMPLoopDirective(OMPDistributeParallelForSimdDirectiveClass,
4657 llvm::omp::OMPD_distribute_parallel_for_simd, StartLoc,
4658 EndLoc, CollapsedNum) {}
4659
4660
4661
4662
4663
4665 : OMPLoopDirective(OMPDistributeParallelForSimdDirectiveClass,
4666 llvm::omp::OMPD_distribute_parallel_for_simd,
4668
4669public:
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680 static OMPDistributeParallelForSimdDirective *Create(
4681 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
4682 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
4683 Stmt *AssociatedStmt, const HelperExprs &Exprs);
4684
4685
4686
4687
4688
4689
4690
4691 static OMPDistributeParallelForSimdDirective *CreateEmpty(
4692 const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum,
4693 EmptyShell);
4694
4696 return T->getStmtClass() == OMPDistributeParallelForSimdDirectiveClass;
4697 }
4698};
4699
4700
4701
4702
4703
4704
4705
4706
4707
4711
4712
4713
4714
4715
4716
4717
4719 unsigned CollapsedNum)
4721 llvm::omp::OMPD_distribute_simd, StartLoc, EndLoc,
4722 CollapsedNum) {}
4723
4724
4725
4726
4727
4732
4733public:
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744 static OMPDistributeSimdDirective *
4745 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
4746 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
4747 Stmt *AssociatedStmt, const HelperExprs &Exprs);
4748
4749
4750
4751
4752
4753
4754
4755 static OMPDistributeSimdDirective *CreateEmpty(const ASTContext &C,
4756 unsigned NumClauses,
4757 unsigned CollapsedNum,
4758 EmptyShell);
4759
4761 return T->getStmtClass() == OMPDistributeSimdDirectiveClass;
4762 }
4763};
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4777
4778
4779
4780
4781
4782
4783
4786 unsigned CollapsedNum)
4788 llvm::omp::OMPD_target_parallel_for_simd, StartLoc,
4789 EndLoc, CollapsedNum) {}
4790
4791
4792
4793
4794
4797 llvm::omp::OMPD_target_parallel_for_simd,
4799
4800public:
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811 static OMPTargetParallelForSimdDirective *
4812 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
4813 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
4814 Stmt *AssociatedStmt, const HelperExprs &Exprs);
4815
4816
4817
4818
4819
4820
4821
4822 static OMPTargetParallelForSimdDirective *CreateEmpty(const ASTContext &C,
4823 unsigned NumClauses,
4824 unsigned CollapsedNum,
4825 EmptyShell);
4826
4828 return T->getStmtClass() == OMPTargetParallelForSimdDirectiveClass;
4829 }
4830};
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4844
4845
4846
4847
4848
4849
4850
4852 unsigned CollapsedNum)
4854 llvm::omp::OMPD_target_simd, StartLoc, EndLoc,
4855 CollapsedNum) {}
4856
4857
4858
4859
4860
4865
4866public:
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877 static OMPTargetSimdDirective *
4878 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
4879 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
4880 Stmt *AssociatedStmt, const HelperExprs &Exprs);
4881
4882
4883
4884
4885
4886
4887
4888 static OMPTargetSimdDirective *CreateEmpty(const ASTContext &C,
4889 unsigned NumClauses,
4890 unsigned CollapsedNum,
4891 EmptyShell);
4892
4894 return T->getStmtClass() == OMPTargetSimdDirectiveClass;
4895 }
4896};
4897
4898
4899
4900
4901
4902
4903
4904
4905
4909
4910
4911
4912
4913
4914
4915
4917 unsigned CollapsedNum)
4919 llvm::omp::OMPD_teams_distribute, StartLoc, EndLoc,
4920 CollapsedNum) {}
4921
4922
4923
4924
4925
4930
4931public:
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942 static OMPTeamsDistributeDirective *
4943 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
4944 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
4945 Stmt *AssociatedStmt, const HelperExprs &Exprs);
4946
4947
4948
4949
4950
4951
4952
4953 static OMPTeamsDistributeDirective *CreateEmpty(const ASTContext &C,
4954 unsigned NumClauses,
4955 unsigned CollapsedNum,
4956 EmptyShell);
4957
4959 return T->getStmtClass() == OMPTeamsDistributeDirectiveClass;
4960 }
4961};
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4975
4976
4977
4978
4979
4980
4981
4985 llvm::omp::OMPD_teams_distribute_simd, StartLoc,
4986 EndLoc, CollapsedNum) {}
4987
4988
4989
4990
4991
4994 llvm::omp::OMPD_teams_distribute_simd,
4996
4997public:
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008 static OMPTeamsDistributeSimdDirective *
5009 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
5010 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
5011 Stmt *AssociatedStmt, const HelperExprs &Exprs);
5012
5013
5014
5015
5016
5017
5018
5019
5020 static OMPTeamsDistributeSimdDirective *CreateEmpty(const ASTContext &C,
5021 unsigned NumClauses,
5022 unsigned CollapsedNum,
5023 EmptyShell);
5024
5026 return T->getStmtClass() == OMPTeamsDistributeSimdDirectiveClass;
5027 }
5028};
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5043
5044
5045
5046
5047
5048
5049
5052 unsigned CollapsedNum)
5053 : OMPLoopDirective(OMPTeamsDistributeParallelForSimdDirectiveClass,
5054 llvm::omp::OMPD_teams_distribute_parallel_for_simd,
5055 StartLoc, EndLoc, CollapsedNum) {}
5056
5057
5058
5059
5060
5062 : OMPLoopDirective(OMPTeamsDistributeParallelForSimdDirectiveClass,
5063 llvm::omp::OMPD_teams_distribute_parallel_for_simd,
5065
5066public:
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077 static OMPTeamsDistributeParallelForSimdDirective *
5078 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
5079 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
5080 Stmt *AssociatedStmt, const HelperExprs &Exprs);
5081
5082
5083
5084
5085
5086
5087
5088 static OMPTeamsDistributeParallelForSimdDirective *
5089 CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum,
5090 EmptyShell);
5091
5093 return T->getStmtClass() == OMPTeamsDistributeParallelForSimdDirectiveClass;
5094 }
5095};
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5109
5110 bool HasCancel = false;
5111
5112
5113
5114
5115
5116
5117
5120 unsigned CollapsedNum)
5121 : OMPLoopDirective(OMPTeamsDistributeParallelForDirectiveClass,
5122 llvm::omp::OMPD_teams_distribute_parallel_for,
5123 StartLoc, EndLoc, CollapsedNum) {}
5124
5125
5126
5127
5128
5130 : OMPLoopDirective(OMPTeamsDistributeParallelForDirectiveClass,
5131 llvm::omp::OMPD_teams_distribute_parallel_for,
5133
5134
5135 void setTaskReductionRefExpr(Expr *E) {
5137 getLoopsNumber(), llvm::omp::OMPD_teams_distribute_parallel_for)] = E;
5138 }
5139
5140
5141 void setHasCancel(bool Has) { HasCancel = Has; }
5142
5143public:
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157 static OMPTeamsDistributeParallelForDirective *
5158 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
5159 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
5160 Stmt *AssociatedStmt, const HelperExprs &Exprs, Expr *TaskRedRef,
5161 bool HasCancel);
5162
5163
5164
5165
5166
5167
5168
5169 static OMPTeamsDistributeParallelForDirective *
5170 CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum,
5171 EmptyShell);
5172
5173
5176 getLoopsNumber(), llvm::omp::OMPD_teams_distribute_parallel_for)]);
5177 }
5181 }
5182
5183
5185
5187 return T->getStmtClass() == OMPTeamsDistributeParallelForDirectiveClass;
5188 }
5189};
5190
5191
5192
5193
5194
5195
5196
5197
5198
5202
5203
5204
5205
5206
5209 llvm::omp::OMPD_target_teams, StartLoc, EndLoc) {
5210 }
5211
5212
5213
5218
5219public:
5220
5221
5222
5223
5224
5225
5226
5227
5228 static OMPTargetTeamsDirective *Create(const ASTContext &C,
5229 SourceLocation StartLoc,
5230 SourceLocation EndLoc,
5231 ArrayRef<OMPClause *> Clauses,
5232 Stmt *AssociatedStmt);
5233
5234
5235
5236
5237
5238
5239 static OMPTargetTeamsDirective *CreateEmpty(const ASTContext &C,
5240 unsigned NumClauses, EmptyShell);
5241
5243 return T->getStmtClass() == OMPTargetTeamsDirectiveClass;
5244 }
5245};
5246
5247
5248
5249
5250
5251
5252
5253
5254
5258
5259
5260
5261
5262
5263
5264
5267 unsigned CollapsedNum)
5269 llvm::omp::OMPD_target_teams_distribute, StartLoc,
5270 EndLoc, CollapsedNum) {}
5271
5272
5273
5274
5275
5278 llvm::omp::OMPD_target_teams_distribute,
5280
5281public:
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292 static OMPTargetTeamsDistributeDirective *
5293 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
5294 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
5295 Stmt *AssociatedStmt, const HelperExprs &Exprs);
5296
5297
5298
5299
5300
5301
5302
5303 static OMPTargetTeamsDistributeDirective *
5304 CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum,
5305 EmptyShell);
5306
5308 return T->getStmtClass() == OMPTargetTeamsDistributeDirectiveClass;
5309 }
5310};
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5325
5326 bool HasCancel = false;
5327
5328
5329
5330
5331
5332
5333
5336 unsigned CollapsedNum)
5337 : OMPLoopDirective(OMPTargetTeamsDistributeParallelForDirectiveClass,
5338 llvm::omp::OMPD_target_teams_distribute_parallel_for,
5339 StartLoc, EndLoc, CollapsedNum) {}
5340
5341
5342
5343
5344
5346 : OMPLoopDirective(OMPTargetTeamsDistributeParallelForDirectiveClass,
5347 llvm::omp::OMPD_target_teams_distribute_parallel_for,
5349
5350
5351 void setTaskReductionRefExpr(Expr *E) {
5354 llvm::omp::OMPD_target_teams_distribute_parallel_for)] = E;
5355 }
5356
5357
5358 void setHasCancel(bool Has) { HasCancel = Has; }
5359
5360public:
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374 static OMPTargetTeamsDistributeParallelForDirective *
5375 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
5376 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
5377 Stmt *AssociatedStmt, const HelperExprs &Exprs, Expr *TaskRedRef,
5378 bool HasCancel);
5379
5380
5381
5382
5383
5384
5385
5386 static OMPTargetTeamsDistributeParallelForDirective *
5387 CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum,
5388 EmptyShell);
5389
5390
5394 llvm::omp::OMPD_target_teams_distribute_parallel_for)]);
5395 }
5399 }
5400
5401
5403
5405 return T->getStmtClass() ==
5406 OMPTargetTeamsDistributeParallelForDirectiveClass;
5407 }
5408};
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5423
5424
5425
5426
5427
5428
5429
5432 unsigned CollapsedNum)
5434 OMPTargetTeamsDistributeParallelForSimdDirectiveClass,
5435 llvm::omp::OMPD_target_teams_distribute_parallel_for_simd, StartLoc,
5436 EndLoc, CollapsedNum) {}
5437
5438
5439
5440
5441
5443 unsigned CollapsedNum)
5445 OMPTargetTeamsDistributeParallelForSimdDirectiveClass,
5446 llvm::omp::OMPD_target_teams_distribute_parallel_for_simd,
5448
5449public:
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460 static OMPTargetTeamsDistributeParallelForSimdDirective *
5461 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
5462 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
5463 Stmt *AssociatedStmt, const HelperExprs &Exprs);
5464
5465
5466
5467
5468
5469
5470
5471 static OMPTargetTeamsDistributeParallelForSimdDirective *
5472 CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum,
5473 EmptyShell);
5474
5476 return T->getStmtClass() ==
5477 OMPTargetTeamsDistributeParallelForSimdDirectiveClass;
5478 }
5479};
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5493
5494
5495
5496
5497
5498
5499
5502 unsigned CollapsedNum)
5503 : OMPLoopDirective(OMPTargetTeamsDistributeSimdDirectiveClass,
5504 llvm::omp::OMPD_target_teams_distribute_simd, StartLoc,
5505 EndLoc, CollapsedNum) {}
5506
5507
5508
5509
5510
5512 : OMPLoopDirective(OMPTargetTeamsDistributeSimdDirectiveClass,
5513 llvm::omp::OMPD_target_teams_distribute_simd,
5515
5516public:
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527 static OMPTargetTeamsDistributeSimdDirective *
5528 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
5529 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
5530 Stmt *AssociatedStmt, const HelperExprs &Exprs);
5531
5532
5533
5534
5535
5536
5537
5538 static OMPTargetTeamsDistributeSimdDirective *
5539 CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum,
5540 EmptyShell);
5541
5543 return T->getStmtClass() == OMPTargetTeamsDistributeSimdDirectiveClass;
5544 }
5545};
5546
5547
5551
5552
5553 enum {
5554 PreInitsOffset = 0,
5555 TransformedStmtOffset,
5556 };
5557
5559 unsigned NumLoops)
5561 llvm::omp::OMPD_tile, StartLoc, EndLoc,
5562 NumLoops) {
5564 }
5565
5566 void setPreInits(Stmt *PreInits) {
5567 Data->getChildren()[PreInitsOffset] = PreInits;
5568 }
5569
5570 void setTransformedStmt(Stmt *S) {
5571 Data->getChildren()[TransformedStmtOffset] = S;
5572 }
5573
5574public:
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587 static OMPTileDirective *Create(const ASTContext &C, SourceLocation StartLoc,
5588 SourceLocation EndLoc,
5589 ArrayRef<OMPClause *> Clauses,
5590 unsigned NumLoops, Stmt *AssociatedStmt,
5591 Stmt *TransformedStmt, Stmt *PreInits);
5592
5593
5594
5595
5596
5597
5598 static OMPTileDirective *CreateEmpty(const ASTContext &C, unsigned NumClauses,
5599 unsigned NumLoops);
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5613 return Data->getChildren()[TransformedStmtOffset];
5614 }
5615
5616
5618
5620 return T->getStmtClass() == OMPTileDirectiveClass;
5621 }
5622};
5623
5624
5625
5626
5627
5628
5629
5633
5634
5635 enum {
5636 PreInitsOffset = 0,
5637 TransformedStmtOffset,
5638 };
5639
5642 llvm::omp::OMPD_unroll, StartLoc, EndLoc,
5643 1) {}
5644
5645
5646 void setPreInits(Stmt *PreInits) {
5647 Data->getChildren()[PreInitsOffset] = PreInits;
5648 }
5649
5650
5651 void setTransformedStmt(Stmt *S) {
5652 Data->getChildren()[TransformedStmtOffset] = S;
5653 }
5654
5655public:
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666 static OMPUnrollDirective *
5667 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
5668 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
5669 unsigned NumGeneratedLoops, Stmt *TransformedStmt, Stmt *PreInits);
5670
5671
5672
5673
5674
5675 static OMPUnrollDirective *CreateEmpty(const ASTContext &C,
5676 unsigned NumClauses);
5677
5678
5679
5680
5681
5682
5683
5684
5686 return Data->getChildren()[TransformedStmtOffset];
5687 }
5688
5689
5691
5693 return T->getStmtClass() == OMPUnrollDirectiveClass;
5694 }
5695};
5696
5697
5698
5699
5700
5701
5702
5703
5707
5708
5709 enum {
5710 PreInitsOffset = 0,
5711 TransformedStmtOffset,
5712 };
5713
5716 llvm::omp::OMPD_reverse, StartLoc,
5717 EndLoc, 1) {}
5718
5719 void setPreInits(Stmt *PreInits) {
5720 Data->getChildren()[PreInitsOffset] = PreInits;
5721 }
5722
5723 void setTransformedStmt(Stmt *S) {
5724 Data->getChildren()[TransformedStmtOffset] = S;
5725 }
5726
5727public:
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737 static OMPReverseDirective *
5738 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
5739 Stmt *AssociatedStmt, Stmt *TransformedStmt, Stmt *PreInits);
5740
5741
5742
5743
5744
5745 static OMPReverseDirective *CreateEmpty(const ASTContext &C);
5746
5747
5748
5750 return Data->getChildren()[TransformedStmtOffset];
5751 }
5752
5753
5755
5757 return T->getStmtClass() == OMPReverseDirectiveClass;
5758 }
5759};
5760
5761
5762
5763
5764
5765
5766
5767
5768
5772
5773
5774 enum {
5775 PreInitsOffset = 0,
5776 TransformedStmtOffset,
5777 };
5778
5782 llvm::omp::OMPD_interchange, StartLoc,
5783 EndLoc, NumLoops) {
5785 }
5786
5787 void setPreInits(Stmt *PreInits) {
5788 Data->getChildren()[PreInitsOffset] = PreInits;
5789 }
5790
5791 void setTransformedStmt(Stmt *S) {
5792 Data->getChildren()[TransformedStmtOffset] = S;
5793 }
5794
5795public:
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808 static OMPInterchangeDirective *
5809 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
5810 ArrayRef<OMPClause *> Clauses, unsigned NumLoops, Stmt *AssociatedStmt,
5811 Stmt *TransformedStmt, Stmt *PreInits);
5812
5813
5814
5815
5816
5817
5818 static OMPInterchangeDirective *
5819 CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned NumLoops);
5820
5821
5822
5824 return Data->getChildren()[TransformedStmtOffset];
5825 }
5826
5827
5829
5831 return T->getStmtClass() == OMPInterchangeDirectiveClass;
5832 }
5833};
5834
5835
5836
5837
5838
5839
5840
5841
5845
5846
5847
5848
5849
5852 StartLoc, EndLoc) {}
5853
5854
5855
5859
5860public:
5861
5862
5863
5864
5865
5866
5867
5868
5869 static OMPScanDirective *Create(const ASTContext &C, SourceLocation StartLoc,
5870 SourceLocation EndLoc,
5871 ArrayRef<OMPClause *> Clauses);
5872
5873
5874
5875
5876
5877
5878
5879 static OMPScanDirective *CreateEmpty(const ASTContext &C, unsigned NumClauses,
5880 EmptyShell);
5881
5883 return T->getStmtClass() == OMPScanDirectiveClass;
5884 }
5885};
5886
5887
5888
5889
5890
5891
5892
5893
5894
5898
5899
5900
5901
5902
5903
5906 llvm::omp::OMPD_interop, StartLoc, EndLoc) {}
5907
5908
5909
5914
5915public:
5916
5917
5918
5919
5920
5921
5922
5923 static OMPInteropDirective *Create(const ASTContext &C,
5924 SourceLocation StartLoc,
5925 SourceLocation EndLoc,
5926 ArrayRef<OMPClause *> Clauses);
5927
5928
5929
5930
5931
5932 static OMPInteropDirective *CreateEmpty(const ASTContext &C,
5933 unsigned NumClauses, EmptyShell);
5934
5936 return T->getStmtClass() == OMPInteropDirectiveClass;
5937 }
5938};
5939
5940
5941
5942
5943
5944
5945
5946
5947
5951
5952
5954
5955
5957
5958
5959
5960
5961
5962
5965 llvm::omp::OMPD_dispatch, StartLoc, EndLoc) {}
5966
5967
5968
5969 explicit OMPDispatchDirective()
5971 llvm::omp::OMPD_dispatch, SourceLocation(),
5972 SourceLocation()) {}
5973
5974public:
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984 static OMPDispatchDirective *
5985 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
5986 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
5987 SourceLocation TargetCallLoc);
5988
5989
5990
5991
5992
5993
5994
5995 static OMPDispatchDirective *CreateEmpty(const ASTContext &C,
5996 unsigned NumClauses, EmptyShell);
5997
5998
6000
6002 return T->getStmtClass() == OMPDispatchDirectiveClass;
6003 }
6004};
6005
6006
6007
6008
6009
6010
6011
6012
6016
6017
6018
6019
6020
6021
6024 StartLoc, EndLoc) {}
6025
6026
6027
6031
6032public:
6033
6034
6035
6036
6037
6038
6039
6040 static OMPMaskedDirective *
6041 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
6042 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt);
6043
6044
6045
6046
6047
6048 static OMPMaskedDirective *CreateEmpty(const ASTContext &C,
6049 unsigned NumClauses, EmptyShell);
6050
6052 return T->getStmtClass() == OMPMaskedDirectiveClass;
6053 }
6054};
6055
6056
6057
6058
6059
6060
6061
6062
6063
6068
6071 llvm::omp::OMPD_metadirective, StartLoc,
6072 EndLoc) {}
6077
6078 void setIfStmt(Stmt *S) { IfStmt = S; }
6079
6080public:
6081 static OMPMetaDirective *Create(const ASTContext &C, SourceLocation StartLoc,
6082 SourceLocation EndLoc,
6083 ArrayRef<OMPClause *> Clauses,
6084 Stmt *AssociatedStmt, Stmt *IfStmt);
6085 static OMPMetaDirective *CreateEmpty(const ASTContext &C, unsigned NumClauses,
6086 EmptyShell);
6088
6090 return T->getStmtClass() == OMPMetaDirectiveClass;
6091 }
6092};
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6106
6107
6108
6109
6110
6111
6113 unsigned CollapsedNum)
6115 StartLoc, EndLoc, CollapsedNum) {}
6116
6117
6118
6119
6120
6124
6125public:
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136 static OMPGenericLoopDirective *
6137 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
6138 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
6139 Stmt *AssociatedStmt, const HelperExprs &Exprs);
6140
6141
6142
6143
6144
6145
6146
6147 static OMPGenericLoopDirective *CreateEmpty(const ASTContext &C,
6148 unsigned NumClauses,
6149 unsigned CollapsedNum,
6150 EmptyShell);
6151
6153 return T->getStmtClass() == OMPGenericLoopDirectiveClass;
6154 }
6155};
6156
6157
6158
6159
6160
6161
6162
6163
6164
6168
6169
6170
6171
6172
6173
6175 unsigned CollapsedNum)
6177 llvm::omp::OMPD_teams_loop, StartLoc, EndLoc,
6178 CollapsedNum) {}
6179
6180
6181
6182
6183
6188
6189public:
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200 static OMPTeamsGenericLoopDirective *
6201 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
6202 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
6203 Stmt *AssociatedStmt, const HelperExprs &Exprs);
6204
6205
6206
6207
6208
6209
6210
6211
6212 static OMPTeamsGenericLoopDirective *CreateEmpty(const ASTContext &C,
6213 unsigned NumClauses,
6214 unsigned CollapsedNum,
6215 EmptyShell);
6216
6218 return T->getStmtClass() == OMPTeamsGenericLoopDirectiveClass;
6219 }
6220};
6221
6222
6223
6224
6225
6226
6227
6228
6229
6233
6234 bool CanBeParallelFor = false;
6235
6236
6237
6238
6239
6240
6243 unsigned CollapsedNum)
6245 llvm::omp::OMPD_target_teams_loop, StartLoc, EndLoc,
6246 CollapsedNum) {}
6247
6248
6249
6250
6251
6256
6257
6258 void setCanBeParallelFor(bool ParFor) { CanBeParallelFor = ParFor; }
6259
6260public:
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271 static OMPTargetTeamsGenericLoopDirective *
6272 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
6273 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
6274 Stmt *AssociatedStmt, const HelperExprs &Exprs, bool CanBeParallelFor);
6275
6276
6277
6278
6279
6280
6281
6282
6283 static OMPTargetTeamsGenericLoopDirective *CreateEmpty(const ASTContext &C,
6284 unsigned NumClauses,
6285 unsigned CollapsedNum,
6286 EmptyShell);
6287
6288
6289
6291
6293 return T->getStmtClass() == OMPTargetTeamsGenericLoopDirectiveClass;
6294 }
6295};
6296
6297
6298
6299
6300
6301
6302
6303
6304
6308
6309
6310
6311
6312
6313
6317 llvm::omp::OMPD_parallel_loop, StartLoc, EndLoc,
6318 CollapsedNum) {}
6319
6320
6321
6322
6323
6328
6329public:
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340 static OMPParallelGenericLoopDirective *
6341 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
6342 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
6343 Stmt *AssociatedStmt, const HelperExprs &Exprs);
6344
6345
6346
6347
6348
6349
6350
6351
6352 static OMPParallelGenericLoopDirective *CreateEmpty(const ASTContext &C,
6353 unsigned NumClauses,
6354 unsigned CollapsedNum,
6355 EmptyShell);
6356
6358 return T->getStmtClass() == OMPParallelGenericLoopDirectiveClass;
6359 }
6360};
6361
6362
6363
6364
6365
6366
6367
6368
6369
6373
6374
6375
6376
6377
6378
6381 unsigned CollapsedNum)
6382 : OMPLoopDirective(OMPTargetParallelGenericLoopDirectiveClass,
6383 llvm::omp::OMPD_target_parallel_loop, StartLoc, EndLoc,
6384 CollapsedNum) {}
6385
6386
6387
6388
6389
6391 : OMPLoopDirective(OMPTargetParallelGenericLoopDirectiveClass,
6394
6395public:
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406 static OMPTargetParallelGenericLoopDirective *
6407 Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
6408 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
6409 Stmt *AssociatedStmt, const HelperExprs &Exprs);
6410
6411
6412
6413
6414
6415
6416
6417
6418 static OMPTargetParallelGenericLoopDirective *
6419 CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum,
6420 EmptyShell);
6421
6423 return T->getStmtClass() == OMPTargetParallelGenericLoopDirectiveClass;
6424 }
6425};
6426
6427
6428
6429
6430
6431
6435
6436
6437
6438
6439
6442 StartLoc, EndLoc) {}
6443
6444
6448
6449public:
6450
6451
6452
6453
6454
6455
6456 static OMPErrorDirective *Create(const ASTContext &C, SourceLocation StartLoc,
6457 SourceLocation EndLoc,
6458 ArrayRef<OMPClause *> Clauses);
6459
6460
6461
6462
6463
6464 static OMPErrorDirective *CreateEmpty(const ASTContext &C,
6465 unsigned NumClauses, EmptyShell);
6466
6468 return T->getStmtClass() == OMPErrorDirectiveClass;
6469 }
6470};
6471
6472
6473
6477
6478private:
6481 StartLoc, EndLoc) {}
6482
6486
6487public:
6488 static OMPAssumeDirective *Create(const ASTContext &Ctx,
6489 SourceLocation StartLoc,
6490 SourceLocation EndLoc,
6491 ArrayRef<OMPClause *> Clauses, Stmt *AStmt);
6492
6493 static OMPAssumeDirective *CreateEmpty(const ASTContext &C,
6494 unsigned NumClauses, EmptyShell);
6495
6497 return T->getStmtClass() == OMPAssumeDirectiveClass;
6498 }
6499};
6500
6501}
6502
6503#endif
Defines the clang::ASTContext interface.
enum clang::sema::@1725::IndirectLocalPathEntry::EntryKind Kind
This file defines OpenMP AST classes for clauses.
Defines some OpenMP-specific enums and functions.
Defines the clang::SourceLocation class and associated facilities.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
This captures a statement into a function.
A reference to a declared variable, function, enum, etc.
This represents one expression.
IfStmt - This represents an if/then/else.
static OMPAssumeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
static bool classof(const Stmt *T)
This represents '#pragma omp atomic' directive.
const Expr * getR() const
static bool classof(const Stmt *T)
bool isXLHSInRHSPart() const
Return true if helper update expression has form 'OpaqueValueExpr(x) binop OpaqueValueExpr(expr)' and...
bool isFailOnly() const
Return true if 'v' is updated only when the condition is evaluated false (compare capture only).
Expr * getD()
Get 'd' part of the associated expression/statement.
Expr * getCondExpr() const
Expr * getExpr()
Get 'expr' part of the associated expression/statement.
Expr * getX()
Get 'x' part of the associated expression/statement.
Expr * getCondExpr()
Get the 'cond' part of the source atomic expression.
bool isPostfixUpdate() const
Return true if 'v' expression must be updated to original value of 'x', false if 'v' must be updated ...
const Expr * getX() const
Expr * getV()
Get 'v' part of the associated expression/statement.
friend class OMPExecutableDirective
Expr * getUpdateExpr()
Get helper expression of the form 'OpaqueValueExpr(x) binop OpaqueValueExpr(expr)' or 'OpaqueValueExp...
const Expr * getExpr() const
static OMPAtomicDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
const Expr * getUpdateExpr() const
Expr * getR()
Get 'r' part of the associated expression/statement.
const Expr * getV() const
This represents '#pragma omp barrier' directive.
static bool classof(const Stmt *T)
static OMPBarrierDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
This represents '#pragma omp cancel' directive.
static bool classof(const Stmt *T)
OpenMPDirectiveKind getCancelRegion() const
Get cancellation region for the current cancellation point.
static OMPCancelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
This represents '#pragma omp cancellation point' directive.
static bool classof(const Stmt *T)
OpenMPDirectiveKind getCancelRegion() const
Get cancellation region for the current cancellation point.
static OMPCancellationPointDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Representation of an OpenMP canonical loop.
child_range children()
Return this AST node's children.
DeclRefExpr * getLoopVarRef()
Reference to the loop user variable as accessed in the loop body.
const CapturedStmt * getDistanceFunc() const
const DeclRefExpr * getLoopVarRef() const
CapturedStmt * getLoopVarFunc()
The function that computes the loop user variable from a logical iteration counter.
SourceLocation getEndLoc() const
void setLoopStmt(Stmt *S)
Stmt * getLoopStmt()
The wrapped syntactic loop statement (ForStmt or CXXForRangeStmt).
CapturedStmt * getDistanceFunc()
The function that computes the number of loop iterations.
const CapturedStmt * getLoopVarFunc() const
static OMPCanonicalLoop * create(const ASTContext &Ctx, Stmt *LoopStmt, CapturedStmt *DistanceFunc, CapturedStmt *LoopVarFunc, DeclRefExpr *LoopVarRef)
Create a new OMPCanonicalLoop.
void setDistanceFunc(CapturedStmt *S)
static bool classof(const Stmt *S)
const Stmt * getLoopStmt() const
const_child_range children() const
void setLoopVarFunc(CapturedStmt *S)
SourceLocation getBeginLoc() const
static OMPCanonicalLoop * createEmpty(const ASTContext &Ctx)
Create an empty OMPCanonicalLoop for deserialization.
void setLoopVarRef(DeclRefExpr *E)
Contains data for OpenMP directives: clauses, children expressions/statements (helpers for codegen) a...
unsigned getNumClauses() const
const CapturedStmt * getCapturedStmt(OpenMPDirectiveKind RegionKind, ArrayRef< OpenMPDirectiveKind > CaptureRegions) const
Returns the captured statement associated with the component region within the (combined) directive.
bool hasAssociatedStmt() const
Stmt::child_range getAssociatedStmtAsRange()
const Stmt * getAssociatedStmt() const
Returns statement associated with the directive.
MutableArrayRef< OMPClause * > getClauses()
Get the clauses storage.
MutableArrayRef< Stmt * > getChildren()
CapturedStmt * getInnermostCapturedStmt(ArrayRef< OpenMPDirectiveKind > CaptureRegions)
Get innermost captured statement for the construct.
This is a basic class for representing single OpenMP clause.
This represents '#pragma omp critical' directive.
static OMPCriticalDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
DeclarationNameInfo getDirectiveName() const
Return name of the directive.
static bool classof(const Stmt *T)
This represents '#pragma omp depobj' directive.
static bool classof(const Stmt *T)
static OMPDepobjDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp dispatch' directive.
static bool classof(const Stmt *T)
static OMPDispatchDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
SourceLocation getTargetCallLoc() const
Return location of target-call.
friend class OMPExecutableDirective
This represents '#pragma omp distribute' directive.
static bool classof(const Stmt *T)
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.
const Expr * getTaskReductionRefExpr() const
static bool classof(const Stmt *T)
Expr * getTaskReductionRefExpr()
Returns special task reduction reference expression.
bool hasCancel() const
Return true if current directive has inner cancel directive.
This represents '#pragma omp distribute parallel for simd' composite directive.
static bool classof(const Stmt *T)
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 bool classof(const Stmt *T)
This represents '#pragma omp error' directive.
static bool classof(const Stmt *T)
static OMPErrorDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
Iterates over a filtered subrange of clauses applied to a directive.
specific_clause_iterator(ArrayRef< OMPClause * > Clauses)
const SpecificClause * operator->() const
const SpecificClause * operator*() const
specific_clause_iterator & operator++()
Iterates over expressions/statements used in the construct.
used_clauses_child_iterator & operator++()
Stmt * operator->() const
used_clauses_child_iterator(ArrayRef< OMPClause * > Clauses)
This is a basic class for representing single OpenMP executable directive.
void setLocStart(SourceLocation Loc)
Set starting location of directive kind.
CapturedStmt * getInnermostCapturedStmt()
Get innermost captured statement for the construct.
bool hasAssociatedStmt() const
Returns true if directive has associated statement.
OMPClause * getClause(unsigned I) const
Returns specified clause.
static T * createDirective(const ASTContext &C, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, unsigned NumChildren, Params &&... P)
const_child_range children() const
const CapturedStmt * getCapturedStmt(OpenMPDirectiveKind RegionKind) const
Returns the captured statement associated with the component region within the (combined) directive.
OMPExecutableDirective(StmtClass SC, OpenMPDirectiveKind K, SourceLocation StartLoc, SourceLocation EndLoc)
Build instance of directive of class K.
const SpecificClause * getSingleClause() const
OpenMPDirectiveKind getDirectiveKind() const
const Stmt * getAssociatedStmt() const
Returns statement associated with the directive.
llvm::iterator_range< specific_clause_iterator< SpecificClause > > getClausesOfKind() const
SourceLocation getBeginLoc() const
Returns starting location of directive kind.
const Stmt * getRawStmt() const
ArrayRef< OMPClause * > clauses() const
unsigned getNumClauses() const
Get number of clauses.
OMPChildren * Data
Data, associated with the directive.
const CapturedStmt * getInnermostCapturedStmt() const
static T * createEmptyDirective(const ASTContext &C, unsigned NumClauses, bool HasAssociatedStmt=false, unsigned NumChildren=0)
void setLocEnd(SourceLocation Loc)
Set ending location of directive.
bool hasClausesOfKind() const
Returns true if the current directive has one or more clauses of a specific kind.
SourceLocation getEndLoc() const
Returns ending location of directive.
static bool classof(const Stmt *S)
const Stmt * getStructuredBlock() const
Returns the AST node representing OpenMP structured-block of this OpenMP executable directive,...
Stmt * getAssociatedStmt()
static const SpecificClause * getSingleClause(ArrayRef< OMPClause * > Clauses)
Gets a single clause of the specified kind associated with the current directive iff there is only on...
bool isStandaloneDirective() const
Returns whether or not this is a Standalone directive.
static llvm::iterator_range< used_clauses_child_iterator > used_clauses_children(ArrayRef< OMPClause * > Clauses)
static T * createEmptyDirective(const ASTContext &C, unsigned NumClauses, bool HasAssociatedStmt, unsigned NumChildren, Params &&... P)
static llvm::iterator_range< specific_clause_iterator< SpecificClause > > getClausesOfKind(ArrayRef< OMPClause * > Clauses)
This represents '#pragma omp flush' directive.
static bool classof(const Stmt *T)
static OMPFlushDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp for' directive.
static bool classof(const Stmt *T)
const Expr * getTaskReductionRefExpr() const
Expr * getTaskReductionRefExpr()
Returns special task reduction reference expression.
static OMPForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
bool hasCancel() const
Return true if current directive has inner cancel directive.
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 bool classof(const Stmt *T)
This represents '#pragma omp loop' directive.
static bool classof(const Stmt *T)
static OMPGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with a place for NumClauses clauses.
Represents the '#pragma omp interchange' loop transformation directive.
Stmt * getTransformedStmt() const
Gets the associated loops after the transformation.
static OMPInterchangeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned NumLoops)
Build an empty '#pragma omp interchange' AST node for deserialization.
Stmt * getPreInits() const
Return preinits statement.
static bool classof(const Stmt *T)
This represents '#pragma omp interop' directive.
static OMPInteropDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
static bool classof(const Stmt *T)
The base class for all loop-based directives, including loop transformation directives.
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 ...
static bool doForAllLoops(const Stmt *CurStmt, bool TryImperfectlyNestedLoops, unsigned NumLoops, llvm::function_ref< bool(unsigned, const Stmt *)> Callback)
static bool classof(const Stmt *T)
OMPLoopBasedDirective(StmtClass SC, OpenMPDirectiveKind Kind, SourceLocation StartLoc, SourceLocation EndLoc, unsigned NumAssociatedLoops)
Build instance of loop directive of class Kind.
static void doForAllLoopsBodies(const Stmt *CurStmt, bool TryImperfectlyNestedLoops, unsigned NumLoops, llvm::function_ref< void(unsigned, const Stmt *, const Stmt *)> Callback)
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)
Calls the specified callback function for all the loops in CurStmt, from the outermost to the innermo...
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.
static const Stmt * tryToFindNextInnerLoop(const Stmt *CurStmt, bool TryImperfectlyNestedLoops)
static bool doForAllLoops(const Stmt *CurStmt, bool TryImperfectlyNestedLoops, unsigned NumLoops, llvm::function_ref< bool(unsigned, const Stmt *)> Callback, llvm::function_ref< void(const OMPLoopTransformationDirective *)> OnTransformationCallback)
This is a common base class for loop directives ('omp simd', 'omp for', 'omp for simd' etc....
ArrayRef< Expr * > finals() const
Expr * getStrideVariable() const
void setNextLowerBound(Expr *NLB)
Expr * getIsLastIterVariable() const
ArrayRef< Expr * > finals_conditions()
OMPLoopDirective(StmtClass SC, OpenMPDirectiveKind Kind, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum)
Build instance of loop directive of class Kind.
void setFinals(ArrayRef< Expr * > A)
ArrayRef< Expr * > inits()
void setPreCond(Expr *PC)
Expr * getCombinedParForInDistCond() const
Expr * getPrevUpperBoundVariable() const
ArrayRef< Expr * > counters()
void setPrevUpperBoundVariable(Expr *PrevUB)
void setCombinedLowerBoundVariable(Expr *CombLB)
void setDependentCounters(ArrayRef< Expr * > A)
static unsigned getArraysOffset(OpenMPDirectiveKind Kind)
Offset to the start of children expression arrays.
void setNumIterations(Expr *NI)
Expr * getPrevEnsureUpperBound() const
Expr * getLastIteration() const
Expr * getCombinedNextUpperBound() const
ArrayRef< Expr * > dependent_inits() const
Expr * getDistInc() const
ArrayRef< Expr * > inits() const
void setDistInc(Expr *DistInc)
void setPreInits(Stmt *PreInits)
void setFinalsConditions(ArrayRef< Expr * > A)
void setCombinedCond(Expr *CombCond)
void setIterationVariable(Expr *IV)
ArrayRef< Expr * > private_counters() const
Expr * getCalcLastIteration() const
ArrayRef< Expr * > counters() const
Expr * getCombinedUpperBoundVariable() const
Expr * getCombinedCond() const
Expr * getNumIterations() const
void setPrevEnsureUpperBound(Expr *PrevEUB)
void setCalcLastIteration(Expr *CLI)
ArrayRef< Expr * > finals()
Expr * getPrevLowerBoundVariable() const
void setPrevLowerBoundVariable(Expr *PrevLB)
const Stmt * getPreInits() const
ArrayRef< Expr * > finals_conditions() const
void setCombinedNextLowerBound(Expr *CombNLB)
void setNextUpperBound(Expr *NUB)
ArrayRef< Expr * > updates() const
Expr * getNextLowerBound() const
ArrayRef< Expr * > dependent_counters()
void setInits(ArrayRef< Expr * > A)
Expr * getNextUpperBound() const
static unsigned numLoopChildren(unsigned CollapsedNum, OpenMPDirectiveKind Kind)
Children number.
const Stmt * getBody() const
ArrayRef< Expr * > dependent_counters() const
void setEnsureUpperBound(Expr *EUB)
void setCombinedInit(Expr *CombInit)
void setUpperBoundVariable(Expr *UB)
void setLowerBoundVariable(Expr *LB)
Expr * getIterationVariable() const
Expr * getEnsureUpperBound() const
void setCombinedParForInDistCond(Expr *CombParForInDistCond)
void setCombinedNextUpperBound(Expr *CombNUB)
Expr * getCombinedNextLowerBound() const
Expr * getUpperBoundVariable() const
ArrayRef< Expr * > dependent_inits()
Expr * getCombinedDistCond() const
void setCounters(ArrayRef< Expr * > A)
void setCombinedDistCond(Expr *CombDistCond)
Expr * getCombinedLowerBoundVariable() const
ArrayRef< Expr * > updates()
void setDependentInits(ArrayRef< Expr * > A)
void setIsLastIterVariable(Expr *IL)
void setStrideVariable(Expr *ST)
void setLastIteration(Expr *LI)
Expr * getLowerBoundVariable() const
Expr * getCombinedEnsureUpperBound() const
Expr * getCombinedInit() const
void setCombinedEnsureUpperBound(Expr *CombEUB)
ArrayRef< Expr * > private_counters()
Expr * getPreCond() const
static bool classof(const Stmt *T)
void setCombinedUpperBoundVariable(Expr *CombUB)
void setUpdates(ArrayRef< Expr * > A)
void setPrivateCounters(ArrayRef< Expr * > A)
The base class for all loop transformation directives.
void setNumGeneratedLoops(unsigned Num)
Set the number of loops generated by this loop transformation.
Stmt * getPreInits() const
Return preinits statement.
OMPLoopTransformationDirective(StmtClass SC, OpenMPDirectiveKind Kind, SourceLocation StartLoc, SourceLocation EndLoc, unsigned NumAssociatedLoops)
unsigned getNumGeneratedLoops() const
Return the number of loops generated by this loop transformation.
unsigned getNumAssociatedLoops() const
Return the number of associated (consumed) loops.
static bool classof(const Stmt *T)
Stmt * getTransformedStmt() const
Get the de-sugared statements after the loop transformation.
This represents '#pragma omp masked' directive.
static OMPMaskedDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
static bool classof(const Stmt *T)
This represents '#pragma omp masked taskloop' directive.
bool hasCancel() const
Return true if current directive has inner cancel directive.
static bool classof(const Stmt *T)
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 bool classof(const Stmt *T)
This represents '#pragma omp master' directive.
static OMPMasterDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
static bool classof(const Stmt *T)
This represents '#pragma omp master taskloop' directive.
static bool classof(const Stmt *T)
static OMPMasterTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
bool hasCancel() const
Return true if current directive has inner cancel directive.
This represents '#pragma omp master taskloop simd' directive.
static bool classof(const Stmt *T)
static OMPMasterTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp ordered' directive.
static bool classof(const Stmt *T)
static OMPOrderedDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, bool IsStandalone, EmptyShell)
Creates an empty directive.
This represents '#pragma omp parallel' directive.
const Expr * getTaskReductionRefExpr() const
static bool classof(const Stmt *T)
Expr * getTaskReductionRefExpr()
Returns special task reduction reference expression.
bool hasCancel() const
Return true if current directive has inner cancel directive.
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.
const Expr * getTaskReductionRefExpr() const
static bool classof(const Stmt *T)
Expr * getTaskReductionRefExpr()
Returns special task reduction reference expression.
bool hasCancel() const
Return true if current directive has inner cancel directive.
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 bool classof(const Stmt *T)
static OMPParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses 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 bool classof(const Stmt *T)
This represents '#pragma omp parallel masked' directive.
Expr * getTaskReductionRefExpr()
Returns special task reduction reference expression.
static bool classof(const Stmt *T)
static OMPParallelMaskedDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
const Expr * getTaskReductionRefExpr() const
This represents '#pragma omp parallel masked taskloop' directive.
static bool classof(const Stmt *T)
bool hasCancel() const
Return true if current directive has inner cancel directive.
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 * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static bool classof(const Stmt *T)
This represents '#pragma omp parallel master' directive.
Expr * getTaskReductionRefExpr()
Returns special task reduction reference expression.
const Expr * getTaskReductionRefExpr() const
static bool classof(const Stmt *T)
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.
bool hasCancel() const
Return true if current directive has inner cancel directive.
static bool classof(const Stmt *T)
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 bool classof(const Stmt *T)
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.
const Expr * getTaskReductionRefExpr() const
Expr * getTaskReductionRefExpr()
Returns special task reduction reference expression.
bool hasCancel() const
Return true if current directive has inner cancel directive.
static OMPParallelSectionsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static bool classof(const Stmt *T)
Represents the '#pragma omp reverse' loop transformation directive.
static bool classof(const Stmt *T)
Stmt * getTransformedStmt() const
Gets/sets the associated loops after the transformation, i.e.
static OMPReverseDirective * CreateEmpty(const ASTContext &C)
Build an empty '#pragma omp reverse' AST node for deserialization.
Stmt * getPreInits() const
Return preinits statement.
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 bool classof(const Stmt *T)
This represents '#pragma omp scope' directive.
static bool classof(const Stmt *T)
static OMPScopeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
This represents '#pragma omp section' directive.
static OMPSectionDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
static bool classof(const Stmt *T)
void setHasCancel(bool Has)
Set cancel state.
bool hasCancel() const
Return true if current directive has inner cancel directive.
This represents '#pragma omp sections' directive.
static bool classof(const Stmt *T)
bool hasCancel() const
Return true if current directive has inner cancel directive.
static OMPSectionsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Expr * getTaskReductionRefExpr()
Returns special task reduction reference expression.
const Expr * getTaskReductionRefExpr() const
This represents '#pragma omp simd' directive.
static bool classof(const Stmt *T)
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 bool classof(const Stmt *T)
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 bool classof(const Stmt *T)
static OMPTargetDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
This represents '#pragma omp target' directive.
static bool classof(const Stmt *T)
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 bool classof(const Stmt *T)
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 bool classof(const Stmt *T)
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.
Expr * getTaskReductionRefExpr()
Returns special task reduction reference expression.
static bool classof(const Stmt *T)
bool hasCancel() const
Return true if current directive has inner cancel directive.
static OMPTargetParallelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
const Expr * getTaskReductionRefExpr() const
This represents '#pragma omp target parallel for' directive.
Expr * getTaskReductionRefExpr()
Returns special task reduction reference expression.
bool hasCancel() const
Return true if current directive has inner cancel directive.
const Expr * getTaskReductionRefExpr() const
static OMPTargetParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static bool classof(const Stmt *T)
This represents '#pragma omp target parallel for simd' directive.
static bool classof(const Stmt *T)
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 bool classof(const Stmt *T)
static OMPTargetParallelGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target simd' directive.
static bool classof(const Stmt *T)
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 bool classof(const Stmt *T)
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 bool classof(const Stmt *T)
static OMPTargetTeamsDistributeDirective * 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 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.
const Expr * getTaskReductionRefExpr() const
bool hasCancel() const
Return true if current directive has inner cancel directive.
Expr * getTaskReductionRefExpr()
Returns special task reduction reference expression.
static bool classof(const Stmt *T)
This represents '#pragma omp target teams distribute parallel for simd' combined directive.
static OMPTargetTeamsDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static bool classof(const Stmt *T)
This represents '#pragma omp target teams distribute simd' combined directive.
static OMPTargetTeamsDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static bool classof(const Stmt *T)
This represents '#pragma omp target teams loop' directive.
bool canBeParallelFor() const
Return true if current loop directive's associated loop can be a parallel for.
static bool classof(const Stmt *T)
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 bool classof(const Stmt *T)
This represents '#pragma omp task' directive.
bool hasCancel() const
Return true if current directive has inner cancel directive.
static OMPTaskDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static bool classof(const Stmt *T)
This represents '#pragma omp taskloop' directive.
static bool classof(const Stmt *T)
bool hasCancel() const
Return true if current directive has inner cancel directive.
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 bool classof(const Stmt *T)
This represents '#pragma omp taskgroup' directive.
static bool classof(const Stmt *T)
static OMPTaskgroupDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
const Expr * getReductionRef() const
Returns reference to the task_reduction return variable.
This represents '#pragma omp taskwait' directive.
static OMPTaskwaitDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
static bool classof(const Stmt *T)
This represents '#pragma omp taskyield' directive.
static OMPTaskyieldDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
static bool classof(const Stmt *T)
This represents '#pragma omp teams' directive.
static bool classof(const Stmt *T)
static OMPTeamsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp teams distribute' directive.
static bool classof(const Stmt *T)
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.
bool hasCancel() const
Return true if current directive has inner cancel directive.
const Expr * getTaskReductionRefExpr() const
static bool classof(const Stmt *T)
Expr * getTaskReductionRefExpr()
Returns special task reduction reference expression.
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 bool classof(const Stmt *T)
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 bool classof(const Stmt *T)
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 bool classof(const Stmt *T)
This represents the '#pragma omp tile' loop transformation directive.
Stmt * getPreInits() const
Return preinits statement.
static OMPTileDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned NumLoops)
Build an empty '#pragma omp tile' AST node for deserialization.
Stmt * getTransformedStmt() const
Gets/sets the associated loops after tiling.
static bool classof(const Stmt *T)
This represents the '#pragma omp unroll' loop transformation directive.
static bool classof(const Stmt *T)
Stmt * getTransformedStmt() const
Get the de-sugared associated loops after unrolling.
Stmt * getPreInits() const
Return the pre-init statements.
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.
SourceLocation getEndLoc() const LLVM_READONLY
StmtIterator child_iterator
Child Iterators: All subclasses must implement 'children' to permit easy iteration over the substatem...
llvm::iterator_range< child_iterator > child_range
SourceLocation getBeginLoc() const LLVM_READONLY
llvm::iterator_range< const_child_iterator > const_child_range
The JSON file list parser is used to communicate input to InstallAPI.
bool isOpenMPWorksharingDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a worksharing directive.
llvm::omp::Directive OpenMPDirectiveKind
OpenMP directives.
bool isOpenMPDistributeDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a distribute directive.
@ Create
'create' clause, allowed on Compute and Combined constructs, plus 'data', 'enter data',...
bool isOpenMPGenericLoopDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive constitutes a 'loop' directive in the outermost nest.
bool isOpenMPLoopDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a directive with an associated loop construct.
bool isOpenMPLoopBoundSharingDirective(OpenMPDirectiveKind Kind)
Checks if the specified directive kind is one of the composite or combined directives that need loop ...
const FunctionProtoType * T
void getOpenMPCaptureRegions(llvm::SmallVectorImpl< OpenMPDirectiveKind > &CaptureRegions, OpenMPDirectiveKind DKind)
Return the captured regions of an OpenMP directive.
bool isOpenMPTaskLoopDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a taskloop directive.
Diagnostic wrappers for TextAPI types for error reporting.
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.
The expressions built to support OpenMP loops in combined/composite pragmas (e.g.
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.
bool builtAll()
Check if all the expressions are built (does not check the worksharing ones).
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.
void clear(unsigned Size)
Initialize all the fields to null.
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....