15 #ifndef LLVM_CLANG_AST_STMTOPENMP_H
16 #define LLVM_CLANG_AST_STMTOPENMP_H
42 const unsigned NumClauses;
44 const unsigned NumChildren;
49 const unsigned ClausesOffset;
54 reinterpret_cast<char *
>(
this) + ClausesOffset);
69 unsigned NumClauses,
unsigned NumChildren)
70 :
Stmt(SC),
Kind(K), StartLoc(std::move(StartLoc)),
71 EndLoc(std::move(EndLoc)), NumClauses(NumClauses),
72 NumChildren(NumChildren),
95 template <
typename SpecificClause>
97 :
public llvm::iterator_adaptor_base<
98 specific_clause_iterator<SpecificClause>,
99 ArrayRef<OMPClause *>::const_iterator, std::forward_iterator_tag,
100 const SpecificClause *, ptrdiff_t, const SpecificClause *,
101 const SpecificClause *> {
104 void SkipToNextClause() {
105 while (this->
I != End && !isa<SpecificClause>(*this->
I))
117 return cast<SpecificClause>(*this->
I);
128 template <
typename SpecificClause>
129 static llvm::iterator_range<specific_clause_iterator<SpecificClause>>
133 llvm::makeArrayRef(Clauses.end(), 0))};
136 template <
typename SpecificClause>
137 llvm::iterator_range<specific_clause_iterator<SpecificClause>>
139 return getClausesOfKind<SpecificClause>(
clauses());
147 template <
typename SpecificClause>
149 auto Clauses = getClausesOfKind<SpecificClause>();
151 if (Clauses.begin() != Clauses.end()) {
152 assert(std::next(Clauses.begin()) == Clauses.end() &&
153 "There are at least 2 clauses of the specified kind");
154 return *Clauses.begin();
161 template <
typename SpecificClause>
163 auto Clauses = getClausesOfKind<SpecificClause>();
164 return Clauses.begin() != Clauses.end();
209 CaptureRegions.begin(), CaptureRegions.end(),
211 "RegionKind not found in OpenMP CaptureRegions.");
213 for (
auto ThisCaptureRegion : CaptureRegions) {
214 if (ThisCaptureRegion == RegionKind)
216 CS = cast<CapturedStmt>(CS->getCapturedStmt());
218 llvm_unreachable(
"Incorrect RegionKind specified for directive.");
224 return S->
getStmtClass() >= firstOMPExecutableDirectiveConstant &&
225 S->
getStmtClass() <= lastOMPExecutableDirectiveConstant;
231 Stmt **ChildStorage =
reinterpret_cast<Stmt **
>(getClauses().end());
232 return child_range(ChildStorage, ChildStorage + NumChildren);
264 StartLoc, EndLoc, NumClauses, 1),
278 void setHasCancel(
bool Has) { HasCancel = Has; }
290 static OMPParallelDirective *
291 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
292 ArrayRef<OMPClause *> Clauses,
Stmt *AssociatedStmt,
bool HasCancel);
299 static OMPParallelDirective *
CreateEmpty(
const ASTContext &
C,
300 unsigned NumClauses, EmptyShell);
316 unsigned CollapsedNum;
335 AssociatedStmtOffset = 0,
336 IterationVariableOffset = 1,
337 LastIterationOffset = 2,
338 CalcLastIterationOffset = 3,
339 PreConditionOffset = 4,
349 IsLastIterVariableOffset = 9,
350 LowerBoundVariableOffset = 10,
351 UpperBoundVariableOffset = 11,
352 StrideVariableOffset = 12,
353 EnsureUpperBoundOffset = 13,
354 NextLowerBoundOffset = 14,
355 NextUpperBoundOffset = 15,
356 NumIterationsOffset = 16,
359 PrevLowerBoundVariableOffset = 17,
360 PrevUpperBoundVariableOffset = 18,
362 PrevEnsureUpperBoundOffset = 20,
363 CombinedLowerBoundVariableOffset = 21,
364 CombinedUpperBoundVariableOffset = 22,
365 CombinedEnsureUpperBoundOffset = 23,
366 CombinedInitOffset = 24,
367 CombinedConditionOffset = 25,
368 CombinedNextLowerBoundOffset = 26,
369 CombinedNextUpperBoundOffset = 27,
372 CombinedDistributeEnd = 28,
377 Expr **Storage =
reinterpret_cast<Expr **
>(
383 MutableArrayRef<Expr *> getPrivateCounters() {
384 Expr **Storage =
reinterpret_cast<Expr **
>(&*std::next(
386 return MutableArrayRef<Expr *>(Storage, CollapsedNum);
390 MutableArrayRef<Expr *>
getInits() {
391 Expr **Storage =
reinterpret_cast<Expr **
>(
394 return MutableArrayRef<Expr *>(Storage, CollapsedNum);
399 Expr **Storage =
reinterpret_cast<Expr **
>(
402 return MutableArrayRef<Expr *>(Storage, CollapsedNum);
407 Expr **Storage =
reinterpret_cast<Expr **
>(
410 return MutableArrayRef<Expr *>(Storage, CollapsedNum);
424 template <
typename T>
427 unsigned CollapsedNum,
unsigned NumClauses,
428 unsigned NumSpecialChildren = 0)
432 CollapsedNum(CollapsedNum) {}
437 return CombinedDistributeEnd;
440 return WorksharingEnd;
453 *std::next(
child_begin(), IterationVariableOffset) = IV;
456 *std::next(
child_begin(), LastIterationOffset) = LI;
459 *std::next(
child_begin(), CalcLastIterationOffset) = CLI;
462 *std::next(
child_begin(), PreConditionOffset) = PC;
470 *std::next(
child_begin(), PreInitsOffset) = PreInits;
476 "expected worksharing loop directive");
477 *std::next(
child_begin(), IsLastIterVariableOffset) = IL;
483 "expected worksharing loop directive");
484 *std::next(
child_begin(), LowerBoundVariableOffset) = LB;
490 "expected worksharing loop directive");
491 *std::next(
child_begin(), UpperBoundVariableOffset) = UB;
497 "expected worksharing loop directive");
498 *std::next(
child_begin(), StrideVariableOffset) = ST;
504 "expected worksharing loop directive");
505 *std::next(
child_begin(), EnsureUpperBoundOffset) = EUB;
511 "expected worksharing loop directive");
512 *std::next(
child_begin(), NextLowerBoundOffset) = NLB;
518 "expected worksharing loop directive");
519 *std::next(
child_begin(), NextUpperBoundOffset) = NUB;
525 "expected worksharing loop directive");
526 *std::next(
child_begin(), NumIterationsOffset) = NI;
530 "expected loop bound sharing directive");
531 *std::next(
child_begin(), PrevLowerBoundVariableOffset) = PrevLB;
535 "expected loop bound sharing directive");
536 *std::next(
child_begin(), PrevUpperBoundVariableOffset) = PrevUB;
540 "expected loop bound sharing directive");
541 *std::next(
child_begin(), DistIncOffset) = DistInc;
545 "expected loop bound sharing directive");
546 *std::next(
child_begin(), PrevEnsureUpperBoundOffset) = PrevEUB;
550 "expected loop bound sharing directive");
551 *std::next(
child_begin(), CombinedLowerBoundVariableOffset) = CombLB;
555 "expected loop bound sharing directive");
556 *std::next(
child_begin(), CombinedUpperBoundVariableOffset) = CombUB;
560 "expected loop bound sharing directive");
561 *std::next(
child_begin(), CombinedEnsureUpperBoundOffset) = CombEUB;
565 "expected loop bound sharing directive");
566 *std::next(
child_begin(), CombinedInitOffset) = CombInit;
570 "expected loop bound sharing directive");
571 *std::next(
child_begin(), CombinedConditionOffset) = CombCond;
575 "expected loop bound sharing directive");
576 *std::next(
child_begin(), CombinedNextLowerBoundOffset) = CombNLB;
580 "expected loop bound sharing directive");
581 *std::next(
child_begin(), CombinedNextUpperBoundOffset) = CombNUB;
687 Cond !=
nullptr &&
Init !=
nullptr &&
Inc !=
nullptr;
717 for (
unsigned i = 0; i < Size; ++i) {
739 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
740 *std::next(
child_begin(), IterationVariableOffset)));
743 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
747 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
748 *std::next(
child_begin(), CalcLastIterationOffset)));
751 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
755 return const_cast<Expr *
>(
756 reinterpret_cast<const Expr *
>(*std::next(
child_begin(), CondOffset)));
759 return const_cast<Expr *
>(
760 reinterpret_cast<const Expr *
>(*std::next(
child_begin(), InitOffset)));
763 return const_cast<Expr *
>(
774 "expected worksharing loop directive");
775 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
776 *std::next(
child_begin(), IsLastIterVariableOffset)));
782 "expected worksharing loop directive");
783 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
784 *std::next(
child_begin(), LowerBoundVariableOffset)));
790 "expected worksharing loop directive");
791 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
792 *std::next(
child_begin(), UpperBoundVariableOffset)));
798 "expected worksharing loop directive");
799 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
806 "expected worksharing loop directive");
807 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
808 *std::next(
child_begin(), EnsureUpperBoundOffset)));
814 "expected worksharing loop directive");
815 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
822 "expected worksharing loop directive");
823 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
830 "expected worksharing loop directive");
831 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
836 "expected loop bound sharing directive");
837 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
838 *std::next(
child_begin(), PrevLowerBoundVariableOffset)));
842 "expected loop bound sharing directive");
843 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
844 *std::next(
child_begin(), PrevUpperBoundVariableOffset)));
848 "expected loop bound sharing directive");
849 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
854 "expected loop bound sharing directive");
855 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
856 *std::next(
child_begin(), PrevEnsureUpperBoundOffset)));
860 "expected loop bound sharing directive");
861 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
862 *std::next(
child_begin(), CombinedLowerBoundVariableOffset)));
866 "expected loop bound sharing directive");
867 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
868 *std::next(
child_begin(), CombinedUpperBoundVariableOffset)));
872 "expected loop bound sharing directive");
873 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
874 *std::next(
child_begin(), CombinedEnsureUpperBoundOffset)));
878 "expected loop bound sharing directive");
879 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
884 "expected loop bound sharing directive");
885 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
886 *std::next(
child_begin(), CombinedConditionOffset)));
890 "expected loop bound sharing directive");
891 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
892 *std::next(
child_begin(), CombinedNextLowerBoundOffset)));
896 "expected loop bound sharing directive");
897 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
898 *std::next(
child_begin(), CombinedNextUpperBoundOffset)));
903 Body = cast<ForStmt>(Body)->
getBody();
904 for (
unsigned Cnt = 1; Cnt < CollapsedNum; ++Cnt) {
906 Body = cast<ForStmt>(Body)->
getBody();
946 T->
getStmtClass() == OMPParallelForSimdDirectiveClass ||
950 T->
getStmtClass() == OMPTargetParallelForDirectiveClass ||
951 T->
getStmtClass() == OMPDistributeParallelForDirectiveClass ||
952 T->
getStmtClass() == OMPDistributeParallelForSimdDirectiveClass ||
954 T->
getStmtClass() == OMPTargetParallelForSimdDirectiveClass ||
956 T->
getStmtClass() == OMPTeamsDistributeDirectiveClass ||
957 T->
getStmtClass() == OMPTeamsDistributeSimdDirectiveClass ||
958 T->
getStmtClass() == OMPTeamsDistributeParallelForSimdDirectiveClass ||
959 T->
getStmtClass() == OMPTeamsDistributeParallelForDirectiveClass;
982 unsigned CollapsedNum,
unsigned NumClauses)
984 EndLoc, CollapsedNum, NumClauses) {}
1007 static OMPSimdDirective *
Create(
const ASTContext &
C, SourceLocation StartLoc,
1008 SourceLocation EndLoc,
unsigned CollapsedNum,
1009 ArrayRef<OMPClause *> Clauses,
1010 Stmt *AssociatedStmt,
1011 const HelperExprs &Exprs);
1020 static OMPSimdDirective *
CreateEmpty(
const ASTContext &
C,
unsigned NumClauses,
1021 unsigned CollapsedNum, EmptyShell);
1051 unsigned CollapsedNum,
unsigned NumClauses)
1053 CollapsedNum, NumClauses),
1067 void setHasCancel(
bool Has) { HasCancel = Has; }
1081 static OMPForDirective *
Create(
const ASTContext &
C, SourceLocation StartLoc,
1082 SourceLocation EndLoc,
unsigned CollapsedNum,
1083 ArrayRef<OMPClause *> Clauses,
1084 Stmt *AssociatedStmt,
const HelperExprs &Exprs,
1094 static OMPForDirective *
CreateEmpty(
const ASTContext &
C,
unsigned NumClauses,
1095 unsigned CollapsedNum, EmptyShell);
1124 unsigned CollapsedNum,
unsigned NumClauses)
1126 StartLoc, EndLoc, CollapsedNum, NumClauses) {}
1149 static OMPForSimdDirective *
1150 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
1151 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
1152 Stmt *AssociatedStmt,
const HelperExprs &Exprs);
1161 static OMPForSimdDirective *
CreateEmpty(
const ASTContext &
C,
1162 unsigned NumClauses,
1163 unsigned CollapsedNum, EmptyShell);
1192 unsigned NumClauses)
1194 StartLoc, EndLoc, NumClauses, 1),
1208 void setHasCancel(
bool Has) { HasCancel = Has; }
1220 static OMPSectionsDirective *
1221 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
1222 ArrayRef<OMPClause *> Clauses,
Stmt *AssociatedStmt,
bool HasCancel);
1230 static OMPSectionsDirective *
CreateEmpty(
const ASTContext &
C,
1231 unsigned NumClauses, EmptyShell);
1260 StartLoc, EndLoc, 0, 1),
1279 static OMPSectionDirective *
Create(
const ASTContext &
C,
1280 SourceLocation StartLoc,
1281 SourceLocation EndLoc,
1282 Stmt *AssociatedStmt,
bool HasCancel);
1288 static OMPSectionDirective *
CreateEmpty(
const ASTContext &
C, EmptyShell);
1318 unsigned NumClauses)
1320 StartLoc, EndLoc, NumClauses, 1) {}
1340 static OMPSingleDirective *
1341 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
1342 ArrayRef<OMPClause *> Clauses,
Stmt *AssociatedStmt);
1350 static OMPSingleDirective *
CreateEmpty(
const ASTContext &
C,
1351 unsigned NumClauses, EmptyShell);
1373 StartLoc, EndLoc, 0, 1) {}
1389 static OMPMasterDirective *
Create(
const ASTContext &
C,
1390 SourceLocation StartLoc,
1391 SourceLocation EndLoc,
1392 Stmt *AssociatedStmt);
1398 static OMPMasterDirective *
CreateEmpty(
const ASTContext &
C, EmptyShell);
1425 StartLoc, EndLoc, NumClauses, 1),
1442 void setDirectiveName(
const DeclarationNameInfo &
Name) { DirName =
Name; }
1454 static OMPCriticalDirective *
1455 Create(
const ASTContext &
C,
const DeclarationNameInfo &
Name,
1456 SourceLocation StartLoc, SourceLocation EndLoc,
1457 ArrayRef<OMPClause *> Clauses,
Stmt *AssociatedStmt);
1464 static OMPCriticalDirective *
CreateEmpty(
const ASTContext &
C,
1465 unsigned NumClauses, EmptyShell);
1499 unsigned CollapsedNum,
unsigned NumClauses)
1501 StartLoc, EndLoc, CollapsedNum, NumClauses),
1516 void setHasCancel(
bool Has) { HasCancel = Has; }
1530 static OMPParallelForDirective *
1531 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
1532 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
1533 Stmt *AssociatedStmt,
const HelperExprs &Exprs,
bool HasCancel);
1542 static OMPParallelForDirective *
CreateEmpty(
const ASTContext &
C,
1543 unsigned NumClauses,
1544 unsigned CollapsedNum,
1551 return T->
getStmtClass() == OMPParallelForDirectiveClass;
1575 unsigned CollapsedNum,
unsigned NumClauses)
1577 OMPD_parallel_for_simd, StartLoc, EndLoc, CollapsedNum,
1586 unsigned NumClauses)
1602 static OMPParallelForSimdDirective *
1603 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
1604 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
1605 Stmt *AssociatedStmt,
const HelperExprs &Exprs);
1614 static OMPParallelForSimdDirective *
CreateEmpty(
const ASTContext &
C,
1615 unsigned NumClauses,
1616 unsigned CollapsedNum,
1620 return T->
getStmtClass() == OMPParallelForSimdDirectiveClass;
1646 unsigned NumClauses)
1648 OMPD_parallel_sections, StartLoc, EndLoc,
1663 void setHasCancel(
bool Has) { HasCancel = Has; }
1675 static OMPParallelSectionsDirective *
1676 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
1677 ArrayRef<OMPClause *> Clauses,
Stmt *AssociatedStmt,
bool HasCancel);
1685 static OMPParallelSectionsDirective *
1686 CreateEmpty(
const ASTContext &
C,
unsigned NumClauses, EmptyShell);
1692 return T->
getStmtClass() == OMPParallelSectionsDirectiveClass;
1716 unsigned NumClauses)
1718 EndLoc, NumClauses, 1),
1732 void setHasCancel(
bool Has) { HasCancel = Has; }
1744 static OMPTaskDirective *
Create(
const ASTContext &
C, SourceLocation StartLoc,
1745 SourceLocation EndLoc,
1746 ArrayRef<OMPClause *> Clauses,
1747 Stmt *AssociatedStmt,
bool HasCancel);
1755 static OMPTaskDirective *
CreateEmpty(
const ASTContext &
C,
unsigned NumClauses,
1781 StartLoc, EndLoc, 0, 0) {}
1796 static OMPTaskyieldDirective *
1797 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc);
1803 static OMPTaskyieldDirective *
CreateEmpty(
const ASTContext &
C, EmptyShell);
1806 return T->
getStmtClass() == OMPTaskyieldDirectiveClass;
1825 StartLoc, EndLoc, 0, 0) {}
1840 static OMPBarrierDirective *
1841 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc);
1847 static OMPBarrierDirective *
CreateEmpty(
const ASTContext &
C, EmptyShell);
1869 StartLoc, EndLoc, 0, 0) {}
1884 static OMPTaskwaitDirective *
1885 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc);
1891 static OMPTaskwaitDirective *
CreateEmpty(
const ASTContext &
C, EmptyShell);
1913 unsigned NumClauses)
1915 StartLoc, EndLoc, NumClauses, 1) {}
1934 static OMPTaskgroupDirective *
1935 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
1936 ArrayRef<OMPClause *> Clauses,
Stmt *AssociatedStmt);
1943 static OMPTaskgroupDirective *
CreateEmpty(
const ASTContext &
C,
1944 unsigned NumClauses, EmptyShell);
1947 return T->
getStmtClass() == OMPTaskgroupDirectiveClass;
1970 unsigned NumClauses)
1972 StartLoc, EndLoc, NumClauses, 0) {}
1992 static OMPFlushDirective *
Create(
const ASTContext &
C, SourceLocation StartLoc,
1993 SourceLocation EndLoc,
1994 ArrayRef<OMPClause *> Clauses);
2002 static OMPFlushDirective *
CreateEmpty(
const ASTContext &
C,
2003 unsigned NumClauses, EmptyShell);
2025 unsigned NumClauses)
2027 StartLoc, EndLoc, NumClauses, 1) {}
2047 static OMPOrderedDirective *
2048 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
2049 ArrayRef<OMPClause *> Clauses,
Stmt *AssociatedStmt);
2056 static OMPOrderedDirective *
CreateEmpty(
const ASTContext &
C,
2057 unsigned NumClauses, EmptyShell);
2082 bool IsXLHSInRHSPart;
2091 bool IsPostfixUpdate;
2100 unsigned NumClauses)
2102 StartLoc, EndLoc, NumClauses, 5),
2103 IsXLHSInRHSPart(
false), IsPostfixUpdate(
false) {}
2113 IsXLHSInRHSPart(
false), IsPostfixUpdate(
false) {}
2120 void setUpdateExpr(Expr *UE) { *std::next(
child_begin(), 2) = UE; }
2122 void setV(Expr *V) { *std::next(
child_begin(), 3) = V; }
2146 static OMPAtomicDirective *
2147 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
2148 ArrayRef<OMPClause *> Clauses,
Stmt *AssociatedStmt, Expr *X, Expr *V,
2149 Expr *E, Expr *UE,
bool IsXLHSInRHSPart,
bool IsPostfixUpdate);
2157 static OMPAtomicDirective *
CreateEmpty(
const ASTContext &
C,
2158 unsigned NumClauses, EmptyShell);
2163 return cast_or_null<Expr>(*std::next(
child_begin()));
2169 return cast_or_null<Expr>(*std::next(
child_begin(), 2));
2172 return cast_or_null<Expr>(*std::next(
child_begin(), 2));
2184 return cast_or_null<Expr>(*std::next(
child_begin(), 3));
2189 return cast_or_null<Expr>(*std::next(
child_begin(), 4));
2214 unsigned NumClauses)
2216 StartLoc, EndLoc, NumClauses, 1) {}
2236 static OMPTargetDirective *
2237 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
2238 ArrayRef<OMPClause *> Clauses,
Stmt *AssociatedStmt);
2246 static OMPTargetDirective *
CreateEmpty(
const ASTContext &
C,
2247 unsigned NumClauses, EmptyShell);
2272 unsigned NumClauses)
2274 OMPD_target_data, StartLoc, EndLoc, NumClauses,
2295 static OMPTargetDataDirective *
2296 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
2297 ArrayRef<OMPClause *> Clauses,
Stmt *AssociatedStmt);
2304 static OMPTargetDataDirective *
CreateEmpty(
const ASTContext &
C,
unsigned N,
2308 return T->
getStmtClass() == OMPTargetDataDirectiveClass;
2330 unsigned NumClauses)
2332 OMPD_target_enter_data, StartLoc, EndLoc,
2353 static OMPTargetEnterDataDirective *
Create(
const ASTContext &
C,
2354 SourceLocation StartLoc,
2355 SourceLocation EndLoc,
2356 ArrayRef<OMPClause *> Clauses);
2363 static OMPTargetEnterDataDirective *
CreateEmpty(
const ASTContext &
C,
2364 unsigned N, EmptyShell);
2367 return T->
getStmtClass() == OMPTargetEnterDataDirectiveClass;
2389 unsigned NumClauses)
2391 OMPD_target_exit_data, StartLoc, EndLoc,
2412 static OMPTargetExitDataDirective *
Create(
const ASTContext &
C,
2413 SourceLocation StartLoc,
2414 SourceLocation EndLoc,
2415 ArrayRef<OMPClause *> Clauses);
2422 static OMPTargetExitDataDirective *
CreateEmpty(
const ASTContext &
C,
2423 unsigned N, EmptyShell);
2426 return T->
getStmtClass() == OMPTargetExitDataDirectiveClass;
2447 unsigned NumClauses)
2449 OMPD_target_parallel, StartLoc, EndLoc,
2471 static OMPTargetParallelDirective *
2472 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
2473 ArrayRef<OMPClause *> Clauses,
Stmt *AssociatedStmt);
2481 static OMPTargetParallelDirective *
2482 CreateEmpty(
const ASTContext &
C,
unsigned NumClauses, EmptyShell);
2485 return T->
getStmtClass() == OMPTargetParallelDirectiveClass;
2512 unsigned CollapsedNum,
unsigned NumClauses)
2514 OMPD_target_parallel_for, StartLoc, EndLoc,
2515 CollapsedNum, NumClauses),
2524 unsigned NumClauses)
2531 void setHasCancel(
bool Has) { HasCancel = Has; }
2545 static OMPTargetParallelForDirective *
2546 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
2547 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
2548 Stmt *AssociatedStmt,
const HelperExprs &Exprs,
bool HasCancel);
2557 static OMPTargetParallelForDirective *
CreateEmpty(
const ASTContext &
C,
2558 unsigned NumClauses,
2559 unsigned CollapsedNum,
2566 return T->
getStmtClass() == OMPTargetParallelForDirectiveClass;
2587 unsigned NumClauses)
2589 StartLoc, EndLoc, NumClauses, 1) {}
2609 static OMPTeamsDirective *
Create(
const ASTContext &
C, SourceLocation StartLoc,
2610 SourceLocation EndLoc,
2611 ArrayRef<OMPClause *> Clauses,
2612 Stmt *AssociatedStmt);
2620 static OMPTeamsDirective *
CreateEmpty(
const ASTContext &
C,
2621 unsigned NumClauses, EmptyShell);
2645 OMPD_cancellation_point, StartLoc, EndLoc, 0, 0),
2667 static OMPCancellationPointDirective *
2668 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
2675 static OMPCancellationPointDirective *
CreateEmpty(
const ASTContext &
C,
2682 return T->
getStmtClass() == OMPCancellationPointDirectiveClass;
2703 unsigned NumClauses)
2705 StartLoc, EndLoc, NumClauses, 0),
2729 static OMPCancelDirective *
2730 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
2738 static OMPCancelDirective *
CreateEmpty(
const ASTContext &
C,
2739 unsigned NumClauses, EmptyShell);
2768 unsigned CollapsedNum,
unsigned NumClauses)
2770 StartLoc, EndLoc, CollapsedNum, NumClauses) {}
2793 static OMPTaskLoopDirective *
2794 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
2795 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
2796 Stmt *AssociatedStmt,
const HelperExprs &Exprs);
2805 static OMPTaskLoopDirective *
CreateEmpty(
const ASTContext &
C,
2806 unsigned NumClauses,
2807 unsigned CollapsedNum, EmptyShell);
2833 unsigned CollapsedNum,
unsigned NumClauses)
2835 OMPD_taskloop_simd, StartLoc, EndLoc, CollapsedNum,
2846 CollapsedNum, NumClauses) {}
2859 static OMPTaskLoopSimdDirective *
2860 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
2861 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
2862 Stmt *AssociatedStmt,
const HelperExprs &Exprs);
2871 static OMPTaskLoopSimdDirective *
CreateEmpty(
const ASTContext &
C,
2872 unsigned NumClauses,
2873 unsigned CollapsedNum,
2877 return T->
getStmtClass() == OMPTaskLoopSimdDirectiveClass;
2900 unsigned CollapsedNum,
unsigned NumClauses)
2902 StartLoc, EndLoc, CollapsedNum, NumClauses)
2927 static OMPDistributeDirective *
2928 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
2929 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
2930 Stmt *AssociatedStmt,
const HelperExprs &Exprs);
2939 static OMPDistributeDirective *
CreateEmpty(
const ASTContext &
C,
2940 unsigned NumClauses,
2941 unsigned CollapsedNum, EmptyShell);
2944 return T->
getStmtClass() == OMPDistributeDirectiveClass;
2966 unsigned NumClauses)
2968 OMPD_target_update, StartLoc, EndLoc, NumClauses,
2988 static OMPTargetUpdateDirective *
Create(
const ASTContext &
C,
2989 SourceLocation StartLoc,
2990 SourceLocation EndLoc,
2991 ArrayRef<OMPClause *> Clauses);
2999 static OMPTargetUpdateDirective *
CreateEmpty(
const ASTContext &
C,
3000 unsigned NumClauses, EmptyShell);
3003 return T->
getStmtClass() == OMPTargetUpdateDirectiveClass;
3028 unsigned CollapsedNum,
unsigned NumClauses)
3030 OMPD_distribute_parallel_for, StartLoc, EndLoc,
3031 CollapsedNum, NumClauses) {}
3039 unsigned NumClauses)
3055 static OMPDistributeParallelForDirective *
3056 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
3057 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3058 Stmt *AssociatedStmt,
const HelperExprs &Exprs);
3067 static OMPDistributeParallelForDirective *
CreateEmpty(
const ASTContext &
C,
3068 unsigned NumClauses,
3069 unsigned CollapsedNum,
3073 return T->
getStmtClass() == OMPDistributeParallelForDirectiveClass;
3098 unsigned CollapsedNum,
3099 unsigned NumClauses)
3101 OMPD_distribute_parallel_for_simd, StartLoc,
3102 EndLoc, CollapsedNum, NumClauses) {}
3110 unsigned NumClauses)
3112 OMPD_distribute_parallel_for_simd,
3127 static OMPDistributeParallelForSimdDirective *
Create(
3128 const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
3129 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3130 Stmt *AssociatedStmt,
const HelperExprs &Exprs);
3138 static OMPDistributeParallelForSimdDirective *
CreateEmpty(
3139 const ASTContext &
C,
unsigned NumClauses,
unsigned CollapsedNum,
3143 return T->
getStmtClass() == OMPDistributeParallelForSimdDirectiveClass;
3166 unsigned CollapsedNum,
unsigned NumClauses)
3168 OMPD_distribute_simd, StartLoc, EndLoc, CollapsedNum,
3177 unsigned NumClauses)
3193 static OMPDistributeSimdDirective *
3194 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
3195 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3196 Stmt *AssociatedStmt,
const HelperExprs &Exprs);
3204 static OMPDistributeSimdDirective *
CreateEmpty(
const ASTContext &
C,
3205 unsigned NumClauses,
3206 unsigned CollapsedNum,
3210 return T->
getStmtClass() == OMPDistributeSimdDirectiveClass;
3234 unsigned CollapsedNum,
unsigned NumClauses)
3236 OMPD_target_parallel_for_simd, StartLoc, EndLoc,
3237 CollapsedNum, NumClauses) {}
3245 unsigned NumClauses)
3261 static OMPTargetParallelForSimdDirective *
3262 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
3263 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3264 Stmt *AssociatedStmt,
const HelperExprs &Exprs);
3272 static OMPTargetParallelForSimdDirective *
CreateEmpty(
const ASTContext &
C,
3273 unsigned NumClauses,
3274 unsigned CollapsedNum,
3278 return T->
getStmtClass() == OMPTargetParallelForSimdDirectiveClass;
3302 unsigned CollapsedNum,
unsigned NumClauses)
3304 OMPD_target_simd, StartLoc, EndLoc, CollapsedNum,
3328 static OMPTargetSimdDirective *
3329 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
3330 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3331 Stmt *AssociatedStmt,
const HelperExprs &Exprs);
3339 static OMPTargetSimdDirective *
CreateEmpty(
const ASTContext &
C,
3340 unsigned NumClauses,
3341 unsigned CollapsedNum,
3345 return T->
getStmtClass() == OMPTargetSimdDirectiveClass;
3368 unsigned CollapsedNum,
unsigned NumClauses)
3370 OMPD_teams_distribute, StartLoc, EndLoc,
3371 CollapsedNum, NumClauses) {}
3379 unsigned NumClauses)
3395 static OMPTeamsDistributeDirective *
3396 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
3397 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3398 Stmt *AssociatedStmt,
const HelperExprs &Exprs);
3406 static OMPTeamsDistributeDirective *
CreateEmpty(
const ASTContext &
C,
3407 unsigned NumClauses,
3408 unsigned CollapsedNum,
3412 return T->
getStmtClass() == OMPTeamsDistributeDirectiveClass;
3437 unsigned NumClauses)
3439 OMPD_teams_distribute_simd, StartLoc, EndLoc,
3440 CollapsedNum, NumClauses) {}
3448 unsigned NumClauses)
3464 static OMPTeamsDistributeSimdDirective *
3465 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
3466 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3467 Stmt *AssociatedStmt,
const HelperExprs &Exprs);
3476 static OMPTeamsDistributeSimdDirective *
CreateEmpty(
const ASTContext &
C,
3477 unsigned NumClauses,
3478 unsigned CollapsedNum,
3482 return T->
getStmtClass() == OMPTeamsDistributeSimdDirectiveClass;
3508 unsigned CollapsedNum,
3509 unsigned NumClauses)
3511 OMPD_teams_distribute_parallel_for_simd, StartLoc,
3512 EndLoc, CollapsedNum, NumClauses) {}
3520 unsigned NumClauses)
3522 OMPD_teams_distribute_parallel_for_simd,
3537 static OMPTeamsDistributeParallelForSimdDirective *
3538 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
3539 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3540 Stmt *AssociatedStmt,
const HelperExprs &Exprs);
3548 static OMPTeamsDistributeParallelForSimdDirective *
3549 CreateEmpty(
const ASTContext &
C,
unsigned NumClauses,
unsigned CollapsedNum,
3553 return T->
getStmtClass() == OMPTeamsDistributeParallelForSimdDirectiveClass;
3578 unsigned CollapsedNum,
3579 unsigned NumClauses)
3581 OMPD_teams_distribute_parallel_for, StartLoc, EndLoc,
3582 CollapsedNum, NumClauses) {}
3590 unsigned NumClauses)
3606 static OMPTeamsDistributeParallelForDirective *
3607 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
3608 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3609 Stmt *AssociatedStmt,
const HelperExprs &Exprs);
3617 static OMPTeamsDistributeParallelForDirective *
3618 CreateEmpty(
const ASTContext &
C,
unsigned NumClauses,
unsigned CollapsedNum,
3622 return T->
getStmtClass() == OMPTeamsDistributeParallelForDirectiveClass;
3643 unsigned NumClauses)
3645 OMPD_target_teams, StartLoc, EndLoc, NumClauses,
3666 static OMPTargetTeamsDirective *
Create(
const ASTContext &
C,
3667 SourceLocation StartLoc,
3668 SourceLocation EndLoc,
3669 ArrayRef<OMPClause *> Clauses,
3670 Stmt *AssociatedStmt);
3677 static OMPTargetTeamsDirective *
CreateEmpty(
const ASTContext &
C,
3678 unsigned NumClauses, EmptyShell);
3681 return T->
getStmtClass() == OMPTargetTeamsDirectiveClass;
3705 unsigned CollapsedNum,
unsigned NumClauses)
3707 OMPD_target_teams_distribute, StartLoc, EndLoc,
3708 CollapsedNum, NumClauses) {}
3716 unsigned NumClauses)
3732 static OMPTargetTeamsDistributeDirective *
3733 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
3734 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3735 Stmt *AssociatedStmt,
const HelperExprs &Exprs);
3743 static OMPTargetTeamsDistributeDirective *
3744 CreateEmpty(
const ASTContext &
C,
unsigned NumClauses,
unsigned CollapsedNum,
3748 return T->
getStmtClass() == OMPTargetTeamsDistributeDirectiveClass;
3774 unsigned CollapsedNum,
3775 unsigned NumClauses)
3777 OMPTargetTeamsDistributeParallelForDirectiveClass,
3778 OMPD_target_teams_distribute_parallel_for, StartLoc,
3779 EndLoc, CollapsedNum, NumClauses) {}
3787 unsigned NumClauses)
3789 this, OMPTargetTeamsDistributeParallelForDirectiveClass,
3804 static OMPTargetTeamsDistributeParallelForDirective *
3805 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
3806 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3807 Stmt *AssociatedStmt,
const HelperExprs &Exprs);
3815 static OMPTargetTeamsDistributeParallelForDirective *
3816 CreateEmpty(
const ASTContext &
C,
unsigned NumClauses,
unsigned CollapsedNum,
3821 OMPTargetTeamsDistributeParallelForDirectiveClass;
3847 unsigned CollapsedNum,
3848 unsigned NumClauses)
3850 OMPTargetTeamsDistributeParallelForSimdDirectiveClass,
3851 OMPD_target_teams_distribute_parallel_for_simd,
3852 StartLoc, EndLoc, CollapsedNum, NumClauses) {}
3860 unsigned CollapsedNum,
unsigned NumClauses)
3862 this, OMPTargetTeamsDistributeParallelForSimdDirectiveClass,
3863 OMPD_target_teams_distribute_parallel_for_simd,
SourceLocation(),
3877 static OMPTargetTeamsDistributeParallelForSimdDirective *
3878 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
3879 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3880 Stmt *AssociatedStmt,
const HelperExprs &Exprs);
3888 static OMPTargetTeamsDistributeParallelForSimdDirective *
3889 CreateEmpty(
const ASTContext &
C,
unsigned NumClauses,
unsigned CollapsedNum,
3894 OMPTargetTeamsDistributeParallelForSimdDirectiveClass;
3919 unsigned CollapsedNum,
3920 unsigned NumClauses)
3922 OMPD_target_teams_distribute_simd, StartLoc, EndLoc,
3923 CollapsedNum, NumClauses) {}
3931 unsigned NumClauses)
3947 static OMPTargetTeamsDistributeSimdDirective *
3948 Create(
const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
3949 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3950 Stmt *AssociatedStmt,
const HelperExprs &Exprs);
3958 static OMPTargetTeamsDistributeSimdDirective *
3959 CreateEmpty(
const ASTContext &
C,
unsigned NumClauses,
unsigned CollapsedNum,
3963 return T->
getStmtClass() == OMPTargetTeamsDistributeSimdDirectiveClass;
void setPreInits(Stmt *PreInits)
Expr * getCombinedInit() const
child_iterator child_begin()
Expr * NLB
Update of LowerBound for statically sheduled 'omp for' loops.
static bool classof(const Stmt *T)
This represents '#pragma omp distribute simd' composite directive.
SmallVector< Expr *, 4 > Finals
Final loop counter values for GodeGen.
This represents '#pragma omp master' directive.
Expr * NUB
Update of UpperBound for statically sheduled omp loops for outer loop in combined constructs (e...
SmallVector< Expr *, 4 > Updates
Expressions for loop counters update for CodeGen.
StmtClass getStmtClass() const
CapturedStmt * getCapturedStmt(OpenMPDirectiveKind RegionKind) const
Returns the captured statement associated with the component region within the (combined) directive...
This represents '#pragma omp task' directive.
void setEnsureUpperBound(Expr *EUB)
static OMPDistributeSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
bool isXLHSInRHSPart() const
Return true if helper update expression has form 'OpaqueValueExpr(x) binop OpaqueValueExpr(expr)' and...
static OMPMasterDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Expr * getCombinedEnsureUpperBound() const
static bool classof(const Stmt *T)
static OMPDistributeDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
ArrayRef< OMPClause * > clauses()
llvm::iterator_range< specific_clause_iterator< SpecificClause > > getClausesOfKind() const
static bool classof(const Stmt *T)
Expr * getNumIterations() const
OMPLoopDirective(const T *That, StmtClass SC, OpenMPDirectiveKind Kind, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, unsigned NumClauses, unsigned NumSpecialChildren=0)
Build instance of loop directive of class Kind.
static OMPDistributeParallelForSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
void setCombinedCond(Expr *CombCond)
static bool classof(const Stmt *T)
void setCombinedLowerBoundVariable(Expr *CombLB)
static OMPTaskwaitDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
static OMPTargetParallelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setHasCancel(bool Has)
Set cancel state.
Stmt - This represents one statement.
static OMPTaskgroupDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
void setLastIteration(Expr *LI)
static bool classof(const Stmt *T)
static bool classof(const Stmt *T)
This represents '#pragma omp for simd' directive.
Expr * EUB
EnsureUpperBound – expression UB = min(UB, NumIterations).
Expr * DistInc
DistInc - increment expression for distribute loop when found combined with a further loop level (e...
static OMPTargetUpdateDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses)
Creates directive with a list of Clauses.
This represents '#pragma omp teams distribute parallel for' composite directive.
static OMPSectionDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AssociatedStmt, bool HasCancel)
Creates directive.
void setPrevEnsureUpperBound(Expr *PrevEUB)
void setUpperBoundVariable(Expr *UB)
void setNumIterations(Expr *NI)
static OMPAtomicDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, Expr *X, Expr *V, Expr *E, Expr *UE, bool IsXLHSInRHSPart, bool IsPostfixUpdate)
Creates directive with a list of Clauses and 'x', 'v' and 'expr' parts of the atomic construct (see S...
This represents '#pragma omp target teams distribute' combined directive.
static OMPCriticalDirective * Create(const ASTContext &C, const DeclarationNameInfo &Name, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive.
void setNextLowerBound(Expr *NLB)
const Expr * getExpr() const
ArrayRef< OMPClause * > clauses() const
This represents '#pragma omp parallel for' directive.
This represents '#pragma omp target teams distribute parallel for' combined directive.
void setIsLastIterVariable(Expr *IL)
Expr * PrevLB
PreviousLowerBound - local variable passed to runtime in the enclosing schedule or null if that does ...
This represents '#pragma omp target exit data' directive.
static OMPTargetTeamsDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPParallelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for N clauses.
static OMPTaskLoopSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPTargetParallelForSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPParallelForDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel)
Creates directive with a list of Clauses.
static OMPDistributeParallelForDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
The expressions built to support OpenMP loops in combined/composite pragmas (e.g. ...
Stmt(StmtClass SC, EmptyShell)
Construct an empty statement.
Expr * getPrevUpperBoundVariable() const
Expr * LastIteration
Loop last iteration number.
OpenMPDirectiveKind getDirectiveKind() const
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.
void setFinals(ArrayRef< Expr * > A)
const Expr * getV() const
static OMPTargetTeamsDistributeDirective * 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)
static OMPTargetDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, 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 parallel' directive.
static bool classof(const Stmt *T)
const SpecificClause * operator->() const
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)
static OMPTargetParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPFlushDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
ArrayRef< Expr * > updates()
static OMPTargetExitDataDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses)
Creates directive with a list of Clauses.
This represents '#pragma omp target simd' directive.
static unsigned getArraysOffset(OpenMPDirectiveKind Kind)
Offset to the start of children expression arrays.
static bool classof(const Stmt *T)
Defines some OpenMP-specific enums and functions.
This represents '#pragma omp barrier' directive.
bool hasCancel() const
Return true if current directive has inner cancel directive.
This is a common base class for loop directives ('omp simd', 'omp for', 'omp for simd' etc...
This represents '#pragma omp critical' directive.
OpenMPDirectiveKind getCancelRegion() const
Get cancellation region for the current cancellation point.
static OMPCriticalDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
static OMPParallelSectionsDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, bool HasCancel)
Creates directive with a list of Clauses.
static bool classof(const Stmt *T)
static OMPTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTargetParallelForDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel)
Creates directive with a list of Clauses.
This represents '#pragma omp distribute parallel for' composite directive.
This represents '#pragma omp teams distribute parallel for simd' composite directive.
static OMPCancelDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, OpenMPDirectiveKind CancelRegion)
Creates directive.
ArrayRef< Expr * > finals()
static OMPTaskgroupDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive.
void setCounters(ArrayRef< Expr * > A)
static OMPDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Expr * LB
DistributeLowerBound - used when composing 'omp distribute' with 'omp for' in a same construct...
Expr * EUB
DistributeEnsureUpperBound - used when composing 'omp distribute' with 'omp for' in a same construct...
Expr * getX()
Get 'x' part of the associated expression/statement.
Expr * getCombinedUpperBoundVariable() const
static OMPTargetTeamsDistributeParallelForDirective * 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)
static bool classof(const Stmt *T)
static bool classof(const Stmt *S)
This represents '#pragma omp cancellation point' directive.
static bool classof(const Stmt *T)
void setCombinedInit(Expr *CombInit)
MutableArrayRef< Expr * > getFinals()
Sets the list of final update expressions for linear variables.
This represents '#pragma omp teams' directive.
Expr * CalcLastIteration
Calculation of last iteration.
This represents '#pragma omp teams distribute simd' combined directive.
static OMPTargetParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
bool isOpenMPWorksharingDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a worksharing directive.
static OMPTaskyieldDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
static OMPTargetEnterDataDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses)
Creates directive with a list of Clauses.
bool hasCancel() const
Return true if current directive has inner cancel directive.
static bool classof(const Stmt *T)
static bool classof(const Stmt *T)
static bool classof(const Stmt *T)
detail::InMemoryDirectory::const_iterator I
static bool classof(const Stmt *T)
Expr * NUB
Update of UpperBound for statically sheduled 'omp for' loops.
Expr * Cond
Loop condition.
static OMPTargetDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
static OMPTeamsDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Expr * PreCond
Loop pre-condition.
static OMPSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
This represents '#pragma omp target parallel for simd' directive.
ArrayRef< Expr * > private_counters()
The expressions built for the OpenMP loop CodeGen for the whole collapsed loop nest.
static OMPTargetSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
OpenMPDirectiveKind getCancelRegion() const
Get cancellation region for the current cancellation point.
static bool classof(const Stmt *T)
This represents '#pragma omp taskgroup' directive.
static OMPTeamsDistributeSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPSingleDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTargetTeamsDistributeDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
bool isPostfixUpdate() const
Return true if 'v' expression must be updated to original value of 'x', false if 'v' must be updated ...
Expr * IterationVarRef
Loop iteration variable.
Expr * Init
Distribute loop iteration variable init used when composing 'omp distribute' with 'omp for' in a same...
Expr * getCombinedNextUpperBound() const
static OMPTeamsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp distribute' directive.
static OMPTargetDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
specific_clause_iterator(ArrayRef< OMPClause * > Clauses)
OMPClause * getClause(unsigned i) const
Returns specified clause.
static OMPTargetTeamsDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
static OMPSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static bool classof(const Stmt *T)
Expr - This represents one expression.
const SpecificClause * operator*() const
MutableArrayRef< Expr * > getUpdates()
Sets the list of update expressions for linear variables.
static unsigned numLoopChildren(unsigned CollapsedNum, OpenMPDirectiveKind Kind)
Children number.
Stmt * IgnoreContainers(bool IgnoreCaptured=false)
Skip no-op (attributed, compound) container stmts and skip captured stmt at the top, if IgnoreCaptured is true.
bool hasCancel() const
Return true if current directive has inner cancel directive.
bool hasCancel() const
Return true if current directive has inner cancel directive.
static OMPDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPMasterDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AssociatedStmt)
Creates directive.
Expr * getIterationVariable() const
This represents '#pragma omp target teams distribute parallel for simd' combined directive.
Expr * getCombinedLowerBoundVariable() const
Expr * getPrevLowerBoundVariable() const
static bool classof(const Stmt *T)
static bool classof(const Stmt *T)
This represents '#pragma omp target teams distribute simd' combined directive.
bool builtAll()
Check if all the expressions are built (does not check the worksharing ones).
static OMPTeamsDistributeParallelForSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
Expr * PrevUB
PreviousUpperBound - local variable passed to runtime in the enclosing schedule or null if that does ...
static OMPOrderedDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive.
const Expr * getUpdateExpr() const
This represents '#pragma omp for' directive.
static OMPTargetEnterDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
static bool classof(const Stmt *T)
ArrayRef< Expr * > private_counters() const
const Stmt * getPreInits() const
ArrayRef< Expr * > finals() const
This represents '#pragma omp target teams' directive.
void setAssociatedStmt(Stmt *S)
Set the associated statement for the directive.
Expr * getIsLastIterVariable() const
static OMPDistributeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
bool isOpenMPTaskLoopDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a taskloop directive.
static bool classof(const Stmt *T)
Expr * getNextUpperBound() const
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 cancel' directive.
void setDistInc(Expr *DistInc)
static OMPTargetDataDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
Expr * NLB
Update of LowerBound for statically sheduled omp loops for outer loop in combined constructs (e...
ArrayRef< Expr * > counters() const
unsigned getNumClauses() const
Get number of clauses.
static OMPDistributeParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTaskLoopDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
specific_clause_iterator & operator++()
StmtIterator child_iterator
Child Iterators: All subclasses must implement 'children' to permit easy iteration over the substatem...
static bool classof(const Stmt *T)
static bool classof(const Stmt *T)
This file defines OpenMP AST classes for clauses.
static bool classof(const Stmt *T)
bool hasClausesOfKind() const
Returns true if the current directive has one or more clauses of a specific kind. ...
This represents '#pragma omp flush' directive.
This represents '#pragma omp parallel for simd' directive.
Expr * NumIterations
Loop number of iterations.
SourceLocation getLocStart() const
Returns starting location of directive kind.
void setLocStart(SourceLocation Loc)
Set starting location of directive kind.
Expr * ST
Stride - local variable passed to runtime.
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 target enter data' directive.
static bool classof(const Stmt *T)
SmallVector< Expr *, 4 > PrivateCounters
PrivateCounters Loop counters.
void setLowerBoundVariable(Expr *LB)
static OMPSectionDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
static bool classof(const Stmt *T)
This captures a statement into a function.
SmallVector< Expr *, 4 > Counters
Counters Loop counters.
This represents '#pragma omp single' directive.
Encodes a location in the source.
void setPrevLowerBoundVariable(Expr *PrevLB)
void setIterationVariable(Expr *IV)
llvm::iterator_range< child_iterator > child_range
MutableArrayRef< Expr * > getInits()
static OMPTaskDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This is a basic class for representing single OpenMP executable directive.
static OMPTeamsDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
static OMPTargetUpdateDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setCombinedNextLowerBound(Expr *CombNLB)
Expr * getLowerBoundVariable() const
Expr * getExpr()
Get 'expr' part of the associated expression/statement.
unsigned getCollapsedNumber() const
Get number of collapsed loops.
OpenMPDirectiveKind
OpenMP directives.
static bool classof(const Stmt *T)
static bool classof(const Stmt *T)
static bool classof(const Stmt *T)
static OMPAtomicDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTeamsDistributeDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static bool classof(const Stmt *T)
This represents '#pragma omp taskwait' directive.
Expr * PrevEUB
PrevEUB - expression similar to EUB but to be used when loop scheduling uses PrevLB and PrevUB (e...
This is a basic class for representing single OpenMP clause.
static OMPOrderedDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
bool isOpenMPLoopBoundSharingDirective(OpenMPDirectiveKind Kind)
Checks if the specified directive kind is one of the composite or combined directives that need loop ...
static bool classof(const Stmt *T)
This represents '#pragma omp target' directive.
static OMPTeamsDistributeParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setClauses(ArrayRef< OMPClause * > Clauses)
Sets the list of variables for this clause.
static OMPForDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel)
Creates directive with a list of Clauses.
Expr * getUpperBoundVariable() const
Expr * getV()
Get 'v' part of the associated expression/statement.
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.
DistCombinedHelperExprs DistCombinedFields
Expressions used when combining OpenMP loop pragmas.
This represents '#pragma omp ordered' directive.
Expr * LB
LowerBound - local variable passed to runtime.
const SpecificClause * getSingleClause() const
Gets a single clause of the specified kind associated with the current directive iff there is only on...
void clear(unsigned Size)
Initialize all the fields to null.
This represents '#pragma omp target update' directive.
Expr * Init
Loop iteration variable init.
Expr * getPrevEnsureUpperBound() const
Expr * getPreCond() const
void setPrivateCounters(ArrayRef< Expr * > A)
static OMPTaskDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, bool HasCancel)
Creates directive with a list of Clauses.
static OMPParallelForSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
void setPrevUpperBoundVariable(Expr *PrevUB)
void setCombinedEnsureUpperBound(Expr *CombEUB)
static OMPForDirective * 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)
Expr * getCombinedNextLowerBound() const
SmallVector< Expr *, 4 > Inits
Expressions for loop counters inits for CodeGen.
static bool classof(const Stmt *T)
void setCombinedUpperBoundVariable(Expr *CombUB)
static bool classof(const Stmt *T)
bool hasCancel() const
Return true if current directive has inner cancel directive.
static OMPTargetTeamsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp section' directive.
This represents '#pragma omp teams distribute' directive.
ArrayRef< Expr * > inits() const
const Stmt * getBody() const
This represents '#pragma omp simd' directive.
DeclarationNameInfo getDirectiveName() const
Return name of the directive.
Expr * getEnsureUpperBound() const
detail::InMemoryDirectory::const_iterator E
Expr * getUpdateExpr()
Get helper expression of the form 'OpaqueValueExpr(x) binop OpaqueValueExpr(expr)' or 'OpaqueValueExp...
static bool classof(const Stmt *T)
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnd...
This represents '#pragma omp atomic' directive.
Expr * getCalcLastIteration() const
ArrayRef< Expr * > counters()
Iterates over a filtered subrange of clauses applied to a directive.
static OMPForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void getOpenMPCaptureRegions(llvm::SmallVectorImpl< OpenMPDirectiveKind > &CaptureRegions, OpenMPDirectiveKind DKind)
Return the captured regions of an OpenMP directive.
bool isOpenMPDistributeDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a distribute directive.
static OMPBarrierDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
static bool classof(const Stmt *T)
ArrayRef< Expr * > inits()
static bool classof(const Stmt *T)
Expr * Inc
Loop increment.
static OMPForSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
ArrayRef< Expr * > updates() const
static OMPTargetTeamsDistributeSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPSingleDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
static OMPTargetTeamsDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
bool hasAssociatedStmt() const
Returns true if directive has associated statement.
Expr * UB
DistributeUpperBound - used when composing 'omp distribute' with 'omp for' in a same construct...
X
Add a minimal nested name specifier fixit hint to allow lookup of a tag name from an outer enclosing ...
static OMPTargetTeamsDistributeParallelForDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPTaskyieldDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc)
Creates directive.
Expr * getNextLowerBound() const
Expr * UB
UpperBound - local variable passed to runtime.
Defines the clang::SourceLocation class and associated facilities.
static bool classof(const Stmt *T)
This represents '#pragma omp target parallel' directive.
static llvm::iterator_range< specific_clause_iterator< SpecificClause > > getClausesOfKind(ArrayRef< OMPClause * > Clauses)
void setStrideVariable(Expr *ST)
static bool classof(const Stmt *T)
static OMPParallelSectionsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPBarrierDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc)
Creates directive.
void setUpdates(ArrayRef< Expr * > A)
static OMPSectionsDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, bool HasCancel)
Creates directive with a list of Clauses.
static bool classof(const Stmt *T)
This represents '#pragma omp taskloop simd' directive.
static OMPSectionsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static bool classof(const Stmt *T)
bool hasCancel() const
Return true if current directive has inner cancel directive.
void setPreCond(Expr *PC)
static OMPCancelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
bool hasCancel() const
Return true if current directive has inner cancel directive.
static OMPTaskwaitDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc)
Creates directive.
OMPExecutableDirective(const T *, StmtClass SC, OpenMPDirectiveKind K, SourceLocation StartLoc, SourceLocation EndLoc, unsigned NumClauses, unsigned NumChildren)
Build instance of directive of class K.
This represents '#pragma omp sections' directive.
Expr * Cond
Distribute Loop condition used when composing 'omp distribute' with 'omp for' in a same construct...
Stmt * PreInits
Init statement for all captured expressions.
This represents '#pragma omp target data' directive.
void setNextUpperBound(Expr *NUB)
static bool classof(const Stmt *T)
Expr * getLastIteration() const
Expr * getCombinedCond() const
static OMPTargetParallelDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
static OMPTeamsDistributeParallelForDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
Expr * IL
IsLastIteration - local flag variable passed to runtime.
This represents '#pragma omp taskyield' directive.
This represents '#pragma omp distribute parallel for simd' composite directive.
static OMPCancellationPointDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, OpenMPDirectiveKind CancelRegion)
Creates directive.
static OMPFlushDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses)
Creates directive with a list of Clauses.
This represents '#pragma omp parallel sections' directive.
void setCalcLastIteration(Expr *CLI)
SourceLocation getLocEnd() const
Returns ending location of directive.
Stmt * getAssociatedStmt() const
Returns statement associated with the directive.
Expr * getDistInc() const
void setCombinedNextUpperBound(Expr *CombNUB)
const Expr * getX() const
void setLocEnd(SourceLocation Loc)
Set ending location of directive.
static OMPTargetSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPTeamsDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setInits(ArrayRef< Expr * > A)
static bool classof(const Stmt *T)
This represents '#pragma omp target parallel for' directive.
static OMPParallelDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, bool HasCancel)
Creates directive with a list of Clauses.
static OMPTargetTeamsDistributeParallelForSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPCancellationPointDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Expr * getStrideVariable() const
This represents '#pragma omp taskloop' directive.