17 using namespace clang;
21 "Number of clauses is not the same as the preallocated buffer");
22 std::copy(Clauses.begin(), Clauses.end(), getClauses().begin());
29 if (isa<OMPTargetEnterDataDirective>(
this) ||
30 isa<OMPTargetExitDataDirective>(
this) ||
31 isa<OMPTargetUpdateDirective>(
this))
38 "Standalone Executable Directives don't have Structured Blocks.");
39 if (
auto *LD = dyn_cast<OMPLoopDirective>(
this))
45 assert(A.size() == getCollapsedNumber() &&
46 "Number of loop counters is not the same as the collapsed number");
47 std::copy(A.begin(), A.end(), getCounters().begin());
51 assert(A.size() == getCollapsedNumber() &&
"Number of loop private counters " 52 "is not the same as the collapsed " 54 std::copy(A.begin(), A.end(), getPrivateCounters().begin());
58 assert(A.size() == getCollapsedNumber() &&
59 "Number of counter inits is not the same as the collapsed number");
60 std::copy(A.begin(), A.end(),
getInits().begin());
64 assert(A.size() == getCollapsedNumber() &&
65 "Number of counter updates is not the same as the collapsed number");
66 std::copy(A.begin(), A.end(),
getUpdates().begin());
70 assert(A.size() == getCollapsedNumber() &&
71 "Number of counter finals is not the same as the collapsed number");
72 std::copy(A.begin(), A.end(),
getFinals().begin());
86 Dir->setHasCancel(HasCancel);
108 sizeof(
Stmt *) * numLoopChildren(CollapsedNum, OMPD_simd));
131 unsigned CollapsedNum,
136 sizeof(
Stmt *) * numLoopChildren(CollapsedNum, OMPD_simd));
148 sizeof(
Stmt *) * numLoopChildren(CollapsedNum, OMPD_for));
150 new (Mem)
OMPForDirective(StartLoc, EndLoc, CollapsedNum, Clauses.size());
174 Dir->setHasCancel(HasCancel);
180 unsigned CollapsedNum,
185 sizeof(
Stmt *) * numLoopChildren(CollapsedNum, OMPD_for));
198 sizeof(
Stmt *) * numLoopChildren(CollapsedNum, OMPD_for_simd));
229 unsigned CollapsedNum,
235 sizeof(
Stmt *) * numLoopChildren(CollapsedNum, OMPD_for_simd));
250 Dir->setHasCancel(HasCancel);
267 Stmt *AssociatedStmt,
288 Stmt *AssociatedStmt) {
313 Stmt *AssociatedStmt) {
361 numLoopChildren(CollapsedNum, OMPD_parallel_for));
387 Dir->setHasCancel(HasCancel);
398 numLoopChildren(CollapsedNum, OMPD_parallel_for));
409 Size +
sizeof(
OMPClause *) * Clauses.size() +
410 sizeof(
Stmt *) * numLoopChildren(CollapsedNum, OMPD_parallel_for_simd));
412 StartLoc, EndLoc, CollapsedNum, Clauses.size());
446 Size +
sizeof(
OMPClause *) * NumClauses +
447 sizeof(
Stmt *) * numLoopChildren(CollapsedNum, OMPD_parallel_for_simd));
462 Dir->setHasCancel(HasCancel);
479 Stmt *AssociatedStmt,
bool HasCancel) {
487 Dir->setHasCancel(HasCancel);
553 Dir->setReductionRef(ReductionRef);
576 Dir->setCancelRegion(CancelRegion);
599 Dir->setCancelRegion(CancelRegion);
639 Stmt *AssociatedStmt) {
664 Expr *E,
Expr *UE,
bool IsXLHSInRHSPart,
bool IsPostfixUpdate) {
676 Dir->setUpdateExpr(UE);
677 Dir->IsXLHSInRHSPart = IsXLHSInRHSPart;
678 Dir->IsPostfixUpdate = IsPostfixUpdate;
696 Stmt *AssociatedStmt) {
749 Size +
sizeof(
OMPClause *) * Clauses.size() +
750 sizeof(
Stmt *) * numLoopChildren(CollapsedNum, OMPD_target_parallel_for));
752 StartLoc, EndLoc, CollapsedNum, Clauses.size());
776 Dir->setHasCancel(HasCancel);
787 Size +
sizeof(
OMPClause *) * NumClauses +
788 sizeof(
Stmt *) * numLoopChildren(CollapsedNum, OMPD_target_parallel_for));
862 Stmt *AssociatedStmt) {
892 sizeof(
Stmt *) * numLoopChildren(CollapsedNum, OMPD_taskloop));
923 unsigned CollapsedNum,
929 sizeof(
Stmt *) * numLoopChildren(CollapsedNum, OMPD_taskloop));
941 numLoopChildren(CollapsedNum, OMPD_taskloop_simd));
977 numLoopChildren(CollapsedNum, OMPD_taskloop_simd));
989 numLoopChildren(CollapsedNum, OMPD_distribute));
1025 numLoopChildren(CollapsedNum, OMPD_distribute));
1060 Size +
sizeof(
OMPClause *) * Clauses.size() +
1062 numLoopChildren(CollapsedNum, OMPD_distribute_parallel_for));
1065 CollapsedNum, Clauses.size());
1102 Dir->HasCancel = HasCancel;
1108 unsigned NumClauses,
1109 unsigned CollapsedNum,
1114 Size +
sizeof(
OMPClause *) * NumClauses +
1116 numLoopChildren(CollapsedNum, OMPD_distribute_parallel_for));
1128 Size +
sizeof(
OMPClause *) * Clauses.size() +
1130 numLoopChildren(CollapsedNum, OMPD_distribute_parallel_for_simd));
1175 unsigned NumClauses,
1176 unsigned CollapsedNum,
1181 Size +
sizeof(
OMPClause *) * NumClauses +
1183 numLoopChildren(CollapsedNum, OMPD_distribute_parallel_for_simd));
1195 Size +
sizeof(
OMPClause *) * Clauses.size() +
1197 numLoopChildren(CollapsedNum, OMPD_distribute_simd));
1199 StartLoc, EndLoc, CollapsedNum, Clauses.size());
1228 unsigned NumClauses,
1233 Size +
sizeof(
OMPClause *) * NumClauses +
1235 numLoopChildren(CollapsedNum, OMPD_distribute_simd));
1246 Size +
sizeof(
OMPClause *) * Clauses.size() +
1248 numLoopChildren(CollapsedNum, OMPD_target_parallel_for_simd));
1251 CollapsedNum, Clauses.size());
1280 unsigned NumClauses,
1281 unsigned CollapsedNum,
1286 Size +
sizeof(
OMPClause *) * NumClauses +
1288 numLoopChildren(CollapsedNum, OMPD_target_parallel_for_simd));
1301 numLoopChildren(CollapsedNum, OMPD_target_simd));
1329 numLoopChildren(CollapsedNum, OMPD_target_simd));
1340 Size +
sizeof(
OMPClause *) * Clauses.size() +
1341 sizeof(
Stmt *) * numLoopChildren(CollapsedNum, OMPD_teams_distribute));
1343 StartLoc, EndLoc, CollapsedNum, Clauses.size());
1372 unsigned NumClauses,
1377 Size +
sizeof(
OMPClause *) * NumClauses +
1378 sizeof(
Stmt *) * numLoopChildren(CollapsedNum, OMPD_teams_distribute));
1391 numLoopChildren(CollapsedNum, OMPD_teams_distribute_simd));
1422 const ASTContext &
C,
unsigned NumClauses,
unsigned CollapsedNum,
1429 numLoopChildren(CollapsedNum, OMPD_teams_distribute_simd));
1443 numLoopChildren(CollapsedNum,
1444 OMPD_teams_distribute_parallel_for_simd));
1489 unsigned NumClauses,
1490 unsigned CollapsedNum,
1497 numLoopChildren(CollapsedNum,
1498 OMPD_teams_distribute_parallel_for_simd));
1511 Size +
sizeof(
OMPClause *) * Clauses.size() +
1513 numLoopChildren(CollapsedNum, OMPD_teams_distribute_parallel_for));
1553 Dir->HasCancel = HasCancel;
1559 unsigned NumClauses,
1560 unsigned CollapsedNum,
1565 Size +
sizeof(
OMPClause *) * NumClauses +
1567 numLoopChildren(CollapsedNum, OMPD_teams_distribute_parallel_for));
1603 Size +
sizeof(
OMPClause *) * Clauses.size() +
1605 numLoopChildren(CollapsedNum, OMPD_target_teams_distribute));
1637 unsigned NumClauses,
1638 unsigned CollapsedNum,
1643 Size +
sizeof(
OMPClause *) * NumClauses +
1645 numLoopChildren(CollapsedNum, OMPD_target_teams_distribute));
1658 Size +
sizeof(
OMPClause *) * Clauses.size() +
1660 numLoopChildren(CollapsedNum,
1661 OMPD_target_teams_distribute_parallel_for));
1664 StartLoc, EndLoc, CollapsedNum, Clauses.size());
1701 Dir->HasCancel = HasCancel;
1707 unsigned NumClauses,
1708 unsigned CollapsedNum,
1714 Size +
sizeof(
OMPClause *) * NumClauses +
1716 numLoopChildren(CollapsedNum,
1717 OMPD_target_teams_distribute_parallel_for));
1731 Size +
sizeof(
OMPClause *) * Clauses.size() +
1733 numLoopChildren(CollapsedNum,
1734 OMPD_target_teams_distribute_parallel_for_simd));
1737 StartLoc, EndLoc, CollapsedNum, Clauses.size());
1779 const ASTContext &
C,
unsigned NumClauses,
unsigned CollapsedNum,
1785 Size +
sizeof(
OMPClause *) * NumClauses +
1787 numLoopChildren(CollapsedNum,
1788 OMPD_target_teams_distribute_parallel_for_simd));
1790 CollapsedNum, NumClauses);
1801 Size +
sizeof(
OMPClause *) * Clauses.size() +
1803 numLoopChildren(CollapsedNum, OMPD_target_teams_distribute_simd));
1835 unsigned NumClauses,
1836 unsigned CollapsedNum,
1841 Size +
sizeof(
OMPClause *) * NumClauses +
1843 numLoopChildren(CollapsedNum, OMPD_target_teams_distribute_simd));
void setPreInits(Stmt *PreInits)
void setCombinedParForInDistCond(Expr *CombParForInDistCond)
Expr * NLB
Update of LowerBound for statically scheduled 'omp for' loops.
Defines the clang::ASTContext interface.
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 scheduled omp loops for outer loop in combined constructs (e...
SmallVector< Expr *, 4 > Updates
Expressions for loop counters update for CodeGen.
This represents '#pragma omp task' directive.
void setEnsureUpperBound(Expr *EUB)
static OMPMasterDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
static OMPDistributeParallelForDirective * 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 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...
void setCombinedCond(Expr *CombCond)
static OMPTeamsDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause *> Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
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)
bool isStandaloneDirective() const
Returns whether or not this is a Standalone directive.
static OMPTaskgroupDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *ReductionRef)
Creates directive.
void setPrivateCounters(ArrayRef< Expr *> A)
static OMPTargetTeamsDistributeParallelForDirective * 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 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...
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)
CapturedStmt * getInnermostCapturedStmt()
Get innermost captured statement for the construct.
void setUpperBoundVariable(Expr *UB)
void setNumIterations(Expr *NI)
This represents '#pragma omp target teams distribute' combined directive.
void setNextLowerBound(Expr *NLB)
This represents '#pragma omp parallel for' directive.
This represents '#pragma omp target teams distribute parallel for' combined directive.
static OMPTeamsDistributeParallelForDirective * 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.
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 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 OMPParallelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for N clauses.
void setCombinedDistCond(Expr *CombDistCond)
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 * LastIteration
Loop last iteration number.
static OMPTargetExitDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N 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 OMPTargetTeamsDistributeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
const Stmt * getStructuredBlock() const
Returns the AST node representing OpenMP structured-block of this OpenMP executable directive...
static OMPTargetDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp parallel' directive.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
static OMPTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTargetEnterDataDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause *> Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
static OMPTargetParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTargetUpdateDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause *> Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
static OMPFlushDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target simd' directive.
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 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.
This represents '#pragma omp barrier' directive.
This represents '#pragma omp critical' directive.
static OMPCriticalDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
static OMPTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp distribute parallel for' composite directive.
This represents '#pragma omp teams distribute parallel for simd' composite directive.
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...
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 OMPTargetTeamsDistributeParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp cancellation point' directive.
void setCombinedInit(Expr *CombInit)
MutableArrayRef< Expr * > getFinals()
Sets the list of final update expressions for linear variables.
This represents '#pragma omp teams' directive.
static OMPFlushDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause *> Clauses)
Creates directive with a list of Clauses.
Expr * CalcLastIteration
Calculation of last iteration.
static OMPTargetTeamsDistributeDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause *> Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
This represents '#pragma omp 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.
static OMPTaskyieldDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
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.
Expr * NUB
Update of UpperBound for statically scheduled 'omp for' loops.
Expr * Cond
Loop condition.
static OMPDistributeSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause *> Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static 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.
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.
static OMPTargetParallelDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause *> Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
Expr * PreCond
Loop pre-condition.
This represents '#pragma omp target parallel for simd' directive.
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.
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.
static OMPCriticalDirective * Create(const ASTContext &C, const DeclarationNameInfo &Name, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause *> Clauses, Stmt *AssociatedStmt)
Creates directive.
Expr * DistCond
Distribute Loop condition used when composing 'omp distribute' with 'omp for' in a same construct whe...
Expr * IterationVarRef
Loop iteration variable.
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.
Expr * Init
Distribute loop iteration variable init used when composing 'omp distribute' with 'omp for' in a same...
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.
void setInits(ArrayRef< Expr *> A)
const Stmt * getAssociatedStmt() const
Returns statement associated with the directive.
static OMPSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents one expression.
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.
MutableArrayRef< Expr * > getUpdates()
Sets the list of update expressions for linear variables.
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.
This represents '#pragma omp target teams distribute parallel for simd' combined 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 OMPTargetDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause *> Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
This represents '#pragma omp target teams distribute simd' combined directive.
unsigned getNumClauses() const
Get number 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.
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.
This represents '#pragma omp target teams' directive.
void setAssociatedStmt(Stmt *S)
Set the associated statement for the directive.
static OMPDistributeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Expr * ParForInDistCond
'omp parallel for' loop condition used when composed with 'omp distribute' in the same construct and ...
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)
Expr * NLB
Update of LowerBound for statically scheduled omp loops for outer loop in combined constructs (e...
static OMPDistributeParallelForDirective * 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.
This represents '#pragma omp flush' directive.
This represents '#pragma omp parallel for simd' directive.
Expr * NumIterations
Loop number of iterations.
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 * 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.
void setUpdates(ArrayRef< Expr *> A)
SmallVector< Expr *, 4 > PrivateCounters
PrivateCounters Loop counters.
void setLowerBoundVariable(Expr *LB)
static OMPSectionDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
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.
static OMPTargetUpdateDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setCombinedNextLowerBound(Expr *CombNLB)
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.
OpenMPDirectiveKind
OpenMP directives.
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 OMPTargetExitDataDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause *> Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
static OMPAtomicDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
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.
Stmt * getCapturedStmt()
Retrieve the statement being captured.
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.
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.
static OMPForSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause *> Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
This represents '#pragma omp ordered' directive.
Expr * LB
LowerBound - local variable passed to runtime.
This represents '#pragma omp target update' directive.
Expr * Init
Loop iteration variable init.
static OMPSingleDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause *> Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
A placeholder type used to construct an empty shell of a type, that will be filled in later (e...
void * Allocate(size_t Size, unsigned Align=8) const
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.
void setCounters(ArrayRef< Expr *> A)
Dataflow Directional Tag Classes.
SmallVector< Expr *, 4 > Inits
Expressions for loop counters inits for CodeGen.
void setCombinedUpperBoundVariable(Expr *CombUB)
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.
static OMPParallelSectionsDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause *> Clauses, Stmt *AssociatedStmt, bool HasCancel)
Creates directive with a list of Clauses.
This represents '#pragma omp simd' directive.
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnd...
This represents '#pragma omp atomic' directive.
static OMPForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPBarrierDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
This file defines OpenMP AST classes for executable directives and clauses.
static OMPSectionsDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause *> Clauses, Stmt *AssociatedStmt, bool HasCancel)
Creates directive with a list of Clauses.
Expr * Inc
Loop increment.
bool hasAssociatedStmt() const
Returns true if directive has associated statement.
static OMPTargetTeamsDirective * 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.
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.
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 OMPTaskyieldDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc)
Creates directive.
static OMPTargetDataDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause *> Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
Expr * UB
UpperBound - local variable passed to runtime.
This represents '#pragma omp target parallel' directive.
void setStrideVariable(Expr *ST)
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.
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 taskloop simd' directive.
static OMPSectionsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
void setPreCond(Expr *PC)
static OMPCancelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
static OMPTaskwaitDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc)
Creates directive.
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 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 OMPCancelDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause *> Clauses, OpenMPDirectiveKind CancelRegion)
Creates directive.
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.
This represents '#pragma omp parallel sections' directive.
void setCalcLastIteration(Expr *CLI)
void setCombinedNextUpperBound(Expr *CombNUB)
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.
void setFinals(ArrayRef< Expr *> A)
static OMPTeamsDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target parallel for' directive.
static OMPCancellationPointDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
This represents '#pragma omp taskloop' directive.