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),
73 ClausesOffset(llvm::alignTo(sizeof(T), llvm::alignOf<
OMPClause *>())) {}
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();
198 return const_cast<Stmt *
>(*child_begin());
204 return S->getStmtClass() >= firstOMPExecutableDirectiveConstant &&
205 S->getStmtClass() <= lastOMPExecutableDirectiveConstant;
210 return child_range(child_iterator(), child_iterator());
211 Stmt **ChildStorage =
reinterpret_cast<Stmt **
>(getClauses().end());
212 return child_range(ChildStorage, ChildStorage + NumChildren);
244 StartLoc, EndLoc, NumClauses, 1),
258 void setHasCancel(
bool Has) { HasCancel = Has; }
270 static OMPParallelDirective *
272 ArrayRef<OMPClause *> Clauses,
Stmt *AssociatedStmt,
bool HasCancel);
280 unsigned NumClauses, EmptyShell);
286 return T->getStmtClass() == OMPParallelDirectiveClass;
296 unsigned CollapsedNum;
309 AssociatedStmtOffset = 0,
310 IterationVariableOffset = 1,
311 LastIterationOffset = 2,
312 CalcLastIterationOffset = 3,
313 PreConditionOffset = 4,
323 IsLastIterVariableOffset = 9,
324 LowerBoundVariableOffset = 10,
325 UpperBoundVariableOffset = 11,
326 StrideVariableOffset = 12,
327 EnsureUpperBoundOffset = 13,
328 NextLowerBoundOffset = 14,
329 NextUpperBoundOffset = 15,
330 NumIterationsOffset = 16,
331 PrevLowerBoundVariableOffset = 17,
332 PrevUpperBoundVariableOffset = 18,
340 Expr **Storage =
reinterpret_cast<Expr **
>(
346 MutableArrayRef<Expr *> getPrivateCounters() {
347 Expr **Storage =
reinterpret_cast<Expr **
>(&*std::next(
349 return MutableArrayRef<Expr *>(Storage, CollapsedNum);
353 MutableArrayRef<Expr *>
getInits() {
354 Expr **Storage =
reinterpret_cast<Expr **
>(
355 &*std::next(child_begin(),
357 return MutableArrayRef<Expr *>(Storage, CollapsedNum);
362 Expr **Storage =
reinterpret_cast<Expr **
>(
363 &*std::next(child_begin(),
365 return MutableArrayRef<Expr *>(Storage, CollapsedNum);
370 Expr **Storage =
reinterpret_cast<Expr **
>(
371 &*std::next(child_begin(),
373 return MutableArrayRef<Expr *>(Storage, CollapsedNum);
387 template <
typename T>
390 unsigned CollapsedNum,
unsigned NumClauses,
391 unsigned NumSpecialChildren = 0)
395 CollapsedNum(CollapsedNum) {}
415 *std::next(child_begin(), IterationVariableOffset) = IV;
418 *std::next(child_begin(), LastIterationOffset) = LI;
421 *std::next(child_begin(), CalcLastIterationOffset) = CLI;
424 *std::next(child_begin(), PreConditionOffset) = PC;
427 *std::next(child_begin(), CondOffset) = Cond;
429 void setInit(
Expr *Init) { *std::next(child_begin(), InitOffset) = Init; }
430 void setInc(
Expr *Inc) { *std::next(child_begin(), IncOffset) = Inc; }
432 *std::next(child_begin(), PreInitsOffset) = PreInits;
438 "expected worksharing loop directive");
439 *std::next(child_begin(), IsLastIterVariableOffset) = IL;
445 "expected worksharing loop directive");
446 *std::next(child_begin(), LowerBoundVariableOffset) = LB;
452 "expected worksharing loop directive");
453 *std::next(child_begin(), UpperBoundVariableOffset) = UB;
459 "expected worksharing loop directive");
460 *std::next(child_begin(), StrideVariableOffset) = ST;
466 "expected worksharing loop directive");
467 *std::next(child_begin(), EnsureUpperBoundOffset) = EUB;
473 "expected worksharing loop directive");
474 *std::next(child_begin(), NextLowerBoundOffset) = NLB;
480 "expected worksharing loop directive");
481 *std::next(child_begin(), NextUpperBoundOffset) = NUB;
487 "expected worksharing loop directive");
488 *std::next(child_begin(), NumIterationsOffset) = NI;
494 "expected worksharing loop directive");
495 *std::next(child_begin(), PrevLowerBoundVariableOffset) = PrevLB;
501 "expected worksharing loop directive");
502 *std::next(child_begin(), PrevUpperBoundVariableOffset) = PrevUB;
568 Cond !=
nullptr &&
Init !=
nullptr &&
Inc !=
nullptr;
596 for (
unsigned i = 0; i < Size; ++i) {
611 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
612 *std::next(child_begin(), IterationVariableOffset)));
615 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
616 *std::next(child_begin(), LastIterationOffset)));
619 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
620 *std::next(child_begin(), CalcLastIterationOffset)));
623 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
624 *std::next(child_begin(), PreConditionOffset)));
627 return const_cast<Expr *
>(
628 reinterpret_cast<const Expr *
>(*std::next(child_begin(), CondOffset)));
631 return const_cast<Expr *
>(
632 reinterpret_cast<const Expr *
>(*std::next(child_begin(), InitOffset)));
635 return const_cast<Expr *
>(
636 reinterpret_cast<const Expr *
>(*std::next(child_begin(), IncOffset)));
639 return *std::next(child_begin(), PreInitsOffset);
646 "expected worksharing loop directive");
647 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
648 *std::next(child_begin(), IsLastIterVariableOffset)));
654 "expected worksharing loop directive");
655 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
656 *std::next(child_begin(), LowerBoundVariableOffset)));
662 "expected worksharing loop directive");
663 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
664 *std::next(child_begin(), UpperBoundVariableOffset)));
670 "expected worksharing loop directive");
671 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
672 *std::next(child_begin(), StrideVariableOffset)));
678 "expected worksharing loop directive");
679 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
680 *std::next(child_begin(), EnsureUpperBoundOffset)));
686 "expected worksharing loop directive");
687 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
688 *std::next(child_begin(), NextLowerBoundOffset)));
694 "expected worksharing loop directive");
695 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
696 *std::next(child_begin(), NextUpperBoundOffset)));
702 "expected worksharing loop directive");
703 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
704 *std::next(child_begin(), NumIterationsOffset)));
710 "expected worksharing loop directive");
711 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
712 *std::next(child_begin(), PrevLowerBoundVariableOffset)));
718 "expected worksharing loop directive");
719 return const_cast<Expr *
>(
reinterpret_cast<const Expr *
>(
720 *std::next(child_begin(), PrevUpperBoundVariableOffset)));
725 Body = cast<ForStmt>(Body)->
getBody();
726 for (
unsigned Cnt = 1; Cnt < CollapsedNum; ++Cnt) {
727 Body = Body->IgnoreContainers();
728 Body = cast<ForStmt>(Body)->
getBody();
764 return T->getStmtClass() == OMPSimdDirectiveClass ||
765 T->getStmtClass() == OMPForDirectiveClass ||
766 T->getStmtClass() == OMPForSimdDirectiveClass ||
767 T->getStmtClass() == OMPParallelForDirectiveClass ||
768 T->getStmtClass() == OMPParallelForSimdDirectiveClass ||
769 T->getStmtClass() == OMPTaskLoopDirectiveClass ||
770 T->getStmtClass() == OMPTaskLoopSimdDirectiveClass ||
771 T->getStmtClass() == OMPDistributeDirectiveClass ||
772 T->getStmtClass() == OMPTargetParallelForDirectiveClass ||
773 T->getStmtClass() == OMPDistributeParallelForDirectiveClass ||
774 T->getStmtClass() == OMPDistributeParallelForSimdDirectiveClass ||
775 T->getStmtClass() == OMPDistributeSimdDirectiveClass ||
776 T->getStmtClass() == OMPTargetParallelForSimdDirectiveClass;
799 unsigned CollapsedNum,
unsigned NumClauses)
801 EndLoc, CollapsedNum, NumClauses) {}
825 SourceLocation EndLoc,
unsigned CollapsedNum,
826 ArrayRef<OMPClause *> Clauses,
827 Stmt *AssociatedStmt,
828 const HelperExprs &Exprs);
838 unsigned CollapsedNum, EmptyShell);
841 return T->getStmtClass() == OMPSimdDirectiveClass;
868 unsigned CollapsedNum,
unsigned NumClauses)
870 CollapsedNum, NumClauses),
884 void setHasCancel(
bool Has) { HasCancel = Has; }
899 SourceLocation EndLoc,
unsigned CollapsedNum,
900 ArrayRef<OMPClause *> Clauses,
901 Stmt *AssociatedStmt,
const HelperExprs &Exprs,
912 unsigned CollapsedNum, EmptyShell);
918 return T->getStmtClass() == OMPForDirectiveClass;
941 unsigned CollapsedNum,
unsigned NumClauses)
943 StartLoc, EndLoc, CollapsedNum, NumClauses) {}
966 static OMPForSimdDirective *
968 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
969 Stmt *AssociatedStmt,
const HelperExprs &Exprs);
980 unsigned CollapsedNum, EmptyShell);
983 return T->getStmtClass() == OMPForSimdDirectiveClass;
1009 unsigned NumClauses)
1011 StartLoc, EndLoc, NumClauses, 1),
1025 void setHasCancel(
bool Has) { HasCancel = Has; }
1037 static OMPSectionsDirective *
1039 ArrayRef<OMPClause *> Clauses,
Stmt *AssociatedStmt,
bool HasCancel);
1048 unsigned NumClauses, EmptyShell);
1054 return T->getStmtClass() == OMPSectionsDirectiveClass;
1077 StartLoc, EndLoc, 0, 1),
1097 SourceLocation StartLoc,
1098 SourceLocation EndLoc,
1099 Stmt *AssociatedStmt,
bool HasCancel);
1114 return T->getStmtClass() == OMPSectionDirectiveClass;
1135 unsigned NumClauses)
1137 StartLoc, EndLoc, NumClauses, 1) {}
1157 static OMPSingleDirective *
1159 ArrayRef<OMPClause *> Clauses,
Stmt *AssociatedStmt);
1168 unsigned NumClauses, EmptyShell);
1171 return T->getStmtClass() == OMPSingleDirectiveClass;
1190 StartLoc, EndLoc, 0, 1) {}
1207 SourceLocation StartLoc,
1208 SourceLocation EndLoc,
1209 Stmt *AssociatedStmt);
1218 return T->getStmtClass() == OMPMasterDirectiveClass;
1242 StartLoc, EndLoc, NumClauses, 1),
1259 void setDirectiveName(
const DeclarationNameInfo &
Name) { DirName =
Name; }
1271 static OMPCriticalDirective *
1273 SourceLocation StartLoc, SourceLocation EndLoc,
1274 ArrayRef<OMPClause *> Clauses,
Stmt *AssociatedStmt);
1282 unsigned NumClauses, EmptyShell);
1289 return T->getStmtClass() == OMPCriticalDirectiveClass;
1316 unsigned CollapsedNum,
unsigned NumClauses)
1318 StartLoc, EndLoc, CollapsedNum, NumClauses),
1333 void setHasCancel(
bool Has) { HasCancel = Has; }
1347 static OMPParallelForDirective *
1349 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
1350 Stmt *AssociatedStmt,
const HelperExprs &Exprs,
bool HasCancel);
1360 unsigned NumClauses,
1361 unsigned CollapsedNum,
1368 return T->getStmtClass() == OMPParallelForDirectiveClass;
1392 unsigned CollapsedNum,
unsigned NumClauses)
1394 OMPD_parallel_for_simd, StartLoc, EndLoc, CollapsedNum,
1403 unsigned NumClauses)
1419 static OMPParallelForSimdDirective *
1421 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
1422 Stmt *AssociatedStmt,
const HelperExprs &Exprs);
1432 unsigned NumClauses,
1433 unsigned CollapsedNum,
1437 return T->getStmtClass() == OMPParallelForSimdDirectiveClass;
1463 unsigned NumClauses)
1465 OMPD_parallel_sections, StartLoc, EndLoc,
1480 void setHasCancel(
bool Has) { HasCancel = Has; }
1492 static OMPParallelSectionsDirective *
1494 ArrayRef<OMPClause *> Clauses,
Stmt *AssociatedStmt,
bool HasCancel);
1502 static OMPParallelSectionsDirective *
1509 return T->getStmtClass() == OMPParallelSectionsDirectiveClass;
1533 unsigned NumClauses)
1535 EndLoc, NumClauses, 1),
1549 void setHasCancel(
bool Has) { HasCancel = Has; }
1562 SourceLocation EndLoc,
1563 ArrayRef<OMPClause *> Clauses,
1564 Stmt *AssociatedStmt,
bool HasCancel);
1579 return T->getStmtClass() == OMPTaskDirectiveClass;
1598 StartLoc, EndLoc, 0, 0) {}
1613 static OMPTaskyieldDirective *
1623 return T->getStmtClass() == OMPTaskyieldDirectiveClass;
1642 StartLoc, EndLoc, 0, 0) {}
1657 static OMPBarrierDirective *
1667 return T->getStmtClass() == OMPBarrierDirectiveClass;
1686 StartLoc, EndLoc, 0, 0) {}
1701 static OMPTaskwaitDirective *
1711 return T->getStmtClass() == OMPTaskwaitDirectiveClass;
1730 StartLoc, EndLoc, 0, 1) {}
1747 SourceLocation StartLoc,
1748 SourceLocation EndLoc,
1749 Stmt *AssociatedStmt);
1758 return T->getStmtClass() == OMPTaskgroupDirectiveClass;
1781 unsigned NumClauses)
1783 StartLoc, EndLoc, NumClauses, 0) {}
1804 SourceLocation EndLoc,
1805 ArrayRef<OMPClause *> Clauses);
1814 unsigned NumClauses, EmptyShell);
1817 return T->getStmtClass() == OMPFlushDirectiveClass;
1836 unsigned NumClauses)
1838 StartLoc, EndLoc, NumClauses, 1) {}
1858 static OMPOrderedDirective *
1860 ArrayRef<OMPClause *> Clauses,
Stmt *AssociatedStmt);
1868 unsigned NumClauses, EmptyShell);
1871 return T->getStmtClass() == OMPOrderedDirectiveClass;
1893 bool IsXLHSInRHSPart;
1902 bool IsPostfixUpdate;
1911 unsigned NumClauses)
1913 StartLoc, EndLoc, NumClauses, 5),
1914 IsXLHSInRHSPart(
false), IsPostfixUpdate(
false) {}
1924 IsXLHSInRHSPart(
false), IsPostfixUpdate(
false) {}
1927 void setX(Expr *
X) { *std::next(child_begin()) =
X; }
1931 void setUpdateExpr(Expr *UE) { *std::next(child_begin(), 2) = UE; }
1933 void setV(Expr *V) { *std::next(child_begin(), 3) = V; }
1935 void setExpr(Expr *
E) { *std::next(child_begin(), 4) =
E; }
1957 static OMPAtomicDirective *
1959 ArrayRef<OMPClause *> Clauses,
Stmt *AssociatedStmt, Expr *X, Expr *V,
1960 Expr *E, Expr *UE,
bool IsXLHSInRHSPart,
bool IsPostfixUpdate);
1969 unsigned NumClauses, EmptyShell);
1972 Expr *
getX() {
return cast_or_null<Expr>(*std::next(child_begin())); }
1974 return cast_or_null<Expr>(*std::next(child_begin()));
1980 return cast_or_null<Expr>(*std::next(child_begin(), 2));
1983 return cast_or_null<Expr>(*std::next(child_begin(), 2));
1993 Expr *
getV() {
return cast_or_null<Expr>(*std::next(child_begin(), 3)); }
1995 return cast_or_null<Expr>(*std::next(child_begin(), 3));
1998 Expr *
getExpr() {
return cast_or_null<Expr>(*std::next(child_begin(), 4)); }
2000 return cast_or_null<Expr>(*std::next(child_begin(), 4));
2004 return T->getStmtClass() == OMPAtomicDirectiveClass;
2025 unsigned NumClauses)
2027 StartLoc, EndLoc, NumClauses, 1) {}
2047 static OMPTargetDirective *
2049 ArrayRef<OMPClause *> Clauses,
Stmt *AssociatedStmt);
2058 unsigned NumClauses, EmptyShell);
2061 return T->getStmtClass() == OMPTargetDirectiveClass;
2083 unsigned NumClauses)
2085 OMPD_target_data, StartLoc, EndLoc, NumClauses,
2106 static OMPTargetDataDirective *
2108 ArrayRef<OMPClause *> Clauses,
Stmt *AssociatedStmt);
2119 return T->getStmtClass() == OMPTargetDataDirectiveClass;
2141 unsigned NumClauses)
2143 OMPD_target_enter_data, StartLoc, EndLoc,
2165 SourceLocation StartLoc,
2166 SourceLocation EndLoc,
2167 ArrayRef<OMPClause *> Clauses);
2175 unsigned N, EmptyShell);
2178 return T->getStmtClass() == OMPTargetEnterDataDirectiveClass;
2200 unsigned NumClauses)
2202 OMPD_target_exit_data, StartLoc, EndLoc,
2224 SourceLocation StartLoc,
2225 SourceLocation EndLoc,
2226 ArrayRef<OMPClause *> Clauses);
2234 unsigned N, EmptyShell);
2237 return T->getStmtClass() == OMPTargetExitDataDirectiveClass;
2258 unsigned NumClauses)
2260 OMPD_target_parallel, StartLoc, EndLoc,
2282 static OMPTargetParallelDirective *
2284 ArrayRef<OMPClause *> Clauses,
Stmt *AssociatedStmt);
2292 static OMPTargetParallelDirective *
2296 return T->getStmtClass() == OMPTargetParallelDirectiveClass;
2323 unsigned CollapsedNum,
unsigned NumClauses)
2325 OMPD_target_parallel_for, StartLoc, EndLoc,
2326 CollapsedNum, NumClauses),
2335 unsigned NumClauses)
2342 void setHasCancel(
bool Has) { HasCancel = Has; }
2356 static OMPTargetParallelForDirective *
2358 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
2359 Stmt *AssociatedStmt,
const HelperExprs &Exprs,
bool HasCancel);
2369 unsigned NumClauses,
2370 unsigned CollapsedNum,
2377 return T->getStmtClass() == OMPTargetParallelForDirectiveClass;
2398 unsigned NumClauses)
2400 StartLoc, EndLoc, NumClauses, 1) {}
2421 SourceLocation EndLoc,
2422 ArrayRef<OMPClause *> Clauses,
2423 Stmt *AssociatedStmt);
2432 unsigned NumClauses, EmptyShell);
2435 return T->getStmtClass() == OMPTeamsDirectiveClass;
2456 OMPD_cancellation_point, StartLoc, EndLoc, 0, 0),
2478 static OMPCancellationPointDirective *
2493 return T->getStmtClass() == OMPCancellationPointDirectiveClass;
2514 unsigned NumClauses)
2516 StartLoc, EndLoc, NumClauses, 0),
2540 static OMPCancelDirective *
2550 unsigned NumClauses, EmptyShell);
2556 return T->getStmtClass() == OMPCancelDirectiveClass;
2579 unsigned CollapsedNum,
unsigned NumClauses)
2581 StartLoc, EndLoc, CollapsedNum, NumClauses) {}
2604 static OMPTaskLoopDirective *
2606 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
2607 Stmt *AssociatedStmt,
const HelperExprs &Exprs);
2617 unsigned NumClauses,
2618 unsigned CollapsedNum, EmptyShell);
2621 return T->getStmtClass() == OMPTaskLoopDirectiveClass;
2644 unsigned CollapsedNum,
unsigned NumClauses)
2646 OMPD_taskloop_simd, StartLoc, EndLoc, CollapsedNum,
2657 CollapsedNum, NumClauses) {}
2670 static OMPTaskLoopSimdDirective *
2672 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
2673 Stmt *AssociatedStmt,
const HelperExprs &Exprs);
2683 unsigned NumClauses,
2684 unsigned CollapsedNum,
2688 return T->getStmtClass() == OMPTaskLoopSimdDirectiveClass;
2711 unsigned CollapsedNum,
unsigned NumClauses)
2713 StartLoc, EndLoc, CollapsedNum, NumClauses)
2738 static OMPDistributeDirective *
2740 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
2741 Stmt *AssociatedStmt,
const HelperExprs &Exprs);
2751 unsigned NumClauses,
2752 unsigned CollapsedNum, EmptyShell);
2755 return T->getStmtClass() == OMPDistributeDirectiveClass;
2777 unsigned NumClauses)
2779 OMPD_target_update, StartLoc, EndLoc, NumClauses,
2800 SourceLocation StartLoc,
2801 SourceLocation EndLoc,
2802 ArrayRef<OMPClause *> Clauses);
2811 unsigned NumClauses, EmptyShell);
2814 return T->getStmtClass() == OMPTargetUpdateDirectiveClass;
2839 unsigned CollapsedNum,
unsigned NumClauses)
2841 OMPD_distribute_parallel_for, StartLoc, EndLoc,
2842 CollapsedNum, NumClauses) {}
2850 unsigned NumClauses)
2866 static OMPDistributeParallelForDirective *
2868 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
2869 Stmt *AssociatedStmt,
const HelperExprs &Exprs);
2879 unsigned NumClauses,
2880 unsigned CollapsedNum,
2884 return T->getStmtClass() == OMPDistributeParallelForDirectiveClass;
2909 unsigned CollapsedNum,
2910 unsigned NumClauses)
2912 OMPD_distribute_parallel_for_simd, StartLoc,
2913 EndLoc, CollapsedNum, NumClauses) {}
2921 unsigned NumClauses)
2923 OMPD_distribute_parallel_for_simd,
2938 static OMPDistributeParallelForSimdDirective *
Create(
2939 const ASTContext &
C, SourceLocation StartLoc, SourceLocation EndLoc,
2940 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
2941 Stmt *AssociatedStmt,
const HelperExprs &Exprs);
2949 static OMPDistributeParallelForSimdDirective *
CreateEmpty(
2950 const ASTContext &
C,
unsigned NumClauses,
unsigned CollapsedNum,
2954 return T->getStmtClass() == OMPDistributeParallelForSimdDirectiveClass;
2977 unsigned CollapsedNum,
unsigned NumClauses)
2979 OMPD_distribute_simd, StartLoc, EndLoc, CollapsedNum,
2988 unsigned NumClauses)
3004 static OMPDistributeSimdDirective *
3006 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3007 Stmt *AssociatedStmt,
const HelperExprs &Exprs);
3016 unsigned NumClauses,
3017 unsigned CollapsedNum,
3021 return T->getStmtClass() == OMPDistributeSimdDirectiveClass;
3045 unsigned CollapsedNum,
unsigned NumClauses)
3047 OMPD_target_parallel_for_simd, StartLoc, EndLoc,
3048 CollapsedNum, NumClauses) {}
3056 unsigned NumClauses)
3072 static OMPTargetParallelForSimdDirective *
3074 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses,
3075 Stmt *AssociatedStmt,
const HelperExprs &Exprs);
3084 unsigned NumClauses,
3085 unsigned CollapsedNum,
3089 return T->getStmtClass() == OMPTargetParallelForSimdDirectiveClass;
void setPreInits(Stmt *PreInits)
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.
SmallVector< Expr *, 4 > Updates
Expressions for loop counters update for CodeGen.
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.
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.
static bool classof(const Stmt *T)
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.
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 LB = min(LB, NumIterations).
static OMPTargetUpdateDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses)
Creates directive with a list of Clauses.
static OMPSectionDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AssociatedStmt, bool HasCancel)
Creates directive.
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...
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.
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 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.
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 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.
class LLVM_ALIGNAS(8) DependentTemplateSpecializationType const IdentifierInfo * Name
Represents a template specialization type whose template cannot be resolved, e.g. ...
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.
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 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.
static OMPCancelDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, OpenMPDirectiveKind CancelRegion)
Creates directive.
ArrayRef< Expr * > finals()
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 * getX()
Get 'x' part of the associated expression/statement.
static bool classof(const Stmt *S)
This represents '#pragma omp cancellation point' directive.
static bool classof(const Stmt *T)
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.
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.
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.
OpenMPDirectiveKind getCancelRegion() const
Get cancellation region for the current cancellation point.
static OMPTaskgroupDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
static bool classof(const Stmt *T)
This represents '#pragma omp taskgroup' directive.
static OMPSingleDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses 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.
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 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.
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
Expr * getPrevLowerBoundVariable() const
static bool classof(const Stmt *T)
static bool classof(const Stmt *T)
bool builtAll()
Check if all the expressions are built (does not check the worksharing ones).
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
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.
static OMPTargetDataDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
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++()
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.
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)
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)
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.
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 OMPAtomicDirective * 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 taskwait' directive.
This is a basic class for representing single OpenMP clause.
static OMPOrderedDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
This represents '#pragma omp target' directive.
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)
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 * 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)
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)
SmallVector< Expr *, 4 > Inits
Expressions for loop counters inits for CodeGen.
static bool classof(const Stmt *T)
static bool classof(const Stmt *T)
bool hasCancel() const
Return true if current directive has inner cancel directive.
This represents '#pragma omp section' 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...
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.
bool isOpenMPDistributeDirective(OpenMPDirectiveKind DKind)
Checks if the specified directive is a distribute directive.
static OMPBarrierDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
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 OMPSingleDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
bool hasAssociatedStmt() const
Returns true if directive has associated statement.
X
Add a minimal nested name specifier fixit hint to allow lookup of a tag name from an outer enclosing ...
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.
static OMPTaskgroupDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AssociatedStmt)
Creates 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.
Stmt * PreInits
Init statement for all captured expressions.
This represents '#pragma omp target data' directive.
void setNextUpperBound(Expr *NUB)
Expr * getLastIteration() const
static OMPTargetParallelDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
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.
const Expr * getX() const
void setLocEnd(SourceLocation Loc)
Set ending location of directive.
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 OMPCancellationPointDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Expr * getStrideVariable() const
This represents '#pragma omp taskloop' directive.