clang 20.0.0git
StmtOpenMP.cpp
Go to the documentation of this file.
1//===--- StmtOpenMP.cpp - Classes for OpenMP directives -------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file implements the subclasses of Stmt class declared in StmtOpenMP.h
10//
11//===----------------------------------------------------------------------===//
12
15
16using namespace clang;
17using namespace llvm::omp;
18
19size_t OMPChildren::size(unsigned NumClauses, bool HasAssociatedStmt,
20 unsigned NumChildren) {
21 return llvm::alignTo(
22 totalSizeToAlloc<OMPClause *, Stmt *>(
23 NumClauses, NumChildren + (HasAssociatedStmt ? 1 : 0)),
24 alignof(OMPChildren));
25}
26
28 assert(Clauses.size() == NumClauses &&
29 "Number of clauses is not the same as the preallocated buffer");
30 llvm::copy(Clauses, getTrailingObjects<OMPClause *>());
31}
32
34 return llvm::MutableArrayRef(getTrailingObjects<Stmt *>(), NumChildren);
35}
36
37OMPChildren *OMPChildren::Create(void *Mem, ArrayRef<OMPClause *> Clauses) {
38 auto *Data = CreateEmpty(Mem, Clauses.size());
39 Data->setClauses(Clauses);
40 return Data;
41}
42
43OMPChildren *OMPChildren::Create(void *Mem, ArrayRef<OMPClause *> Clauses,
44 Stmt *S, unsigned NumChildren) {
45 auto *Data = CreateEmpty(Mem, Clauses.size(), S, NumChildren);
46 Data->setClauses(Clauses);
47 if (S)
48 Data->setAssociatedStmt(S);
49 return Data;
50}
51
52OMPChildren *OMPChildren::CreateEmpty(void *Mem, unsigned NumClauses,
53 bool HasAssociatedStmt,
54 unsigned NumChildren) {
55 return new (Mem) OMPChildren(NumClauses, NumChildren, HasAssociatedStmt);
56}
57
59 // Special case: 'omp target enter data', 'omp target exit data',
60 // 'omp target update' are stand-alone directives, but for implementation
61 // reasons they have empty synthetic structured block, to simplify codegen.
62 if (isa<OMPTargetEnterDataDirective>(this) ||
63 isa<OMPTargetExitDataDirective>(this) ||
64 isa<OMPTargetUpdateDirective>(this))
65 return true;
66 return !hasAssociatedStmt();
67}
68
70 assert(!isStandaloneDirective() &&
71 "Standalone Executable Directives don't have Structured Blocks.");
72 if (auto *LD = dyn_cast<OMPLoopDirective>(this))
73 return LD->getBody();
74 return getRawStmt();
75}
76
77Stmt *
79 bool TryImperfectlyNestedLoops) {
80 Stmt *OrigStmt = CurStmt;
81 CurStmt = CurStmt->IgnoreContainers();
82 // Additional work for imperfectly nested loops, introduced in OpenMP 5.0.
83 if (TryImperfectlyNestedLoops) {
84 if (auto *CS = dyn_cast<CompoundStmt>(CurStmt)) {
85 CurStmt = nullptr;
86 SmallVector<CompoundStmt *, 4> Statements(1, CS);
87 SmallVector<CompoundStmt *, 4> NextStatements;
88 while (!Statements.empty()) {
89 CS = Statements.pop_back_val();
90 if (!CS)
91 continue;
92 for (Stmt *S : CS->body()) {
93 if (!S)
94 continue;
95 if (auto *CanonLoop = dyn_cast<OMPCanonicalLoop>(S))
96 S = CanonLoop->getLoopStmt();
97 if (isa<ForStmt>(S) || isa<CXXForRangeStmt>(S) ||
98 (isa<OMPLoopBasedDirective>(S) && !isa<OMPLoopDirective>(S))) {
99 // Only single loop construct is allowed.
100 if (CurStmt) {
101 CurStmt = OrigStmt;
102 break;
103 }
104 CurStmt = S;
105 continue;
106 }
107 S = S->IgnoreContainers();
108 if (auto *InnerCS = dyn_cast_or_null<CompoundStmt>(S))
109 NextStatements.push_back(InnerCS);
110 }
111 if (Statements.empty()) {
112 // Found single inner loop or multiple loops - exit.
113 if (CurStmt)
114 break;
115 Statements.swap(NextStatements);
116 }
117 }
118 if (!CurStmt)
119 CurStmt = OrigStmt;
120 }
121 }
122 return CurStmt;
123}
124
126 Stmt *CurStmt, bool TryImperfectlyNestedLoops, unsigned NumLoops,
127 llvm::function_ref<bool(unsigned, Stmt *)> Callback,
128 llvm::function_ref<void(OMPLoopTransformationDirective *)>
129 OnTransformationCallback) {
130 CurStmt = CurStmt->IgnoreContainers();
131 for (unsigned Cnt = 0; Cnt < NumLoops; ++Cnt) {
132 while (true) {
133 auto *Dir = dyn_cast<OMPLoopTransformationDirective>(CurStmt);
134 if (!Dir)
135 break;
136
137 OnTransformationCallback(Dir);
138
139 Stmt *TransformedStmt = Dir->getTransformedStmt();
140 if (!TransformedStmt) {
141 unsigned NumGeneratedLoops = Dir->getNumGeneratedLoops();
142 if (NumGeneratedLoops == 0) {
143 // May happen if the loop transformation does not result in a
144 // generated loop (such as full unrolling).
145 break;
146 }
147 if (NumGeneratedLoops > 0) {
148 // The loop transformation construct has generated loops, but these
149 // may not have been generated yet due to being in a dependent
150 // context.
151 return true;
152 }
153 }
154
155 CurStmt = TransformedStmt;
156 }
157 if (auto *CanonLoop = dyn_cast<OMPCanonicalLoop>(CurStmt))
158 CurStmt = CanonLoop->getLoopStmt();
159 if (Callback(Cnt, CurStmt))
160 return false;
161 // Move on to the next nested for loop, or to the loop body.
162 // OpenMP [2.8.1, simd construct, Restrictions]
163 // All loops associated with the construct must be perfectly nested; that
164 // is, there must be no intervening code nor any OpenMP directive between
165 // any two loops.
166 if (auto *For = dyn_cast<ForStmt>(CurStmt)) {
167 CurStmt = For->getBody();
168 } else {
169 assert(isa<CXXForRangeStmt>(CurStmt) &&
170 "Expected canonical for or range-based for loops.");
171 CurStmt = cast<CXXForRangeStmt>(CurStmt)->getBody();
172 }
174 CurStmt, TryImperfectlyNestedLoops);
175 }
176 return true;
177}
178
180 Stmt *CurStmt, bool TryImperfectlyNestedLoops, unsigned NumLoops,
181 llvm::function_ref<void(unsigned, Stmt *, Stmt *)> Callback) {
183 CurStmt, TryImperfectlyNestedLoops, NumLoops,
184 [Callback](unsigned Cnt, Stmt *Loop) {
185 Stmt *Body = nullptr;
186 if (auto *For = dyn_cast<ForStmt>(Loop)) {
187 Body = For->getBody();
188 } else {
189 assert(isa<CXXForRangeStmt>(Loop) &&
190 "Expected canonical for or range-based for loops.");
191 Body = cast<CXXForRangeStmt>(Loop)->getBody();
192 }
193 if (auto *CanonLoop = dyn_cast<OMPCanonicalLoop>(Body))
194 Body = CanonLoop->getLoopStmt();
195 Callback(Cnt, Loop, Body);
196 return false;
197 });
198 assert(Res && "Expected only loops");
199 (void)Res;
200}
201
203 // This relies on the loop form is already checked by Sema.
204 Stmt *Body = nullptr;
206 Data->getRawStmt(), /*TryImperfectlyNestedLoops=*/true,
208 [&Body](unsigned, Stmt *, Stmt *BodyStmt) { Body = BodyStmt; });
209 return Body;
210}
211
213 assert(A.size() == getLoopsNumber() &&
214 "Number of loop counters is not the same as the collapsed number");
215 llvm::copy(A, getCounters().begin());
216}
217
219 assert(A.size() == getLoopsNumber() && "Number of loop private counters "
220 "is not the same as the collapsed "
221 "number");
222 llvm::copy(A, getPrivateCounters().begin());
223}
224
226 assert(A.size() == getLoopsNumber() &&
227 "Number of counter inits is not the same as the collapsed number");
228 llvm::copy(A, getInits().begin());
229}
230
232 assert(A.size() == getLoopsNumber() &&
233 "Number of counter updates is not the same as the collapsed number");
234 llvm::copy(A, getUpdates().begin());
235}
236
238 assert(A.size() == getLoopsNumber() &&
239 "Number of counter finals is not the same as the collapsed number");
240 llvm::copy(A, getFinals().begin());
241}
242
244 assert(
245 A.size() == getLoopsNumber() &&
246 "Number of dependent counters is not the same as the collapsed number");
247 llvm::copy(A, getDependentCounters().begin());
248}
249
251 assert(A.size() == getLoopsNumber() &&
252 "Number of dependent inits is not the same as the collapsed number");
253 llvm::copy(A, getDependentInits().begin());
254}
255
257 assert(A.size() == getLoopsNumber() &&
258 "Number of finals conditions is not the same as the collapsed number");
259 llvm::copy(A, getFinalsConditions().begin());
260}
261
263 SourceLocation StartLoc,
264 SourceLocation EndLoc,
265 ArrayRef<OMPClause *> Clauses,
266 Stmt *AssociatedStmt, Stmt *IfStmt) {
267 auto *Dir = createDirective<OMPMetaDirective>(
268 C, Clauses, AssociatedStmt, /*NumChildren=*/1, StartLoc, EndLoc);
269 Dir->setIfStmt(IfStmt);
270 return Dir;
271}
272
274 unsigned NumClauses,
275 EmptyShell) {
276 return createEmptyDirective<OMPMetaDirective>(C, NumClauses,
277 /*HasAssociatedStmt=*/true,
278 /*NumChildren=*/1);
279}
280
282 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
283 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef,
284 bool HasCancel) {
285 auto *Dir = createDirective<OMPParallelDirective>(
286 C, Clauses, AssociatedStmt, /*NumChildren=*/1, StartLoc, EndLoc);
287 Dir->setTaskReductionRefExpr(TaskRedRef);
288 Dir->setHasCancel(HasCancel);
289 return Dir;
290}
291
293 unsigned NumClauses,
294 EmptyShell) {
295 return createEmptyDirective<OMPParallelDirective>(C, NumClauses,
296 /*HasAssociatedStmt=*/true,
297 /*NumChildren=*/1);
298}
299
302 SourceLocation EndLoc, unsigned CollapsedNum,
303 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
304 const HelperExprs &Exprs) {
305 auto *Dir = createDirective<OMPSimdDirective>(
306 C, Clauses, AssociatedStmt, numLoopChildren(CollapsedNum, OMPD_simd),
307 StartLoc, EndLoc, CollapsedNum);
308 Dir->setIterationVariable(Exprs.IterationVarRef);
309 Dir->setLastIteration(Exprs.LastIteration);
310 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
311 Dir->setPreCond(Exprs.PreCond);
312 Dir->setCond(Exprs.Cond);
313 Dir->setInit(Exprs.Init);
314 Dir->setInc(Exprs.Inc);
315 Dir->setCounters(Exprs.Counters);
316 Dir->setPrivateCounters(Exprs.PrivateCounters);
317 Dir->setInits(Exprs.Inits);
318 Dir->setUpdates(Exprs.Updates);
319 Dir->setFinals(Exprs.Finals);
320 Dir->setDependentCounters(Exprs.DependentCounters);
321 Dir->setDependentInits(Exprs.DependentInits);
322 Dir->setFinalsConditions(Exprs.FinalsConditions);
323 Dir->setPreInits(Exprs.PreInits);
324 return Dir;
325}
326
328 unsigned NumClauses,
329 unsigned CollapsedNum,
330 EmptyShell) {
331 return createEmptyDirective<OMPSimdDirective>(
332 C, NumClauses, /*HasAssociatedStmt=*/true,
333 numLoopChildren(CollapsedNum, OMPD_simd), CollapsedNum);
334}
335
337 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
338 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
339 const HelperExprs &Exprs, Expr *TaskRedRef, bool HasCancel) {
340 auto *Dir = createDirective<OMPForDirective>(
341 C, Clauses, AssociatedStmt, numLoopChildren(CollapsedNum, OMPD_for) + 1,
342 StartLoc, EndLoc, CollapsedNum);
343 Dir->setIterationVariable(Exprs.IterationVarRef);
344 Dir->setLastIteration(Exprs.LastIteration);
345 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
346 Dir->setPreCond(Exprs.PreCond);
347 Dir->setCond(Exprs.Cond);
348 Dir->setInit(Exprs.Init);
349 Dir->setInc(Exprs.Inc);
350 Dir->setIsLastIterVariable(Exprs.IL);
351 Dir->setLowerBoundVariable(Exprs.LB);
352 Dir->setUpperBoundVariable(Exprs.UB);
353 Dir->setStrideVariable(Exprs.ST);
354 Dir->setEnsureUpperBound(Exprs.EUB);
355 Dir->setNextLowerBound(Exprs.NLB);
356 Dir->setNextUpperBound(Exprs.NUB);
357 Dir->setNumIterations(Exprs.NumIterations);
358 Dir->setCounters(Exprs.Counters);
359 Dir->setPrivateCounters(Exprs.PrivateCounters);
360 Dir->setInits(Exprs.Inits);
361 Dir->setUpdates(Exprs.Updates);
362 Dir->setFinals(Exprs.Finals);
363 Dir->setDependentCounters(Exprs.DependentCounters);
364 Dir->setDependentInits(Exprs.DependentInits);
365 Dir->setFinalsConditions(Exprs.FinalsConditions);
366 Dir->setPreInits(Exprs.PreInits);
367 Dir->setTaskReductionRefExpr(TaskRedRef);
368 Dir->setHasCancel(HasCancel);
369 return Dir;
370}
371
373 switch (getStmtClass()) {
374#define STMT(CLASS, PARENT)
375#define ABSTRACT_STMT(CLASS)
376#define OMPLOOPTRANSFORMATIONDIRECTIVE(CLASS, PARENT) \
377 case Stmt::CLASS##Class: \
378 return static_cast<const CLASS *>(this)->getTransformedStmt();
379#include "clang/AST/StmtNodes.inc"
380 default:
381 llvm_unreachable("Not a loop transformation");
382 }
383}
384
386 switch (getStmtClass()) {
387#define STMT(CLASS, PARENT)
388#define ABSTRACT_STMT(CLASS)
389#define OMPLOOPTRANSFORMATIONDIRECTIVE(CLASS, PARENT) \
390 case Stmt::CLASS##Class: \
391 return static_cast<const CLASS *>(this)->getPreInits();
392#include "clang/AST/StmtNodes.inc"
393 default:
394 llvm_unreachable("Not a loop transformation");
395 }
396}
397
399 unsigned NumClauses,
400 unsigned CollapsedNum,
401 EmptyShell) {
402 return createEmptyDirective<OMPForDirective>(
403 C, NumClauses, /*HasAssociatedStmt=*/true,
404 numLoopChildren(CollapsedNum, OMPD_for) + 1, CollapsedNum);
405}
406
410 unsigned NumLoops, Stmt *AssociatedStmt,
411 Stmt *TransformedStmt, Stmt *PreInits) {
412 OMPTileDirective *Dir = createDirective<OMPTileDirective>(
413 C, Clauses, AssociatedStmt, TransformedStmtOffset + 1, StartLoc, EndLoc,
414 NumLoops);
415 Dir->setTransformedStmt(TransformedStmt);
416 Dir->setPreInits(PreInits);
417 return Dir;
418}
419
421 unsigned NumClauses,
422 unsigned NumLoops) {
423 return createEmptyDirective<OMPTileDirective>(
424 C, NumClauses, /*HasAssociatedStmt=*/true, TransformedStmtOffset + 1,
425 SourceLocation(), SourceLocation(), NumLoops);
426}
427
431 Stmt *AssociatedStmt, unsigned NumGeneratedLoops,
432 Stmt *TransformedStmt, Stmt *PreInits) {
433 assert(NumGeneratedLoops <= 1 && "Unrolling generates at most one loop");
434
435 auto *Dir = createDirective<OMPUnrollDirective>(
436 C, Clauses, AssociatedStmt, TransformedStmtOffset + 1, StartLoc, EndLoc);
437 Dir->setNumGeneratedLoops(NumGeneratedLoops);
438 Dir->setTransformedStmt(TransformedStmt);
439 Dir->setPreInits(PreInits);
440 return Dir;
441}
442
444 unsigned NumClauses) {
445 return createEmptyDirective<OMPUnrollDirective>(
446 C, NumClauses, /*HasAssociatedStmt=*/true, TransformedStmtOffset + 1,
448}
449
452 SourceLocation EndLoc, Stmt *AssociatedStmt,
453 Stmt *TransformedStmt, Stmt *PreInits) {
454 OMPReverseDirective *Dir = createDirective<OMPReverseDirective>(
455 C, {}, AssociatedStmt, TransformedStmtOffset + 1, StartLoc, EndLoc);
456 Dir->setTransformedStmt(TransformedStmt);
457 Dir->setPreInits(PreInits);
458 return Dir;
459}
460
462 return createEmptyDirective<OMPReverseDirective>(
463 C, /*NumClauses=*/0, /*HasAssociatedStmt=*/true,
464 TransformedStmtOffset + 1, SourceLocation(), SourceLocation());
465}
466
468 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
469 ArrayRef<OMPClause *> Clauses, unsigned NumLoops, Stmt *AssociatedStmt,
470 Stmt *TransformedStmt, Stmt *PreInits) {
471 OMPInterchangeDirective *Dir = createDirective<OMPInterchangeDirective>(
472 C, Clauses, AssociatedStmt, TransformedStmtOffset + 1, StartLoc, EndLoc,
473 NumLoops);
474 Dir->setTransformedStmt(TransformedStmt);
475 Dir->setPreInits(PreInits);
476 return Dir;
477}
478
481 unsigned NumLoops) {
482 return createEmptyDirective<OMPInterchangeDirective>(
483 C, NumClauses, /*HasAssociatedStmt=*/true, TransformedStmtOffset + 1,
484 SourceLocation(), SourceLocation(), NumLoops);
485}
486
489 SourceLocation EndLoc, unsigned CollapsedNum,
490 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
491 const HelperExprs &Exprs) {
492 auto *Dir = createDirective<OMPForSimdDirective>(
493 C, Clauses, AssociatedStmt, numLoopChildren(CollapsedNum, OMPD_for_simd),
494 StartLoc, EndLoc, CollapsedNum);
495 Dir->setIterationVariable(Exprs.IterationVarRef);
496 Dir->setLastIteration(Exprs.LastIteration);
497 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
498 Dir->setPreCond(Exprs.PreCond);
499 Dir->setCond(Exprs.Cond);
500 Dir->setInit(Exprs.Init);
501 Dir->setInc(Exprs.Inc);
502 Dir->setIsLastIterVariable(Exprs.IL);
503 Dir->setLowerBoundVariable(Exprs.LB);
504 Dir->setUpperBoundVariable(Exprs.UB);
505 Dir->setStrideVariable(Exprs.ST);
506 Dir->setEnsureUpperBound(Exprs.EUB);
507 Dir->setNextLowerBound(Exprs.NLB);
508 Dir->setNextUpperBound(Exprs.NUB);
509 Dir->setNumIterations(Exprs.NumIterations);
510 Dir->setCounters(Exprs.Counters);
511 Dir->setPrivateCounters(Exprs.PrivateCounters);
512 Dir->setInits(Exprs.Inits);
513 Dir->setUpdates(Exprs.Updates);
514 Dir->setFinals(Exprs.Finals);
515 Dir->setDependentCounters(Exprs.DependentCounters);
516 Dir->setDependentInits(Exprs.DependentInits);
517 Dir->setFinalsConditions(Exprs.FinalsConditions);
518 Dir->setPreInits(Exprs.PreInits);
519 return Dir;
520}
521
523 unsigned NumClauses,
524 unsigned CollapsedNum,
525 EmptyShell) {
526 return createEmptyDirective<OMPForSimdDirective>(
527 C, NumClauses, /*HasAssociatedStmt=*/true,
528 numLoopChildren(CollapsedNum, OMPD_for_simd), CollapsedNum);
529}
530
532 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
533 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef,
534 bool HasCancel) {
535 auto *Dir = createDirective<OMPSectionsDirective>(C, Clauses, AssociatedStmt,
536 /*NumChildren=*/1, StartLoc,
537 EndLoc);
538 Dir->setTaskReductionRefExpr(TaskRedRef);
539 Dir->setHasCancel(HasCancel);
540 return Dir;
541}
542
544 unsigned NumClauses,
545 EmptyShell) {
546 return createEmptyDirective<OMPSectionsDirective>(C, NumClauses,
547 /*HasAssociatedStmt=*/true,
548 /*NumChildren=*/1);
549}
550
552 SourceLocation StartLoc,
553 SourceLocation EndLoc,
554 Stmt *AssociatedStmt,
555 bool HasCancel) {
556 auto *Dir =
557 createDirective<OMPSectionDirective>(C, {}, AssociatedStmt,
558 /*NumChildren=*/0, StartLoc, EndLoc);
559 Dir->setHasCancel(HasCancel);
560 return Dir;
561}
562
564 EmptyShell) {
565 return createEmptyDirective<OMPSectionDirective>(C, /*NumClauses=*/0,
566 /*HasAssociatedStmt=*/true);
567}
568
570 SourceLocation StartLoc,
571 SourceLocation EndLoc,
572 ArrayRef<OMPClause *> Clauses,
573 Stmt *AssociatedStmt) {
574 return createDirective<OMPScopeDirective>(C, Clauses, AssociatedStmt,
575 /*NumChildren=*/0, StartLoc,
576 EndLoc);
577}
578
580 unsigned NumClauses,
581 EmptyShell) {
582 return createEmptyDirective<OMPScopeDirective>(C, NumClauses,
583 /*HasAssociatedStmt=*/true);
584}
585
587 SourceLocation StartLoc,
588 SourceLocation EndLoc,
589 ArrayRef<OMPClause *> Clauses,
590 Stmt *AssociatedStmt) {
591 return createDirective<OMPSingleDirective>(C, Clauses, AssociatedStmt,
592 /*NumChildren=*/0, StartLoc,
593 EndLoc);
594}
595
597 unsigned NumClauses,
598 EmptyShell) {
599 return createEmptyDirective<OMPSingleDirective>(C, NumClauses,
600 /*HasAssociatedStmt=*/true);
601}
602
604 SourceLocation StartLoc,
605 SourceLocation EndLoc,
606 Stmt *AssociatedStmt) {
607 return createDirective<OMPMasterDirective>(C, {}, AssociatedStmt,
608 /*NumChildren=*/0, StartLoc,
609 EndLoc);
610}
611
613 EmptyShell) {
614 return createEmptyDirective<OMPMasterDirective>(C, /*NumClauses=*/0,
615 /*HasAssociatedStmt=*/true);
616}
617
619 const ASTContext &C, const DeclarationNameInfo &Name,
620 SourceLocation StartLoc, SourceLocation EndLoc,
621 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt) {
622 return createDirective<OMPCriticalDirective>(C, Clauses, AssociatedStmt,
623 /*NumChildren=*/0, Name,
624 StartLoc, EndLoc);
625}
626
628 unsigned NumClauses,
629 EmptyShell) {
630 return createEmptyDirective<OMPCriticalDirective>(C, NumClauses,
631 /*HasAssociatedStmt=*/true);
632}
633
635 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
636 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
637 const HelperExprs &Exprs, Expr *TaskRedRef, bool HasCancel) {
638 auto *Dir = createDirective<OMPParallelForDirective>(
639 C, Clauses, AssociatedStmt,
640 numLoopChildren(CollapsedNum, OMPD_parallel_for) + 1, StartLoc, EndLoc,
641 CollapsedNum);
642 Dir->setIterationVariable(Exprs.IterationVarRef);
643 Dir->setLastIteration(Exprs.LastIteration);
644 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
645 Dir->setPreCond(Exprs.PreCond);
646 Dir->setCond(Exprs.Cond);
647 Dir->setInit(Exprs.Init);
648 Dir->setInc(Exprs.Inc);
649 Dir->setIsLastIterVariable(Exprs.IL);
650 Dir->setLowerBoundVariable(Exprs.LB);
651 Dir->setUpperBoundVariable(Exprs.UB);
652 Dir->setStrideVariable(Exprs.ST);
653 Dir->setEnsureUpperBound(Exprs.EUB);
654 Dir->setNextLowerBound(Exprs.NLB);
655 Dir->setNextUpperBound(Exprs.NUB);
656 Dir->setNumIterations(Exprs.NumIterations);
657 Dir->setCounters(Exprs.Counters);
658 Dir->setPrivateCounters(Exprs.PrivateCounters);
659 Dir->setInits(Exprs.Inits);
660 Dir->setUpdates(Exprs.Updates);
661 Dir->setFinals(Exprs.Finals);
662 Dir->setDependentCounters(Exprs.DependentCounters);
663 Dir->setDependentInits(Exprs.DependentInits);
664 Dir->setFinalsConditions(Exprs.FinalsConditions);
665 Dir->setPreInits(Exprs.PreInits);
666 Dir->setTaskReductionRefExpr(TaskRedRef);
667 Dir->setHasCancel(HasCancel);
668 return Dir;
669}
670
673 unsigned CollapsedNum, EmptyShell) {
674 return createEmptyDirective<OMPParallelForDirective>(
675 C, NumClauses, /*HasAssociatedStmt=*/true,
676 numLoopChildren(CollapsedNum, OMPD_parallel_for) + 1, CollapsedNum);
677}
678
680 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
681 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
682 const HelperExprs &Exprs) {
683 auto *Dir = createDirective<OMPParallelForSimdDirective>(
684 C, Clauses, AssociatedStmt,
685 numLoopChildren(CollapsedNum, OMPD_parallel_for_simd), StartLoc, EndLoc,
686 CollapsedNum);
687 Dir->setIterationVariable(Exprs.IterationVarRef);
688 Dir->setLastIteration(Exprs.LastIteration);
689 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
690 Dir->setPreCond(Exprs.PreCond);
691 Dir->setCond(Exprs.Cond);
692 Dir->setInit(Exprs.Init);
693 Dir->setInc(Exprs.Inc);
694 Dir->setIsLastIterVariable(Exprs.IL);
695 Dir->setLowerBoundVariable(Exprs.LB);
696 Dir->setUpperBoundVariable(Exprs.UB);
697 Dir->setStrideVariable(Exprs.ST);
698 Dir->setEnsureUpperBound(Exprs.EUB);
699 Dir->setNextLowerBound(Exprs.NLB);
700 Dir->setNextUpperBound(Exprs.NUB);
701 Dir->setNumIterations(Exprs.NumIterations);
702 Dir->setCounters(Exprs.Counters);
703 Dir->setPrivateCounters(Exprs.PrivateCounters);
704 Dir->setInits(Exprs.Inits);
705 Dir->setUpdates(Exprs.Updates);
706 Dir->setFinals(Exprs.Finals);
707 Dir->setDependentCounters(Exprs.DependentCounters);
708 Dir->setDependentInits(Exprs.DependentInits);
709 Dir->setFinalsConditions(Exprs.FinalsConditions);
710 Dir->setPreInits(Exprs.PreInits);
711 return Dir;
712}
713
716 unsigned NumClauses,
717 unsigned CollapsedNum, EmptyShell) {
718 return createEmptyDirective<OMPParallelForSimdDirective>(
719 C, NumClauses, /*HasAssociatedStmt=*/true,
720 numLoopChildren(CollapsedNum, OMPD_parallel_for_simd), CollapsedNum);
721}
722
724 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
725 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef) {
726 auto *Dir = createDirective<OMPParallelMasterDirective>(
727 C, Clauses, AssociatedStmt, /*NumChildren=*/1, StartLoc, EndLoc);
728 Dir->setTaskReductionRefExpr(TaskRedRef);
729 return Dir;
730}
731
734 unsigned NumClauses, EmptyShell) {
735 return createEmptyDirective<OMPParallelMasterDirective>(
736 C, NumClauses, /*HasAssociatedStmt=*/true, /*NumChildren=*/1);
737}
738
740 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
741 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef) {
742 auto *Dir = createDirective<OMPParallelMaskedDirective>(
743 C, Clauses, AssociatedStmt, /*NumChildren=*/1, StartLoc, EndLoc);
744 Dir->setTaskReductionRefExpr(TaskRedRef);
745 return Dir;
746}
747
750 unsigned NumClauses, EmptyShell) {
751 return createEmptyDirective<OMPParallelMaskedDirective>(
752 C, NumClauses, /*HasAssociatedStmt=*/true, /*NumChildren=*/1);
753}
754
756 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
757 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef,
758 bool HasCancel) {
759 auto *Dir = createDirective<OMPParallelSectionsDirective>(
760 C, Clauses, AssociatedStmt, /*NumChildren=*/1, StartLoc, EndLoc);
761 Dir->setTaskReductionRefExpr(TaskRedRef);
762 Dir->setHasCancel(HasCancel);
763 return Dir;
764}
765
768 unsigned NumClauses, EmptyShell) {
769 return createEmptyDirective<OMPParallelSectionsDirective>(
770 C, NumClauses, /*HasAssociatedStmt=*/true, /*NumChildren=*/1);
771}
772
776 Stmt *AssociatedStmt, bool HasCancel) {
777 auto *Dir = createDirective<OMPTaskDirective>(
778 C, Clauses, AssociatedStmt, /*NumChildren=*/0, StartLoc, EndLoc);
779 Dir->setHasCancel(HasCancel);
780 return Dir;
781}
782
784 unsigned NumClauses,
785 EmptyShell) {
786 return createEmptyDirective<OMPTaskDirective>(C, NumClauses,
787 /*HasAssociatedStmt=*/true);
788}
789
791 SourceLocation StartLoc,
792 SourceLocation EndLoc) {
793 return new (C) OMPTaskyieldDirective(StartLoc, EndLoc);
794}
795
797 EmptyShell) {
798 return new (C) OMPTaskyieldDirective();
799}
800
802 SourceLocation StartLoc,
803 SourceLocation EndLoc,
804 ArrayRef<OMPClause *> Clauses,
805 Stmt *AStmt) {
806 return createDirective<OMPAssumeDirective>(C, Clauses, AStmt,
807 /*NumChildren=*/0, StartLoc,
808 EndLoc);
809}
810
812 unsigned NumClauses,
813 EmptyShell) {
814 return createEmptyDirective<OMPAssumeDirective>(C, NumClauses,
815 /*HasAssociatedStmt=*/true);
816}
817
819 SourceLocation StartLoc,
820 SourceLocation EndLoc,
821 ArrayRef<OMPClause *> Clauses) {
822 return createDirective<OMPErrorDirective>(
823 C, Clauses, /*AssociatedStmt=*/nullptr, /*NumChildren=*/0, StartLoc,
824 EndLoc);
825}
826
828 unsigned NumClauses,
829 EmptyShell) {
830 return createEmptyDirective<OMPErrorDirective>(C, NumClauses);
831}
832
834 SourceLocation StartLoc,
835 SourceLocation EndLoc) {
836 return new (C) OMPBarrierDirective(StartLoc, EndLoc);
837}
838
840 EmptyShell) {
841 return new (C) OMPBarrierDirective();
842}
843
846 SourceLocation EndLoc,
847 ArrayRef<OMPClause *> Clauses) {
848 return createDirective<OMPTaskwaitDirective>(
849 C, Clauses, /*AssociatedStmt=*/nullptr, /*NumChildren=*/0, StartLoc,
850 EndLoc);
851}
852
854 unsigned NumClauses,
855 EmptyShell) {
856 return createEmptyDirective<OMPTaskwaitDirective>(C, NumClauses);
857}
858
860 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
861 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *ReductionRef) {
862 auto *Dir = createDirective<OMPTaskgroupDirective>(
863 C, Clauses, AssociatedStmt, /*NumChildren=*/1, StartLoc, EndLoc);
864 Dir->setReductionRef(ReductionRef);
865 return Dir;
866}
867
869 unsigned NumClauses,
870 EmptyShell) {
871 return createEmptyDirective<OMPTaskgroupDirective>(
872 C, NumClauses, /*HasAssociatedStmt=*/true, /*NumChildren=*/1);
873}
874
876 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
877 OpenMPDirectiveKind CancelRegion) {
878 auto *Dir = new (C) OMPCancellationPointDirective(StartLoc, EndLoc);
879 Dir->setCancelRegion(CancelRegion);
880 return Dir;
881}
882
885 return new (C) OMPCancellationPointDirective();
886}
887
891 OpenMPDirectiveKind CancelRegion) {
892 auto *Dir = createDirective<OMPCancelDirective>(
893 C, Clauses, /*AssociatedStmt=*/nullptr, /*NumChildren=*/0, StartLoc,
894 EndLoc);
895 Dir->setCancelRegion(CancelRegion);
896 return Dir;
897}
898
900 unsigned NumClauses,
901 EmptyShell) {
902 return createEmptyDirective<OMPCancelDirective>(C, NumClauses);
903}
904
906 SourceLocation StartLoc,
907 SourceLocation EndLoc,
908 ArrayRef<OMPClause *> Clauses) {
909 return createDirective<OMPFlushDirective>(
910 C, Clauses, /*AssociatedStmt=*/nullptr, /*NumChildren=*/0, StartLoc,
911 EndLoc);
912}
913
915 unsigned NumClauses,
916 EmptyShell) {
917 return createEmptyDirective<OMPFlushDirective>(C, NumClauses);
918}
919
921 SourceLocation StartLoc,
922 SourceLocation EndLoc,
923 ArrayRef<OMPClause *> Clauses) {
924 return createDirective<OMPDepobjDirective>(
925 C, Clauses, /*AssociatedStmt=*/nullptr,
926 /*NumChildren=*/0, StartLoc, EndLoc);
927}
928
930 unsigned NumClauses,
931 EmptyShell) {
932 return createEmptyDirective<OMPDepobjDirective>(C, NumClauses);
933}
934
936 SourceLocation StartLoc,
937 SourceLocation EndLoc,
938 ArrayRef<OMPClause *> Clauses) {
939 return createDirective<OMPScanDirective>(C, Clauses,
940 /*AssociatedStmt=*/nullptr,
941 /*NumChildren=*/0, StartLoc, EndLoc);
942}
943
945 unsigned NumClauses,
946 EmptyShell) {
947 return createEmptyDirective<OMPScanDirective>(C, NumClauses);
948}
949
951 SourceLocation StartLoc,
952 SourceLocation EndLoc,
953 ArrayRef<OMPClause *> Clauses,
954 Stmt *AssociatedStmt) {
955 return createDirective<OMPOrderedDirective>(
956 C, Clauses, cast_or_null<CapturedStmt>(AssociatedStmt),
957 /*NumChildren=*/0, StartLoc, EndLoc);
958}
959
961 unsigned NumClauses,
962 bool IsStandalone,
963 EmptyShell) {
964 return createEmptyDirective<OMPOrderedDirective>(C, NumClauses,
965 !IsStandalone);
966}
967
971 Stmt *AssociatedStmt, Expressions Exprs) {
972 auto *Dir = createDirective<OMPAtomicDirective>(
973 C, Clauses, AssociatedStmt, /*NumChildren=*/7, StartLoc, EndLoc);
974 Dir->setX(Exprs.X);
975 Dir->setV(Exprs.V);
976 Dir->setR(Exprs.R);
977 Dir->setExpr(Exprs.E);
978 Dir->setUpdateExpr(Exprs.UE);
979 Dir->setD(Exprs.D);
980 Dir->setCond(Exprs.Cond);
981 Dir->Flags.IsXLHSInRHSPart = Exprs.IsXLHSInRHSPart ? 1 : 0;
982 Dir->Flags.IsPostfixUpdate = Exprs.IsPostfixUpdate ? 1 : 0;
983 Dir->Flags.IsFailOnly = Exprs.IsFailOnly ? 1 : 0;
984 return Dir;
985}
986
988 unsigned NumClauses,
989 EmptyShell) {
990 return createEmptyDirective<OMPAtomicDirective>(
991 C, NumClauses, /*HasAssociatedStmt=*/true, /*NumChildren=*/7);
992}
993
995 SourceLocation StartLoc,
996 SourceLocation EndLoc,
997 ArrayRef<OMPClause *> Clauses,
998 Stmt *AssociatedStmt) {
999 return createDirective<OMPTargetDirective>(
1000 C, Clauses, AssociatedStmt, /*NumChildren=*/0, StartLoc, EndLoc);
1001}
1002
1004 unsigned NumClauses,
1005 EmptyShell) {
1006 return createEmptyDirective<OMPTargetDirective>(C, NumClauses,
1007 /*HasAssociatedStmt=*/true);
1008}
1009
1011 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1012 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef,
1013 bool HasCancel) {
1014 auto *Dir = createDirective<OMPTargetParallelDirective>(
1015 C, Clauses, AssociatedStmt, /*NumChildren=*/1, StartLoc, EndLoc);
1016 Dir->setTaskReductionRefExpr(TaskRedRef);
1017 Dir->setHasCancel(HasCancel);
1018 return Dir;
1019}
1020
1023 unsigned NumClauses, EmptyShell) {
1024 return createEmptyDirective<OMPTargetParallelDirective>(
1025 C, NumClauses, /*HasAssociatedStmt=*/true, /*NumChildren=*/1);
1026}
1027
1029 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1030 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1031 const HelperExprs &Exprs, Expr *TaskRedRef, bool HasCancel) {
1032 auto *Dir = createDirective<OMPTargetParallelForDirective>(
1033 C, Clauses, AssociatedStmt,
1034 numLoopChildren(CollapsedNum, OMPD_target_parallel_for) + 1, StartLoc,
1035 EndLoc, CollapsedNum);
1036 Dir->setIterationVariable(Exprs.IterationVarRef);
1037 Dir->setLastIteration(Exprs.LastIteration);
1038 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1039 Dir->setPreCond(Exprs.PreCond);
1040 Dir->setCond(Exprs.Cond);
1041 Dir->setInit(Exprs.Init);
1042 Dir->setInc(Exprs.Inc);
1043 Dir->setIsLastIterVariable(Exprs.IL);
1044 Dir->setLowerBoundVariable(Exprs.LB);
1045 Dir->setUpperBoundVariable(Exprs.UB);
1046 Dir->setStrideVariable(Exprs.ST);
1047 Dir->setEnsureUpperBound(Exprs.EUB);
1048 Dir->setNextLowerBound(Exprs.NLB);
1049 Dir->setNextUpperBound(Exprs.NUB);
1050 Dir->setNumIterations(Exprs.NumIterations);
1051 Dir->setCounters(Exprs.Counters);
1052 Dir->setPrivateCounters(Exprs.PrivateCounters);
1053 Dir->setInits(Exprs.Inits);
1054 Dir->setUpdates(Exprs.Updates);
1055 Dir->setFinals(Exprs.Finals);
1056 Dir->setDependentCounters(Exprs.DependentCounters);
1057 Dir->setDependentInits(Exprs.DependentInits);
1058 Dir->setFinalsConditions(Exprs.FinalsConditions);
1059 Dir->setPreInits(Exprs.PreInits);
1060 Dir->setTaskReductionRefExpr(TaskRedRef);
1061 Dir->setHasCancel(HasCancel);
1062 return Dir;
1063}
1064
1067 unsigned NumClauses,
1068 unsigned CollapsedNum, EmptyShell) {
1069 return createEmptyDirective<OMPTargetParallelForDirective>(
1070 C, NumClauses, /*HasAssociatedStmt=*/true,
1071 numLoopChildren(CollapsedNum, OMPD_target_parallel_for) + 1,
1072 CollapsedNum);
1073}
1074
1076 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1077 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt) {
1078 return createDirective<OMPTargetDataDirective>(
1079 C, Clauses, AssociatedStmt, /*NumChildren=*/0, StartLoc, EndLoc);
1080}
1081
1083 unsigned N,
1084 EmptyShell) {
1085 return createEmptyDirective<OMPTargetDataDirective>(
1086 C, N, /*HasAssociatedStmt=*/true);
1087}
1088
1090 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1091 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt) {
1092 return createDirective<OMPTargetEnterDataDirective>(
1093 C, Clauses, AssociatedStmt, /*NumChildren=*/0, StartLoc, EndLoc);
1094}
1095
1098 EmptyShell) {
1099 return createEmptyDirective<OMPTargetEnterDataDirective>(
1100 C, N, /*HasAssociatedStmt=*/true);
1101}
1102
1104 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1105 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt) {
1106 return createDirective<OMPTargetExitDataDirective>(
1107 C, Clauses, AssociatedStmt, /*NumChildren=*/0, StartLoc, EndLoc);
1108}
1109
1112 EmptyShell) {
1113 return createEmptyDirective<OMPTargetExitDataDirective>(
1114 C, N, /*HasAssociatedStmt=*/true);
1115}
1116
1118 SourceLocation StartLoc,
1119 SourceLocation EndLoc,
1120 ArrayRef<OMPClause *> Clauses,
1121 Stmt *AssociatedStmt) {
1122 return createDirective<OMPTeamsDirective>(
1123 C, Clauses, AssociatedStmt, /*NumChildren=*/0, StartLoc, EndLoc);
1124}
1125
1127 unsigned NumClauses,
1128 EmptyShell) {
1129 return createEmptyDirective<OMPTeamsDirective>(C, NumClauses,
1130 /*HasAssociatedStmt=*/true);
1131}
1132
1134 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1135 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1136 const HelperExprs &Exprs, bool HasCancel) {
1137 auto *Dir = createDirective<OMPTaskLoopDirective>(
1138 C, Clauses, AssociatedStmt, numLoopChildren(CollapsedNum, OMPD_taskloop),
1139 StartLoc, EndLoc, CollapsedNum);
1140 Dir->setIterationVariable(Exprs.IterationVarRef);
1141 Dir->setLastIteration(Exprs.LastIteration);
1142 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1143 Dir->setPreCond(Exprs.PreCond);
1144 Dir->setCond(Exprs.Cond);
1145 Dir->setInit(Exprs.Init);
1146 Dir->setInc(Exprs.Inc);
1147 Dir->setIsLastIterVariable(Exprs.IL);
1148 Dir->setLowerBoundVariable(Exprs.LB);
1149 Dir->setUpperBoundVariable(Exprs.UB);
1150 Dir->setStrideVariable(Exprs.ST);
1151 Dir->setEnsureUpperBound(Exprs.EUB);
1152 Dir->setNextLowerBound(Exprs.NLB);
1153 Dir->setNextUpperBound(Exprs.NUB);
1154 Dir->setNumIterations(Exprs.NumIterations);
1155 Dir->setCounters(Exprs.Counters);
1156 Dir->setPrivateCounters(Exprs.PrivateCounters);
1157 Dir->setInits(Exprs.Inits);
1158 Dir->setUpdates(Exprs.Updates);
1159 Dir->setFinals(Exprs.Finals);
1160 Dir->setDependentCounters(Exprs.DependentCounters);
1161 Dir->setDependentInits(Exprs.DependentInits);
1162 Dir->setFinalsConditions(Exprs.FinalsConditions);
1163 Dir->setPreInits(Exprs.PreInits);
1164 Dir->setHasCancel(HasCancel);
1165 return Dir;
1166}
1167
1169 unsigned NumClauses,
1170 unsigned CollapsedNum,
1171 EmptyShell) {
1172 return createEmptyDirective<OMPTaskLoopDirective>(
1173 C, NumClauses, /*HasAssociatedStmt=*/true,
1174 numLoopChildren(CollapsedNum, OMPD_taskloop), CollapsedNum);
1175}
1176
1178 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1179 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1180 const HelperExprs &Exprs) {
1181 auto *Dir = createDirective<OMPTaskLoopSimdDirective>(
1182 C, Clauses, AssociatedStmt,
1183 numLoopChildren(CollapsedNum, OMPD_taskloop_simd), StartLoc, EndLoc,
1184 CollapsedNum);
1185 Dir->setIterationVariable(Exprs.IterationVarRef);
1186 Dir->setLastIteration(Exprs.LastIteration);
1187 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1188 Dir->setPreCond(Exprs.PreCond);
1189 Dir->setCond(Exprs.Cond);
1190 Dir->setInit(Exprs.Init);
1191 Dir->setInc(Exprs.Inc);
1192 Dir->setIsLastIterVariable(Exprs.IL);
1193 Dir->setLowerBoundVariable(Exprs.LB);
1194 Dir->setUpperBoundVariable(Exprs.UB);
1195 Dir->setStrideVariable(Exprs.ST);
1196 Dir->setEnsureUpperBound(Exprs.EUB);
1197 Dir->setNextLowerBound(Exprs.NLB);
1198 Dir->setNextUpperBound(Exprs.NUB);
1199 Dir->setNumIterations(Exprs.NumIterations);
1200 Dir->setCounters(Exprs.Counters);
1201 Dir->setPrivateCounters(Exprs.PrivateCounters);
1202 Dir->setInits(Exprs.Inits);
1203 Dir->setUpdates(Exprs.Updates);
1204 Dir->setFinals(Exprs.Finals);
1205 Dir->setDependentCounters(Exprs.DependentCounters);
1206 Dir->setDependentInits(Exprs.DependentInits);
1207 Dir->setFinalsConditions(Exprs.FinalsConditions);
1208 Dir->setPreInits(Exprs.PreInits);
1209 return Dir;
1210}
1211
1214 unsigned CollapsedNum, EmptyShell) {
1215 return createEmptyDirective<OMPTaskLoopSimdDirective>(
1216 C, NumClauses, /*HasAssociatedStmt=*/true,
1217 numLoopChildren(CollapsedNum, OMPD_taskloop_simd), CollapsedNum);
1218}
1219
1221 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1222 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1223 const HelperExprs &Exprs, bool HasCancel) {
1224 auto *Dir = createDirective<OMPMasterTaskLoopDirective>(
1225 C, Clauses, AssociatedStmt,
1226 numLoopChildren(CollapsedNum, OMPD_master_taskloop), StartLoc, EndLoc,
1227 CollapsedNum);
1228 Dir->setIterationVariable(Exprs.IterationVarRef);
1229 Dir->setLastIteration(Exprs.LastIteration);
1230 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1231 Dir->setPreCond(Exprs.PreCond);
1232 Dir->setCond(Exprs.Cond);
1233 Dir->setInit(Exprs.Init);
1234 Dir->setInc(Exprs.Inc);
1235 Dir->setIsLastIterVariable(Exprs.IL);
1236 Dir->setLowerBoundVariable(Exprs.LB);
1237 Dir->setUpperBoundVariable(Exprs.UB);
1238 Dir->setStrideVariable(Exprs.ST);
1239 Dir->setEnsureUpperBound(Exprs.EUB);
1240 Dir->setNextLowerBound(Exprs.NLB);
1241 Dir->setNextUpperBound(Exprs.NUB);
1242 Dir->setNumIterations(Exprs.NumIterations);
1243 Dir->setCounters(Exprs.Counters);
1244 Dir->setPrivateCounters(Exprs.PrivateCounters);
1245 Dir->setInits(Exprs.Inits);
1246 Dir->setUpdates(Exprs.Updates);
1247 Dir->setFinals(Exprs.Finals);
1248 Dir->setDependentCounters(Exprs.DependentCounters);
1249 Dir->setDependentInits(Exprs.DependentInits);
1250 Dir->setFinalsConditions(Exprs.FinalsConditions);
1251 Dir->setPreInits(Exprs.PreInits);
1252 Dir->setHasCancel(HasCancel);
1253 return Dir;
1254}
1255
1258 unsigned NumClauses,
1259 unsigned CollapsedNum, EmptyShell) {
1260 return createEmptyDirective<OMPMasterTaskLoopDirective>(
1261 C, NumClauses, /*HasAssociatedStmt=*/true,
1262 numLoopChildren(CollapsedNum, OMPD_master_taskloop), CollapsedNum);
1263}
1264
1266 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1267 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1268 const HelperExprs &Exprs, bool HasCancel) {
1269 auto *Dir = createDirective<OMPMaskedTaskLoopDirective>(
1270 C, Clauses, AssociatedStmt,
1271 numLoopChildren(CollapsedNum, OMPD_masked_taskloop), StartLoc, EndLoc,
1272 CollapsedNum);
1273 Dir->setIterationVariable(Exprs.IterationVarRef);
1274 Dir->setLastIteration(Exprs.LastIteration);
1275 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1276 Dir->setPreCond(Exprs.PreCond);
1277 Dir->setCond(Exprs.Cond);
1278 Dir->setInit(Exprs.Init);
1279 Dir->setInc(Exprs.Inc);
1280 Dir->setIsLastIterVariable(Exprs.IL);
1281 Dir->setLowerBoundVariable(Exprs.LB);
1282 Dir->setUpperBoundVariable(Exprs.UB);
1283 Dir->setStrideVariable(Exprs.ST);
1284 Dir->setEnsureUpperBound(Exprs.EUB);
1285 Dir->setNextLowerBound(Exprs.NLB);
1286 Dir->setNextUpperBound(Exprs.NUB);
1287 Dir->setNumIterations(Exprs.NumIterations);
1288 Dir->setCounters(Exprs.Counters);
1289 Dir->setPrivateCounters(Exprs.PrivateCounters);
1290 Dir->setInits(Exprs.Inits);
1291 Dir->setUpdates(Exprs.Updates);
1292 Dir->setFinals(Exprs.Finals);
1293 Dir->setDependentCounters(Exprs.DependentCounters);
1294 Dir->setDependentInits(Exprs.DependentInits);
1295 Dir->setFinalsConditions(Exprs.FinalsConditions);
1296 Dir->setPreInits(Exprs.PreInits);
1297 Dir->setHasCancel(HasCancel);
1298 return Dir;
1299}
1300
1303 unsigned NumClauses,
1304 unsigned CollapsedNum, EmptyShell) {
1305 return createEmptyDirective<OMPMaskedTaskLoopDirective>(
1306 C, NumClauses, /*HasAssociatedStmt=*/true,
1307 numLoopChildren(CollapsedNum, OMPD_masked_taskloop), CollapsedNum);
1308}
1309
1311 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1312 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1313 const HelperExprs &Exprs) {
1314 auto *Dir = createDirective<OMPMasterTaskLoopSimdDirective>(
1315 C, Clauses, AssociatedStmt,
1316 numLoopChildren(CollapsedNum, OMPD_master_taskloop_simd), StartLoc,
1317 EndLoc, CollapsedNum);
1318 Dir->setIterationVariable(Exprs.IterationVarRef);
1319 Dir->setLastIteration(Exprs.LastIteration);
1320 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1321 Dir->setPreCond(Exprs.PreCond);
1322 Dir->setCond(Exprs.Cond);
1323 Dir->setInit(Exprs.Init);
1324 Dir->setInc(Exprs.Inc);
1325 Dir->setIsLastIterVariable(Exprs.IL);
1326 Dir->setLowerBoundVariable(Exprs.LB);
1327 Dir->setUpperBoundVariable(Exprs.UB);
1328 Dir->setStrideVariable(Exprs.ST);
1329 Dir->setEnsureUpperBound(Exprs.EUB);
1330 Dir->setNextLowerBound(Exprs.NLB);
1331 Dir->setNextUpperBound(Exprs.NUB);
1332 Dir->setNumIterations(Exprs.NumIterations);
1333 Dir->setCounters(Exprs.Counters);
1334 Dir->setPrivateCounters(Exprs.PrivateCounters);
1335 Dir->setInits(Exprs.Inits);
1336 Dir->setUpdates(Exprs.Updates);
1337 Dir->setFinals(Exprs.Finals);
1338 Dir->setDependentCounters(Exprs.DependentCounters);
1339 Dir->setDependentInits(Exprs.DependentInits);
1340 Dir->setFinalsConditions(Exprs.FinalsConditions);
1341 Dir->setPreInits(Exprs.PreInits);
1342 return Dir;
1343}
1344
1347 unsigned NumClauses,
1348 unsigned CollapsedNum, EmptyShell) {
1349 return createEmptyDirective<OMPMasterTaskLoopSimdDirective>(
1350 C, NumClauses, /*HasAssociatedStmt=*/true,
1351 numLoopChildren(CollapsedNum, OMPD_master_taskloop_simd), CollapsedNum);
1352}
1353
1355 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1356 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1357 const HelperExprs &Exprs) {
1358 auto *Dir = createDirective<OMPMaskedTaskLoopSimdDirective>(
1359 C, Clauses, AssociatedStmt,
1360 numLoopChildren(CollapsedNum, OMPD_masked_taskloop_simd), StartLoc,
1361 EndLoc, CollapsedNum);
1362 Dir->setIterationVariable(Exprs.IterationVarRef);
1363 Dir->setLastIteration(Exprs.LastIteration);
1364 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1365 Dir->setPreCond(Exprs.PreCond);
1366 Dir->setCond(Exprs.Cond);
1367 Dir->setInit(Exprs.Init);
1368 Dir->setInc(Exprs.Inc);
1369 Dir->setIsLastIterVariable(Exprs.IL);
1370 Dir->setLowerBoundVariable(Exprs.LB);
1371 Dir->setUpperBoundVariable(Exprs.UB);
1372 Dir->setStrideVariable(Exprs.ST);
1373 Dir->setEnsureUpperBound(Exprs.EUB);
1374 Dir->setNextLowerBound(Exprs.NLB);
1375 Dir->setNextUpperBound(Exprs.NUB);
1376 Dir->setNumIterations(Exprs.NumIterations);
1377 Dir->setCounters(Exprs.Counters);
1378 Dir->setPrivateCounters(Exprs.PrivateCounters);
1379 Dir->setInits(Exprs.Inits);
1380 Dir->setUpdates(Exprs.Updates);
1381 Dir->setFinals(Exprs.Finals);
1382 Dir->setDependentCounters(Exprs.DependentCounters);
1383 Dir->setDependentInits(Exprs.DependentInits);
1384 Dir->setFinalsConditions(Exprs.FinalsConditions);
1385 Dir->setPreInits(Exprs.PreInits);
1386 return Dir;
1387}
1388
1391 unsigned NumClauses,
1392 unsigned CollapsedNum, EmptyShell) {
1393 return createEmptyDirective<OMPMaskedTaskLoopSimdDirective>(
1394 C, NumClauses, /*HasAssociatedStmt=*/true,
1395 numLoopChildren(CollapsedNum, OMPD_masked_taskloop_simd), CollapsedNum);
1396}
1397
1399 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1400 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1401 const HelperExprs &Exprs, bool HasCancel) {
1402 auto *Dir = createDirective<OMPParallelMasterTaskLoopDirective>(
1403 C, Clauses, AssociatedStmt,
1404 numLoopChildren(CollapsedNum, OMPD_parallel_master_taskloop), StartLoc,
1405 EndLoc, CollapsedNum);
1406 Dir->setIterationVariable(Exprs.IterationVarRef);
1407 Dir->setLastIteration(Exprs.LastIteration);
1408 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1409 Dir->setPreCond(Exprs.PreCond);
1410 Dir->setCond(Exprs.Cond);
1411 Dir->setInit(Exprs.Init);
1412 Dir->setInc(Exprs.Inc);
1413 Dir->setIsLastIterVariable(Exprs.IL);
1414 Dir->setLowerBoundVariable(Exprs.LB);
1415 Dir->setUpperBoundVariable(Exprs.UB);
1416 Dir->setStrideVariable(Exprs.ST);
1417 Dir->setEnsureUpperBound(Exprs.EUB);
1418 Dir->setNextLowerBound(Exprs.NLB);
1419 Dir->setNextUpperBound(Exprs.NUB);
1420 Dir->setNumIterations(Exprs.NumIterations);
1421 Dir->setCounters(Exprs.Counters);
1422 Dir->setPrivateCounters(Exprs.PrivateCounters);
1423 Dir->setInits(Exprs.Inits);
1424 Dir->setUpdates(Exprs.Updates);
1425 Dir->setFinals(Exprs.Finals);
1426 Dir->setDependentCounters(Exprs.DependentCounters);
1427 Dir->setDependentInits(Exprs.DependentInits);
1428 Dir->setFinalsConditions(Exprs.FinalsConditions);
1429 Dir->setPreInits(Exprs.PreInits);
1430 Dir->setHasCancel(HasCancel);
1431 return Dir;
1432}
1433
1436 unsigned NumClauses,
1437 unsigned CollapsedNum,
1438 EmptyShell) {
1439 return createEmptyDirective<OMPParallelMasterTaskLoopDirective>(
1440 C, NumClauses, /*HasAssociatedStmt=*/true,
1441 numLoopChildren(CollapsedNum, OMPD_parallel_master_taskloop),
1442 CollapsedNum);
1443}
1444
1446 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1447 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1448 const HelperExprs &Exprs, bool HasCancel) {
1449 auto *Dir = createDirective<OMPParallelMaskedTaskLoopDirective>(
1450 C, Clauses, AssociatedStmt,
1451 numLoopChildren(CollapsedNum, OMPD_parallel_masked_taskloop), StartLoc,
1452 EndLoc, CollapsedNum);
1453 Dir->setIterationVariable(Exprs.IterationVarRef);
1454 Dir->setLastIteration(Exprs.LastIteration);
1455 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1456 Dir->setPreCond(Exprs.PreCond);
1457 Dir->setCond(Exprs.Cond);
1458 Dir->setInit(Exprs.Init);
1459 Dir->setInc(Exprs.Inc);
1460 Dir->setIsLastIterVariable(Exprs.IL);
1461 Dir->setLowerBoundVariable(Exprs.LB);
1462 Dir->setUpperBoundVariable(Exprs.UB);
1463 Dir->setStrideVariable(Exprs.ST);
1464 Dir->setEnsureUpperBound(Exprs.EUB);
1465 Dir->setNextLowerBound(Exprs.NLB);
1466 Dir->setNextUpperBound(Exprs.NUB);
1467 Dir->setNumIterations(Exprs.NumIterations);
1468 Dir->setCounters(Exprs.Counters);
1469 Dir->setPrivateCounters(Exprs.PrivateCounters);
1470 Dir->setInits(Exprs.Inits);
1471 Dir->setUpdates(Exprs.Updates);
1472 Dir->setFinals(Exprs.Finals);
1473 Dir->setDependentCounters(Exprs.DependentCounters);
1474 Dir->setDependentInits(Exprs.DependentInits);
1475 Dir->setFinalsConditions(Exprs.FinalsConditions);
1476 Dir->setPreInits(Exprs.PreInits);
1477 Dir->setHasCancel(HasCancel);
1478 return Dir;
1479}
1480
1483 unsigned NumClauses,
1484 unsigned CollapsedNum,
1485 EmptyShell) {
1486 return createEmptyDirective<OMPParallelMaskedTaskLoopDirective>(
1487 C, NumClauses, /*HasAssociatedStmt=*/true,
1488 numLoopChildren(CollapsedNum, OMPD_parallel_masked_taskloop),
1489 CollapsedNum);
1490}
1491
1494 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1495 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1496 const HelperExprs &Exprs) {
1497 auto *Dir = createDirective<OMPParallelMasterTaskLoopSimdDirective>(
1498 C, Clauses, AssociatedStmt,
1499 numLoopChildren(CollapsedNum, OMPD_parallel_master_taskloop_simd),
1500 StartLoc, EndLoc, CollapsedNum);
1501 Dir->setIterationVariable(Exprs.IterationVarRef);
1502 Dir->setLastIteration(Exprs.LastIteration);
1503 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1504 Dir->setPreCond(Exprs.PreCond);
1505 Dir->setCond(Exprs.Cond);
1506 Dir->setInit(Exprs.Init);
1507 Dir->setInc(Exprs.Inc);
1508 Dir->setIsLastIterVariable(Exprs.IL);
1509 Dir->setLowerBoundVariable(Exprs.LB);
1510 Dir->setUpperBoundVariable(Exprs.UB);
1511 Dir->setStrideVariable(Exprs.ST);
1512 Dir->setEnsureUpperBound(Exprs.EUB);
1513 Dir->setNextLowerBound(Exprs.NLB);
1514 Dir->setNextUpperBound(Exprs.NUB);
1515 Dir->setNumIterations(Exprs.NumIterations);
1516 Dir->setCounters(Exprs.Counters);
1517 Dir->setPrivateCounters(Exprs.PrivateCounters);
1518 Dir->setInits(Exprs.Inits);
1519 Dir->setUpdates(Exprs.Updates);
1520 Dir->setFinals(Exprs.Finals);
1521 Dir->setDependentCounters(Exprs.DependentCounters);
1522 Dir->setDependentInits(Exprs.DependentInits);
1523 Dir->setFinalsConditions(Exprs.FinalsConditions);
1524 Dir->setPreInits(Exprs.PreInits);
1525 return Dir;
1526}
1527
1530 unsigned NumClauses,
1531 unsigned CollapsedNum,
1532 EmptyShell) {
1533 return createEmptyDirective<OMPParallelMasterTaskLoopSimdDirective>(
1534 C, NumClauses, /*HasAssociatedStmt=*/true,
1535 numLoopChildren(CollapsedNum, OMPD_parallel_master_taskloop_simd),
1536 CollapsedNum);
1537}
1538
1541 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1542 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1543 const HelperExprs &Exprs) {
1544 auto *Dir = createDirective<OMPParallelMaskedTaskLoopSimdDirective>(
1545 C, Clauses, AssociatedStmt,
1546 numLoopChildren(CollapsedNum, OMPD_parallel_masked_taskloop_simd),
1547 StartLoc, EndLoc, CollapsedNum);
1548 Dir->setIterationVariable(Exprs.IterationVarRef);
1549 Dir->setLastIteration(Exprs.LastIteration);
1550 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1551 Dir->setPreCond(Exprs.PreCond);
1552 Dir->setCond(Exprs.Cond);
1553 Dir->setInit(Exprs.Init);
1554 Dir->setInc(Exprs.Inc);
1555 Dir->setIsLastIterVariable(Exprs.IL);
1556 Dir->setLowerBoundVariable(Exprs.LB);
1557 Dir->setUpperBoundVariable(Exprs.UB);
1558 Dir->setStrideVariable(Exprs.ST);
1559 Dir->setEnsureUpperBound(Exprs.EUB);
1560 Dir->setNextLowerBound(Exprs.NLB);
1561 Dir->setNextUpperBound(Exprs.NUB);
1562 Dir->setNumIterations(Exprs.NumIterations);
1563 Dir->setCounters(Exprs.Counters);
1564 Dir->setPrivateCounters(Exprs.PrivateCounters);
1565 Dir->setInits(Exprs.Inits);
1566 Dir->setUpdates(Exprs.Updates);
1567 Dir->setFinals(Exprs.Finals);
1568 Dir->setDependentCounters(Exprs.DependentCounters);
1569 Dir->setDependentInits(Exprs.DependentInits);
1570 Dir->setFinalsConditions(Exprs.FinalsConditions);
1571 Dir->setPreInits(Exprs.PreInits);
1572 return Dir;
1573}
1574
1577 unsigned NumClauses,
1578 unsigned CollapsedNum,
1579 EmptyShell) {
1580 return createEmptyDirective<OMPParallelMaskedTaskLoopSimdDirective>(
1581 C, NumClauses, /*HasAssociatedStmt=*/true,
1582 numLoopChildren(CollapsedNum, OMPD_parallel_masked_taskloop_simd),
1583 CollapsedNum);
1584}
1585
1588 SourceLocation EndLoc, unsigned CollapsedNum,
1589 ArrayRef<OMPClause *> Clauses,
1590 Stmt *AssociatedStmt, const HelperExprs &Exprs) {
1591 auto *Dir = createDirective<OMPDistributeDirective>(
1592 C, Clauses, AssociatedStmt,
1593 numLoopChildren(CollapsedNum, OMPD_distribute), StartLoc, EndLoc,
1594 CollapsedNum);
1595 Dir->setIterationVariable(Exprs.IterationVarRef);
1596 Dir->setLastIteration(Exprs.LastIteration);
1597 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1598 Dir->setPreCond(Exprs.PreCond);
1599 Dir->setCond(Exprs.Cond);
1600 Dir->setInit(Exprs.Init);
1601 Dir->setInc(Exprs.Inc);
1602 Dir->setIsLastIterVariable(Exprs.IL);
1603 Dir->setLowerBoundVariable(Exprs.LB);
1604 Dir->setUpperBoundVariable(Exprs.UB);
1605 Dir->setStrideVariable(Exprs.ST);
1606 Dir->setEnsureUpperBound(Exprs.EUB);
1607 Dir->setNextLowerBound(Exprs.NLB);
1608 Dir->setNextUpperBound(Exprs.NUB);
1609 Dir->setNumIterations(Exprs.NumIterations);
1610 Dir->setCounters(Exprs.Counters);
1611 Dir->setPrivateCounters(Exprs.PrivateCounters);
1612 Dir->setInits(Exprs.Inits);
1613 Dir->setUpdates(Exprs.Updates);
1614 Dir->setFinals(Exprs.Finals);
1615 Dir->setDependentCounters(Exprs.DependentCounters);
1616 Dir->setDependentInits(Exprs.DependentInits);
1617 Dir->setFinalsConditions(Exprs.FinalsConditions);
1618 Dir->setPreInits(Exprs.PreInits);
1619 return Dir;
1620}
1621
1624 unsigned CollapsedNum, EmptyShell) {
1625 return createEmptyDirective<OMPDistributeDirective>(
1626 C, NumClauses, /*HasAssociatedStmt=*/true,
1627 numLoopChildren(CollapsedNum, OMPD_distribute), CollapsedNum);
1628}
1629
1631 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1632 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt) {
1633 return createDirective<OMPTargetUpdateDirective>(C, Clauses, AssociatedStmt,
1634 /*NumChildren=*/0, StartLoc,
1635 EndLoc);
1636}
1637
1640 EmptyShell) {
1641 return createEmptyDirective<OMPTargetUpdateDirective>(
1642 C, NumClauses, /*HasAssociatedStmt=*/true);
1643}
1644
1646 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1647 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1648 const HelperExprs &Exprs, Expr *TaskRedRef, bool HasCancel) {
1649 auto *Dir = createDirective<OMPDistributeParallelForDirective>(
1650 C, Clauses, AssociatedStmt,
1651 numLoopChildren(CollapsedNum, OMPD_distribute_parallel_for) + 1, StartLoc,
1652 EndLoc, CollapsedNum);
1653 Dir->setIterationVariable(Exprs.IterationVarRef);
1654 Dir->setLastIteration(Exprs.LastIteration);
1655 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1656 Dir->setPreCond(Exprs.PreCond);
1657 Dir->setCond(Exprs.Cond);
1658 Dir->setInit(Exprs.Init);
1659 Dir->setInc(Exprs.Inc);
1660 Dir->setIsLastIterVariable(Exprs.IL);
1661 Dir->setLowerBoundVariable(Exprs.LB);
1662 Dir->setUpperBoundVariable(Exprs.UB);
1663 Dir->setStrideVariable(Exprs.ST);
1664 Dir->setEnsureUpperBound(Exprs.EUB);
1665 Dir->setNextLowerBound(Exprs.NLB);
1666 Dir->setNextUpperBound(Exprs.NUB);
1667 Dir->setNumIterations(Exprs.NumIterations);
1668 Dir->setPrevLowerBoundVariable(Exprs.PrevLB);
1669 Dir->setPrevUpperBoundVariable(Exprs.PrevUB);
1670 Dir->setDistInc(Exprs.DistInc);
1671 Dir->setPrevEnsureUpperBound(Exprs.PrevEUB);
1672 Dir->setCounters(Exprs.Counters);
1673 Dir->setPrivateCounters(Exprs.PrivateCounters);
1674 Dir->setInits(Exprs.Inits);
1675 Dir->setUpdates(Exprs.Updates);
1676 Dir->setFinals(Exprs.Finals);
1677 Dir->setDependentCounters(Exprs.DependentCounters);
1678 Dir->setDependentInits(Exprs.DependentInits);
1679 Dir->setFinalsConditions(Exprs.FinalsConditions);
1680 Dir->setPreInits(Exprs.PreInits);
1681 Dir->setCombinedLowerBoundVariable(Exprs.DistCombinedFields.LB);
1682 Dir->setCombinedUpperBoundVariable(Exprs.DistCombinedFields.UB);
1683 Dir->setCombinedEnsureUpperBound(Exprs.DistCombinedFields.EUB);
1684 Dir->setCombinedInit(Exprs.DistCombinedFields.Init);
1685 Dir->setCombinedCond(Exprs.DistCombinedFields.Cond);
1686 Dir->setCombinedNextLowerBound(Exprs.DistCombinedFields.NLB);
1687 Dir->setCombinedNextUpperBound(Exprs.DistCombinedFields.NUB);
1688 Dir->setCombinedDistCond(Exprs.DistCombinedFields.DistCond);
1689 Dir->setCombinedParForInDistCond(Exprs.DistCombinedFields.ParForInDistCond);
1690 Dir->setTaskReductionRefExpr(TaskRedRef);
1691 Dir->HasCancel = HasCancel;
1692 return Dir;
1693}
1694
1697 unsigned NumClauses,
1698 unsigned CollapsedNum,
1699 EmptyShell) {
1700 return createEmptyDirective<OMPDistributeParallelForDirective>(
1701 C, NumClauses, /*HasAssociatedStmt=*/true,
1702 numLoopChildren(CollapsedNum, OMPD_distribute_parallel_for) + 1,
1703 CollapsedNum);
1704}
1705
1708 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1709 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1710 const HelperExprs &Exprs) {
1711 auto *Dir = createDirective<OMPDistributeParallelForSimdDirective>(
1712 C, Clauses, AssociatedStmt,
1713 numLoopChildren(CollapsedNum, OMPD_distribute_parallel_for_simd),
1714 StartLoc, EndLoc, CollapsedNum);
1715 Dir->setIterationVariable(Exprs.IterationVarRef);
1716 Dir->setLastIteration(Exprs.LastIteration);
1717 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1718 Dir->setPreCond(Exprs.PreCond);
1719 Dir->setCond(Exprs.Cond);
1720 Dir->setInit(Exprs.Init);
1721 Dir->setInc(Exprs.Inc);
1722 Dir->setIsLastIterVariable(Exprs.IL);
1723 Dir->setLowerBoundVariable(Exprs.LB);
1724 Dir->setUpperBoundVariable(Exprs.UB);
1725 Dir->setStrideVariable(Exprs.ST);
1726 Dir->setEnsureUpperBound(Exprs.EUB);
1727 Dir->setNextLowerBound(Exprs.NLB);
1728 Dir->setNextUpperBound(Exprs.NUB);
1729 Dir->setNumIterations(Exprs.NumIterations);
1730 Dir->setPrevLowerBoundVariable(Exprs.PrevLB);
1731 Dir->setPrevUpperBoundVariable(Exprs.PrevUB);
1732 Dir->setDistInc(Exprs.DistInc);
1733 Dir->setPrevEnsureUpperBound(Exprs.PrevEUB);
1734 Dir->setCounters(Exprs.Counters);
1735 Dir->setPrivateCounters(Exprs.PrivateCounters);
1736 Dir->setInits(Exprs.Inits);
1737 Dir->setUpdates(Exprs.Updates);
1738 Dir->setFinals(Exprs.Finals);
1739 Dir->setDependentCounters(Exprs.DependentCounters);
1740 Dir->setDependentInits(Exprs.DependentInits);
1741 Dir->setFinalsConditions(Exprs.FinalsConditions);
1742 Dir->setPreInits(Exprs.PreInits);
1743 Dir->setCombinedLowerBoundVariable(Exprs.DistCombinedFields.LB);
1744 Dir->setCombinedUpperBoundVariable(Exprs.DistCombinedFields.UB);
1745 Dir->setCombinedEnsureUpperBound(Exprs.DistCombinedFields.EUB);
1746 Dir->setCombinedInit(Exprs.DistCombinedFields.Init);
1747 Dir->setCombinedCond(Exprs.DistCombinedFields.Cond);
1748 Dir->setCombinedNextLowerBound(Exprs.DistCombinedFields.NLB);
1749 Dir->setCombinedNextUpperBound(Exprs.DistCombinedFields.NUB);
1750 Dir->setCombinedDistCond(Exprs.DistCombinedFields.DistCond);
1751 Dir->setCombinedParForInDistCond(Exprs.DistCombinedFields.ParForInDistCond);
1752 return Dir;
1753}
1754
1757 unsigned NumClauses,
1758 unsigned CollapsedNum,
1759 EmptyShell) {
1760 return createEmptyDirective<OMPDistributeParallelForSimdDirective>(
1761 C, NumClauses, /*HasAssociatedStmt=*/true,
1762 numLoopChildren(CollapsedNum, OMPD_distribute_parallel_for_simd),
1763 CollapsedNum);
1764}
1765
1767 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1768 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1769 const HelperExprs &Exprs) {
1770 auto *Dir = createDirective<OMPDistributeSimdDirective>(
1771 C, Clauses, AssociatedStmt,
1772 numLoopChildren(CollapsedNum, OMPD_distribute_simd), StartLoc, EndLoc,
1773 CollapsedNum);
1774 Dir->setIterationVariable(Exprs.IterationVarRef);
1775 Dir->setLastIteration(Exprs.LastIteration);
1776 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1777 Dir->setPreCond(Exprs.PreCond);
1778 Dir->setCond(Exprs.Cond);
1779 Dir->setInit(Exprs.Init);
1780 Dir->setInc(Exprs.Inc);
1781 Dir->setIsLastIterVariable(Exprs.IL);
1782 Dir->setLowerBoundVariable(Exprs.LB);
1783 Dir->setUpperBoundVariable(Exprs.UB);
1784 Dir->setStrideVariable(Exprs.ST);
1785 Dir->setEnsureUpperBound(Exprs.EUB);
1786 Dir->setNextLowerBound(Exprs.NLB);
1787 Dir->setNextUpperBound(Exprs.NUB);
1788 Dir->setNumIterations(Exprs.NumIterations);
1789 Dir->setCounters(Exprs.Counters);
1790 Dir->setPrivateCounters(Exprs.PrivateCounters);
1791 Dir->setInits(Exprs.Inits);
1792 Dir->setUpdates(Exprs.Updates);
1793 Dir->setFinals(Exprs.Finals);
1794 Dir->setDependentCounters(Exprs.DependentCounters);
1795 Dir->setDependentInits(Exprs.DependentInits);
1796 Dir->setFinalsConditions(Exprs.FinalsConditions);
1797 Dir->setPreInits(Exprs.PreInits);
1798 return Dir;
1799}
1800
1803 unsigned NumClauses,
1804 unsigned CollapsedNum, EmptyShell) {
1805 return createEmptyDirective<OMPDistributeSimdDirective>(
1806 C, NumClauses, /*HasAssociatedStmt=*/true,
1807 numLoopChildren(CollapsedNum, OMPD_distribute_simd), CollapsedNum);
1808}
1809
1811 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1812 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1813 const HelperExprs &Exprs) {
1814 auto *Dir = createDirective<OMPTargetParallelForSimdDirective>(
1815 C, Clauses, AssociatedStmt,
1816 numLoopChildren(CollapsedNum, OMPD_target_parallel_for_simd), StartLoc,
1817 EndLoc, CollapsedNum);
1818 Dir->setIterationVariable(Exprs.IterationVarRef);
1819 Dir->setLastIteration(Exprs.LastIteration);
1820 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1821 Dir->setPreCond(Exprs.PreCond);
1822 Dir->setCond(Exprs.Cond);
1823 Dir->setInit(Exprs.Init);
1824 Dir->setInc(Exprs.Inc);
1825 Dir->setIsLastIterVariable(Exprs.IL);
1826 Dir->setLowerBoundVariable(Exprs.LB);
1827 Dir->setUpperBoundVariable(Exprs.UB);
1828 Dir->setStrideVariable(Exprs.ST);
1829 Dir->setEnsureUpperBound(Exprs.EUB);
1830 Dir->setNextLowerBound(Exprs.NLB);
1831 Dir->setNextUpperBound(Exprs.NUB);
1832 Dir->setNumIterations(Exprs.NumIterations);
1833 Dir->setCounters(Exprs.Counters);
1834 Dir->setPrivateCounters(Exprs.PrivateCounters);
1835 Dir->setInits(Exprs.Inits);
1836 Dir->setUpdates(Exprs.Updates);
1837 Dir->setFinals(Exprs.Finals);
1838 Dir->setDependentCounters(Exprs.DependentCounters);
1839 Dir->setDependentInits(Exprs.DependentInits);
1840 Dir->setFinalsConditions(Exprs.FinalsConditions);
1841 Dir->setPreInits(Exprs.PreInits);
1842 return Dir;
1843}
1844
1847 unsigned NumClauses,
1848 unsigned CollapsedNum,
1849 EmptyShell) {
1850 return createEmptyDirective<OMPTargetParallelForSimdDirective>(
1851 C, NumClauses, /*HasAssociatedStmt=*/true,
1852 numLoopChildren(CollapsedNum, OMPD_target_parallel_for_simd),
1853 CollapsedNum);
1854}
1855
1858 SourceLocation EndLoc, unsigned CollapsedNum,
1859 ArrayRef<OMPClause *> Clauses,
1860 Stmt *AssociatedStmt, const HelperExprs &Exprs) {
1861 auto *Dir = createDirective<OMPTargetSimdDirective>(
1862 C, Clauses, AssociatedStmt,
1863 numLoopChildren(CollapsedNum, OMPD_target_simd), StartLoc, EndLoc,
1864 CollapsedNum);
1865 Dir->setIterationVariable(Exprs.IterationVarRef);
1866 Dir->setLastIteration(Exprs.LastIteration);
1867 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1868 Dir->setPreCond(Exprs.PreCond);
1869 Dir->setCond(Exprs.Cond);
1870 Dir->setInit(Exprs.Init);
1871 Dir->setInc(Exprs.Inc);
1872 Dir->setCounters(Exprs.Counters);
1873 Dir->setPrivateCounters(Exprs.PrivateCounters);
1874 Dir->setInits(Exprs.Inits);
1875 Dir->setUpdates(Exprs.Updates);
1876 Dir->setFinals(Exprs.Finals);
1877 Dir->setDependentCounters(Exprs.DependentCounters);
1878 Dir->setDependentInits(Exprs.DependentInits);
1879 Dir->setFinalsConditions(Exprs.FinalsConditions);
1880 Dir->setPreInits(Exprs.PreInits);
1881 return Dir;
1882}
1883
1886 unsigned CollapsedNum, EmptyShell) {
1887 return createEmptyDirective<OMPTargetSimdDirective>(
1888 C, NumClauses, /*HasAssociatedStmt=*/true,
1889 numLoopChildren(CollapsedNum, OMPD_target_simd), CollapsedNum);
1890}
1891
1893 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1894 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1895 const HelperExprs &Exprs) {
1896 auto *Dir = createDirective<OMPTeamsDistributeDirective>(
1897 C, Clauses, AssociatedStmt,
1898 numLoopChildren(CollapsedNum, OMPD_teams_distribute), StartLoc, EndLoc,
1899 CollapsedNum);
1900 Dir->setIterationVariable(Exprs.IterationVarRef);
1901 Dir->setLastIteration(Exprs.LastIteration);
1902 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1903 Dir->setPreCond(Exprs.PreCond);
1904 Dir->setCond(Exprs.Cond);
1905 Dir->setInit(Exprs.Init);
1906 Dir->setInc(Exprs.Inc);
1907 Dir->setIsLastIterVariable(Exprs.IL);
1908 Dir->setLowerBoundVariable(Exprs.LB);
1909 Dir->setUpperBoundVariable(Exprs.UB);
1910 Dir->setStrideVariable(Exprs.ST);
1911 Dir->setEnsureUpperBound(Exprs.EUB);
1912 Dir->setNextLowerBound(Exprs.NLB);
1913 Dir->setNextUpperBound(Exprs.NUB);
1914 Dir->setNumIterations(Exprs.NumIterations);
1915 Dir->setCounters(Exprs.Counters);
1916 Dir->setPrivateCounters(Exprs.PrivateCounters);
1917 Dir->setInits(Exprs.Inits);
1918 Dir->setUpdates(Exprs.Updates);
1919 Dir->setFinals(Exprs.Finals);
1920 Dir->setDependentCounters(Exprs.DependentCounters);
1921 Dir->setDependentInits(Exprs.DependentInits);
1922 Dir->setFinalsConditions(Exprs.FinalsConditions);
1923 Dir->setPreInits(Exprs.PreInits);
1924 return Dir;
1925}
1926
1929 unsigned NumClauses,
1930 unsigned CollapsedNum, EmptyShell) {
1931 return createEmptyDirective<OMPTeamsDistributeDirective>(
1932 C, NumClauses, /*HasAssociatedStmt=*/true,
1933 numLoopChildren(CollapsedNum, OMPD_teams_distribute), CollapsedNum);
1934}
1935
1937 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1938 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1939 const HelperExprs &Exprs) {
1940 auto *Dir = createDirective<OMPTeamsDistributeSimdDirective>(
1941 C, Clauses, AssociatedStmt,
1942 numLoopChildren(CollapsedNum, OMPD_teams_distribute_simd), StartLoc,
1943 EndLoc, CollapsedNum);
1944 Dir->setIterationVariable(Exprs.IterationVarRef);
1945 Dir->setLastIteration(Exprs.LastIteration);
1946 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1947 Dir->setPreCond(Exprs.PreCond);
1948 Dir->setCond(Exprs.Cond);
1949 Dir->setInit(Exprs.Init);
1950 Dir->setInc(Exprs.Inc);
1951 Dir->setIsLastIterVariable(Exprs.IL);
1952 Dir->setLowerBoundVariable(Exprs.LB);
1953 Dir->setUpperBoundVariable(Exprs.UB);
1954 Dir->setStrideVariable(Exprs.ST);
1955 Dir->setEnsureUpperBound(Exprs.EUB);
1956 Dir->setNextLowerBound(Exprs.NLB);
1957 Dir->setNextUpperBound(Exprs.NUB);
1958 Dir->setNumIterations(Exprs.NumIterations);
1959 Dir->setCounters(Exprs.Counters);
1960 Dir->setPrivateCounters(Exprs.PrivateCounters);
1961 Dir->setInits(Exprs.Inits);
1962 Dir->setUpdates(Exprs.Updates);
1963 Dir->setFinals(Exprs.Finals);
1964 Dir->setDependentCounters(Exprs.DependentCounters);
1965 Dir->setDependentInits(Exprs.DependentInits);
1966 Dir->setFinalsConditions(Exprs.FinalsConditions);
1967 Dir->setPreInits(Exprs.PreInits);
1968 return Dir;
1969}
1970
1972 const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum,
1973 EmptyShell) {
1974 return createEmptyDirective<OMPTeamsDistributeSimdDirective>(
1975 C, NumClauses, /*HasAssociatedStmt=*/true,
1976 numLoopChildren(CollapsedNum, OMPD_teams_distribute_simd), CollapsedNum);
1977}
1978
1981 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1982 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1983 const HelperExprs &Exprs) {
1984 auto *Dir = createDirective<OMPTeamsDistributeParallelForSimdDirective>(
1985 C, Clauses, AssociatedStmt,
1986 numLoopChildren(CollapsedNum, OMPD_teams_distribute_parallel_for_simd),
1987 StartLoc, EndLoc, CollapsedNum);
1988 Dir->setIterationVariable(Exprs.IterationVarRef);
1989 Dir->setLastIteration(Exprs.LastIteration);
1990 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1991 Dir->setPreCond(Exprs.PreCond);
1992 Dir->setCond(Exprs.Cond);
1993 Dir->setInit(Exprs.Init);
1994 Dir->setInc(Exprs.Inc);
1995 Dir->setIsLastIterVariable(Exprs.IL);
1996 Dir->setLowerBoundVariable(Exprs.LB);
1997 Dir->setUpperBoundVariable(Exprs.UB);
1998 Dir->setStrideVariable(Exprs.ST);
1999 Dir->setEnsureUpperBound(Exprs.EUB);
2000 Dir->setNextLowerBound(Exprs.NLB);
2001 Dir->setNextUpperBound(Exprs.NUB);
2002 Dir->setNumIterations(Exprs.NumIterations);
2003 Dir->setPrevLowerBoundVariable(Exprs.PrevLB);
2004 Dir->setPrevUpperBoundVariable(Exprs.PrevUB);
2005 Dir->setDistInc(Exprs.DistInc);
2006 Dir->setPrevEnsureUpperBound(Exprs.PrevEUB);
2007 Dir->setCounters(Exprs.Counters);
2008 Dir->setPrivateCounters(Exprs.PrivateCounters);
2009 Dir->setInits(Exprs.Inits);
2010 Dir->setUpdates(Exprs.Updates);
2011 Dir->setFinals(Exprs.Finals);
2012 Dir->setDependentCounters(Exprs.DependentCounters);
2013 Dir->setDependentInits(Exprs.DependentInits);
2014 Dir->setFinalsConditions(Exprs.FinalsConditions);
2015 Dir->setPreInits(Exprs.PreInits);
2016 Dir->setCombinedLowerBoundVariable(Exprs.DistCombinedFields.LB);
2017 Dir->setCombinedUpperBoundVariable(Exprs.DistCombinedFields.UB);
2018 Dir->setCombinedEnsureUpperBound(Exprs.DistCombinedFields.EUB);
2019 Dir->setCombinedInit(Exprs.DistCombinedFields.Init);
2020 Dir->setCombinedCond(Exprs.DistCombinedFields.Cond);
2021 Dir->setCombinedNextLowerBound(Exprs.DistCombinedFields.NLB);
2022 Dir->setCombinedNextUpperBound(Exprs.DistCombinedFields.NUB);
2023 Dir->setCombinedDistCond(Exprs.DistCombinedFields.DistCond);
2024 Dir->setCombinedParForInDistCond(Exprs.DistCombinedFields.ParForInDistCond);
2025 return Dir;
2026}
2027
2030 unsigned NumClauses,
2031 unsigned CollapsedNum,
2032 EmptyShell) {
2033 return createEmptyDirective<OMPTeamsDistributeParallelForSimdDirective>(
2034 C, NumClauses, /*HasAssociatedStmt=*/true,
2035 numLoopChildren(CollapsedNum, OMPD_teams_distribute_parallel_for_simd),
2036 CollapsedNum);
2037}
2038
2041 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2042 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
2043 const HelperExprs &Exprs, Expr *TaskRedRef, bool HasCancel) {
2044 auto *Dir = createDirective<OMPTeamsDistributeParallelForDirective>(
2045 C, Clauses, AssociatedStmt,
2046 numLoopChildren(CollapsedNum, OMPD_teams_distribute_parallel_for) + 1,
2047 StartLoc, EndLoc, CollapsedNum);
2048 Dir->setIterationVariable(Exprs.IterationVarRef);
2049 Dir->setLastIteration(Exprs.LastIteration);
2050 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
2051 Dir->setPreCond(Exprs.PreCond);
2052 Dir->setCond(Exprs.Cond);
2053 Dir->setInit(Exprs.Init);
2054 Dir->setInc(Exprs.Inc);
2055 Dir->setIsLastIterVariable(Exprs.IL);
2056 Dir->setLowerBoundVariable(Exprs.LB);
2057 Dir->setUpperBoundVariable(Exprs.UB);
2058 Dir->setStrideVariable(Exprs.ST);
2059 Dir->setEnsureUpperBound(Exprs.EUB);
2060 Dir->setNextLowerBound(Exprs.NLB);
2061 Dir->setNextUpperBound(Exprs.NUB);
2062 Dir->setNumIterations(Exprs.NumIterations);
2063 Dir->setPrevLowerBoundVariable(Exprs.PrevLB);
2064 Dir->setPrevUpperBoundVariable(Exprs.PrevUB);
2065 Dir->setDistInc(Exprs.DistInc);
2066 Dir->setPrevEnsureUpperBound(Exprs.PrevEUB);
2067 Dir->setCounters(Exprs.Counters);
2068 Dir->setPrivateCounters(Exprs.PrivateCounters);
2069 Dir->setInits(Exprs.Inits);
2070 Dir->setUpdates(Exprs.Updates);
2071 Dir->setFinals(Exprs.Finals);
2072 Dir->setDependentCounters(Exprs.DependentCounters);
2073 Dir->setDependentInits(Exprs.DependentInits);
2074 Dir->setFinalsConditions(Exprs.FinalsConditions);
2075 Dir->setPreInits(Exprs.PreInits);
2076 Dir->setCombinedLowerBoundVariable(Exprs.DistCombinedFields.LB);
2077 Dir->setCombinedUpperBoundVariable(Exprs.DistCombinedFields.UB);
2078 Dir->setCombinedEnsureUpperBound(Exprs.DistCombinedFields.EUB);
2079 Dir->setCombinedInit(Exprs.DistCombinedFields.Init);
2080 Dir->setCombinedCond(Exprs.DistCombinedFields.Cond);
2081 Dir->setCombinedNextLowerBound(Exprs.DistCombinedFields.NLB);
2082 Dir->setCombinedNextUpperBound(Exprs.DistCombinedFields.NUB);
2083 Dir->setCombinedDistCond(Exprs.DistCombinedFields.DistCond);
2084 Dir->setCombinedParForInDistCond(Exprs.DistCombinedFields.ParForInDistCond);
2085 Dir->setTaskReductionRefExpr(TaskRedRef);
2086 Dir->HasCancel = HasCancel;
2087 return Dir;
2088}
2089
2092 unsigned NumClauses,
2093 unsigned CollapsedNum,
2094 EmptyShell) {
2095 return createEmptyDirective<OMPTeamsDistributeParallelForDirective>(
2096 C, NumClauses, /*HasAssociatedStmt=*/true,
2097 numLoopChildren(CollapsedNum, OMPD_teams_distribute_parallel_for) + 1,
2098 CollapsedNum);
2099}
2100
2102 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2103 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt) {
2104 return createDirective<OMPTargetTeamsDirective>(C, Clauses, AssociatedStmt,
2105 /*NumChildren=*/0, StartLoc,
2106 EndLoc);
2107}
2108
2111 EmptyShell) {
2112 return createEmptyDirective<OMPTargetTeamsDirective>(
2113 C, NumClauses, /*HasAssociatedStmt=*/true);
2114}
2115
2117 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2118 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
2119 const HelperExprs &Exprs) {
2120 auto *Dir = createDirective<OMPTargetTeamsDistributeDirective>(
2121 C, Clauses, AssociatedStmt,
2122 numLoopChildren(CollapsedNum, OMPD_target_teams_distribute), StartLoc,
2123 EndLoc, CollapsedNum);
2124 Dir->setIterationVariable(Exprs.IterationVarRef);
2125 Dir->setLastIteration(Exprs.LastIteration);
2126 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
2127 Dir->setPreCond(Exprs.PreCond);
2128 Dir->setCond(Exprs.Cond);
2129 Dir->setInit(Exprs.Init);
2130 Dir->setInc(Exprs.Inc);
2131 Dir->setIsLastIterVariable(Exprs.IL);
2132 Dir->setLowerBoundVariable(Exprs.LB);
2133 Dir->setUpperBoundVariable(Exprs.UB);
2134 Dir->setStrideVariable(Exprs.ST);
2135 Dir->setEnsureUpperBound(Exprs.EUB);
2136 Dir->setNextLowerBound(Exprs.NLB);
2137 Dir->setNextUpperBound(Exprs.NUB);
2138 Dir->setNumIterations(Exprs.NumIterations);
2139 Dir->setCounters(Exprs.Counters);
2140 Dir->setPrivateCounters(Exprs.PrivateCounters);
2141 Dir->setInits(Exprs.Inits);
2142 Dir->setUpdates(Exprs.Updates);
2143 Dir->setFinals(Exprs.Finals);
2144 Dir->setDependentCounters(Exprs.DependentCounters);
2145 Dir->setDependentInits(Exprs.DependentInits);
2146 Dir->setFinalsConditions(Exprs.FinalsConditions);
2147 Dir->setPreInits(Exprs.PreInits);
2148 return Dir;
2149}
2150
2153 unsigned NumClauses,
2154 unsigned CollapsedNum,
2155 EmptyShell) {
2156 return createEmptyDirective<OMPTargetTeamsDistributeDirective>(
2157 C, NumClauses, /*HasAssociatedStmt=*/true,
2158 numLoopChildren(CollapsedNum, OMPD_target_teams_distribute),
2159 CollapsedNum);
2160}
2161
2164 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2165 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
2166 const HelperExprs &Exprs, Expr *TaskRedRef, bool HasCancel) {
2167 auto *Dir = createDirective<OMPTargetTeamsDistributeParallelForDirective>(
2168 C, Clauses, AssociatedStmt,
2169 numLoopChildren(CollapsedNum, OMPD_target_teams_distribute_parallel_for) +
2170 1,
2171 StartLoc, EndLoc, CollapsedNum);
2172 Dir->setIterationVariable(Exprs.IterationVarRef);
2173 Dir->setLastIteration(Exprs.LastIteration);
2174 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
2175 Dir->setPreCond(Exprs.PreCond);
2176 Dir->setCond(Exprs.Cond);
2177 Dir->setInit(Exprs.Init);
2178 Dir->setInc(Exprs.Inc);
2179 Dir->setIsLastIterVariable(Exprs.IL);
2180 Dir->setLowerBoundVariable(Exprs.LB);
2181 Dir->setUpperBoundVariable(Exprs.UB);
2182 Dir->setStrideVariable(Exprs.ST);
2183 Dir->setEnsureUpperBound(Exprs.EUB);
2184 Dir->setNextLowerBound(Exprs.NLB);
2185 Dir->setNextUpperBound(Exprs.NUB);
2186 Dir->setNumIterations(Exprs.NumIterations);
2187 Dir->setPrevLowerBoundVariable(Exprs.PrevLB);
2188 Dir->setPrevUpperBoundVariable(Exprs.PrevUB);
2189 Dir->setDistInc(Exprs.DistInc);
2190 Dir->setPrevEnsureUpperBound(Exprs.PrevEUB);
2191 Dir->setCounters(Exprs.Counters);
2192 Dir->setPrivateCounters(Exprs.PrivateCounters);
2193 Dir->setInits(Exprs.Inits);
2194 Dir->setUpdates(Exprs.Updates);
2195 Dir->setFinals(Exprs.Finals);
2196 Dir->setDependentCounters(Exprs.DependentCounters);
2197 Dir->setDependentInits(Exprs.DependentInits);
2198 Dir->setFinalsConditions(Exprs.FinalsConditions);
2199 Dir->setPreInits(Exprs.PreInits);
2200 Dir->setCombinedLowerBoundVariable(Exprs.DistCombinedFields.LB);
2201 Dir->setCombinedUpperBoundVariable(Exprs.DistCombinedFields.UB);
2202 Dir->setCombinedEnsureUpperBound(Exprs.DistCombinedFields.EUB);
2203 Dir->setCombinedInit(Exprs.DistCombinedFields.Init);
2204 Dir->setCombinedCond(Exprs.DistCombinedFields.Cond);
2205 Dir->setCombinedNextLowerBound(Exprs.DistCombinedFields.NLB);
2206 Dir->setCombinedNextUpperBound(Exprs.DistCombinedFields.NUB);
2207 Dir->setCombinedDistCond(Exprs.DistCombinedFields.DistCond);
2208 Dir->setCombinedParForInDistCond(Exprs.DistCombinedFields.ParForInDistCond);
2209 Dir->setTaskReductionRefExpr(TaskRedRef);
2210 Dir->HasCancel = HasCancel;
2211 return Dir;
2212}
2213
2216 unsigned NumClauses,
2217 unsigned CollapsedNum,
2218 EmptyShell) {
2219 return createEmptyDirective<OMPTargetTeamsDistributeParallelForDirective>(
2220 C, NumClauses, /*HasAssociatedStmt=*/true,
2221 numLoopChildren(CollapsedNum, OMPD_target_teams_distribute_parallel_for) +
2222 1,
2223 CollapsedNum);
2224}
2225
2228 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2229 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
2230 const HelperExprs &Exprs) {
2231 auto *Dir = createDirective<OMPTargetTeamsDistributeParallelForSimdDirective>(
2232 C, Clauses, AssociatedStmt,
2233 numLoopChildren(CollapsedNum,
2234 OMPD_target_teams_distribute_parallel_for_simd),
2235 StartLoc, EndLoc, CollapsedNum);
2236 Dir->setIterationVariable(Exprs.IterationVarRef);
2237 Dir->setLastIteration(Exprs.LastIteration);
2238 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
2239 Dir->setPreCond(Exprs.PreCond);
2240 Dir->setCond(Exprs.Cond);
2241 Dir->setInit(Exprs.Init);
2242 Dir->setInc(Exprs.Inc);
2243 Dir->setIsLastIterVariable(Exprs.IL);
2244 Dir->setLowerBoundVariable(Exprs.LB);
2245 Dir->setUpperBoundVariable(Exprs.UB);
2246 Dir->setStrideVariable(Exprs.ST);
2247 Dir->setEnsureUpperBound(Exprs.EUB);
2248 Dir->setNextLowerBound(Exprs.NLB);
2249 Dir->setNextUpperBound(Exprs.NUB);
2250 Dir->setNumIterations(Exprs.NumIterations);
2251 Dir->setPrevLowerBoundVariable(Exprs.PrevLB);
2252 Dir->setPrevUpperBoundVariable(Exprs.PrevUB);
2253 Dir->setDistInc(Exprs.DistInc);
2254 Dir->setPrevEnsureUpperBound(Exprs.PrevEUB);
2255 Dir->setCounters(Exprs.Counters);
2256 Dir->setPrivateCounters(Exprs.PrivateCounters);
2257 Dir->setInits(Exprs.Inits);
2258 Dir->setUpdates(Exprs.Updates);
2259 Dir->setFinals(Exprs.Finals);
2260 Dir->setDependentCounters(Exprs.DependentCounters);
2261 Dir->setDependentInits(Exprs.DependentInits);
2262 Dir->setFinalsConditions(Exprs.FinalsConditions);
2263 Dir->setPreInits(Exprs.PreInits);
2264 Dir->setCombinedLowerBoundVariable(Exprs.DistCombinedFields.LB);
2265 Dir->setCombinedUpperBoundVariable(Exprs.DistCombinedFields.UB);
2266 Dir->setCombinedEnsureUpperBound(Exprs.DistCombinedFields.EUB);
2267 Dir->setCombinedInit(Exprs.DistCombinedFields.Init);
2268 Dir->setCombinedCond(Exprs.DistCombinedFields.Cond);
2269 Dir->setCombinedNextLowerBound(Exprs.DistCombinedFields.NLB);
2270 Dir->setCombinedNextUpperBound(Exprs.DistCombinedFields.NUB);
2271 Dir->setCombinedDistCond(Exprs.DistCombinedFields.DistCond);
2272 Dir->setCombinedParForInDistCond(Exprs.DistCombinedFields.ParForInDistCond);
2273 return Dir;
2274}
2275
2278 const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum,
2279 EmptyShell) {
2280 return createEmptyDirective<OMPTargetTeamsDistributeParallelForSimdDirective>(
2281 C, NumClauses, /*HasAssociatedStmt=*/true,
2282 numLoopChildren(CollapsedNum,
2283 OMPD_target_teams_distribute_parallel_for_simd),
2284 CollapsedNum);
2285}
2286
2289 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2290 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
2291 const HelperExprs &Exprs) {
2292 auto *Dir = createDirective<OMPTargetTeamsDistributeSimdDirective>(
2293 C, Clauses, AssociatedStmt,
2294 numLoopChildren(CollapsedNum, OMPD_target_teams_distribute_simd),
2295 StartLoc, EndLoc, CollapsedNum);
2296 Dir->setIterationVariable(Exprs.IterationVarRef);
2297 Dir->setLastIteration(Exprs.LastIteration);
2298 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
2299 Dir->setPreCond(Exprs.PreCond);
2300 Dir->setCond(Exprs.Cond);
2301 Dir->setInit(Exprs.Init);
2302 Dir->setInc(Exprs.Inc);
2303 Dir->setIsLastIterVariable(Exprs.IL);
2304 Dir->setLowerBoundVariable(Exprs.LB);
2305 Dir->setUpperBoundVariable(Exprs.UB);
2306 Dir->setStrideVariable(Exprs.ST);
2307 Dir->setEnsureUpperBound(Exprs.EUB);
2308 Dir->setNextLowerBound(Exprs.NLB);
2309 Dir->setNextUpperBound(Exprs.NUB);
2310 Dir->setNumIterations(Exprs.NumIterations);
2311 Dir->setCounters(Exprs.Counters);
2312 Dir->setPrivateCounters(Exprs.PrivateCounters);
2313 Dir->setInits(Exprs.Inits);
2314 Dir->setUpdates(Exprs.Updates);
2315 Dir->setFinals(Exprs.Finals);
2316 Dir->setDependentCounters(Exprs.DependentCounters);
2317 Dir->setDependentInits(Exprs.DependentInits);
2318 Dir->setFinalsConditions(Exprs.FinalsConditions);
2319 Dir->setPreInits(Exprs.PreInits);
2320 return Dir;
2321}
2322
2325 unsigned NumClauses,
2326 unsigned CollapsedNum,
2327 EmptyShell) {
2328 return createEmptyDirective<OMPTargetTeamsDistributeSimdDirective>(
2329 C, NumClauses, /*HasAssociatedStmt=*/true,
2330 numLoopChildren(CollapsedNum, OMPD_target_teams_distribute_simd),
2331 CollapsedNum);
2332}
2333
2336 SourceLocation EndLoc,
2337 ArrayRef<OMPClause *> Clauses) {
2338 return createDirective<OMPInteropDirective>(
2339 C, Clauses, /*AssociatedStmt=*/nullptr, /*NumChildren=*/0, StartLoc,
2340 EndLoc);
2341}
2342
2344 unsigned NumClauses,
2345 EmptyShell) {
2346 return createEmptyDirective<OMPInteropDirective>(C, NumClauses);
2347}
2348
2350 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2351 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
2352 SourceLocation TargetCallLoc) {
2353 auto *Dir = createDirective<OMPDispatchDirective>(
2354 C, Clauses, AssociatedStmt, /*NumChildren=*/0, StartLoc, EndLoc);
2355 Dir->setTargetCallLoc(TargetCallLoc);
2356 return Dir;
2357}
2358
2360 unsigned NumClauses,
2361 EmptyShell) {
2362 return createEmptyDirective<OMPDispatchDirective>(C, NumClauses,
2363 /*HasAssociatedStmt=*/true,
2364 /*NumChildren=*/0);
2365}
2366
2368 SourceLocation StartLoc,
2369 SourceLocation EndLoc,
2370 ArrayRef<OMPClause *> Clauses,
2371 Stmt *AssociatedStmt) {
2372 return createDirective<OMPMaskedDirective>(C, Clauses, AssociatedStmt,
2373 /*NumChildren=*/0, StartLoc,
2374 EndLoc);
2375}
2376
2378 unsigned NumClauses,
2379 EmptyShell) {
2380 return createEmptyDirective<OMPMaskedDirective>(C, NumClauses,
2381 /*HasAssociatedStmt=*/true);
2382}
2383
2385 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2386 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
2387 const HelperExprs &Exprs) {
2388 auto *Dir = createDirective<OMPGenericLoopDirective>(
2389 C, Clauses, AssociatedStmt, numLoopChildren(CollapsedNum, OMPD_loop),
2390 StartLoc, EndLoc, CollapsedNum);
2391 Dir->setIterationVariable(Exprs.IterationVarRef);
2392 Dir->setLastIteration(Exprs.LastIteration);
2393 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
2394 Dir->setPreCond(Exprs.PreCond);
2395 Dir->setCond(Exprs.Cond);
2396 Dir->setInit(Exprs.Init);
2397 Dir->setInc(Exprs.Inc);
2398 Dir->setIsLastIterVariable(Exprs.IL);
2399 Dir->setLowerBoundVariable(Exprs.LB);
2400 Dir->setUpperBoundVariable(Exprs.UB);
2401 Dir->setStrideVariable(Exprs.ST);
2402 Dir->setEnsureUpperBound(Exprs.EUB);
2403 Dir->setNextLowerBound(Exprs.NLB);
2404 Dir->setNextUpperBound(Exprs.NUB);
2405 Dir->setNumIterations(Exprs.NumIterations);
2406 Dir->setCounters(Exprs.Counters);
2407 Dir->setPrivateCounters(Exprs.PrivateCounters);
2408 Dir->setInits(Exprs.Inits);
2409 Dir->setUpdates(Exprs.Updates);
2410 Dir->setFinals(Exprs.Finals);
2411 Dir->setDependentCounters(Exprs.DependentCounters);
2412 Dir->setDependentInits(Exprs.DependentInits);
2413 Dir->setFinalsConditions(Exprs.FinalsConditions);
2414 Dir->setPreInits(Exprs.PreInits);
2415 return Dir;
2416}
2417
2420 unsigned CollapsedNum, EmptyShell) {
2421 return createEmptyDirective<OMPGenericLoopDirective>(
2422 C, NumClauses, /*HasAssociatedStmt=*/true,
2423 numLoopChildren(CollapsedNum, OMPD_loop), CollapsedNum);
2424}
2425
2427 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2428 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
2429 const HelperExprs &Exprs) {
2430 auto *Dir = createDirective<OMPTeamsGenericLoopDirective>(
2431 C, Clauses, AssociatedStmt,
2432 numLoopChildren(CollapsedNum, OMPD_teams_loop), StartLoc, EndLoc,
2433 CollapsedNum);
2434 Dir->setIterationVariable(Exprs.IterationVarRef);
2435 Dir->setLastIteration(Exprs.LastIteration);
2436 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
2437 Dir->setPreCond(Exprs.PreCond);
2438 Dir->setCond(Exprs.Cond);
2439 Dir->setInit(Exprs.Init);
2440 Dir->setInc(Exprs.Inc);
2441 Dir->setIsLastIterVariable(Exprs.IL);
2442 Dir->setLowerBoundVariable(Exprs.LB);
2443 Dir->setUpperBoundVariable(Exprs.UB);
2444 Dir->setStrideVariable(Exprs.ST);
2445 Dir->setEnsureUpperBound(Exprs.EUB);
2446 Dir->setNextLowerBound(Exprs.NLB);
2447 Dir->setNextUpperBound(Exprs.NUB);
2448 Dir->setNumIterations(Exprs.NumIterations);
2449 Dir->setPrevLowerBoundVariable(Exprs.PrevLB);
2450 Dir->setPrevUpperBoundVariable(Exprs.PrevUB);
2451 Dir->setDistInc(Exprs.DistInc);
2452 Dir->setPrevEnsureUpperBound(Exprs.PrevEUB);
2453 Dir->setCounters(Exprs.Counters);
2454 Dir->setPrivateCounters(Exprs.PrivateCounters);
2455 Dir->setInits(Exprs.Inits);
2456 Dir->setUpdates(Exprs.Updates);
2457 Dir->setFinals(Exprs.Finals);
2458 Dir->setDependentCounters(Exprs.DependentCounters);
2459 Dir->setDependentInits(Exprs.DependentInits);
2460 Dir->setFinalsConditions(Exprs.FinalsConditions);
2461 Dir->setPreInits(Exprs.PreInits);
2462 Dir->setCombinedLowerBoundVariable(Exprs.DistCombinedFields.LB);
2463 Dir->setCombinedUpperBoundVariable(Exprs.DistCombinedFields.UB);
2464 Dir->setCombinedEnsureUpperBound(Exprs.DistCombinedFields.EUB);
2465 Dir->setCombinedInit(Exprs.DistCombinedFields.Init);
2466 Dir->setCombinedCond(Exprs.DistCombinedFields.Cond);
2467 Dir->setCombinedNextLowerBound(Exprs.DistCombinedFields.NLB);
2468 Dir->setCombinedNextUpperBound(Exprs.DistCombinedFields.NUB);
2469 Dir->setCombinedDistCond(Exprs.DistCombinedFields.DistCond);
2470 Dir->setCombinedParForInDistCond(Exprs.DistCombinedFields.ParForInDistCond);
2471 return Dir;
2472}
2473
2476 unsigned NumClauses,
2477 unsigned CollapsedNum, EmptyShell) {
2478 return createEmptyDirective<OMPTeamsGenericLoopDirective>(
2479 C, NumClauses, /*HasAssociatedStmt=*/true,
2480 numLoopChildren(CollapsedNum, OMPD_teams_loop), CollapsedNum);
2481}
2482
2484 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2485 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
2486 const HelperExprs &Exprs, bool CanBeParallelFor) {
2487 auto *Dir = createDirective<OMPTargetTeamsGenericLoopDirective>(
2488 C, Clauses, AssociatedStmt,
2489 numLoopChildren(CollapsedNum, OMPD_target_teams_loop), StartLoc, EndLoc,
2490 CollapsedNum);
2491 Dir->setIterationVariable(Exprs.IterationVarRef);
2492 Dir->setLastIteration(Exprs.LastIteration);
2493 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
2494 Dir->setPreCond(Exprs.PreCond);
2495 Dir->setCond(Exprs.Cond);
2496 Dir->setInit(Exprs.Init);
2497 Dir->setInc(Exprs.Inc);
2498 Dir->setIsLastIterVariable(Exprs.IL);
2499 Dir->setLowerBoundVariable(Exprs.LB);
2500 Dir->setUpperBoundVariable(Exprs.UB);
2501 Dir->setStrideVariable(Exprs.ST);
2502 Dir->setEnsureUpperBound(Exprs.EUB);
2503 Dir->setNextLowerBound(Exprs.NLB);
2504 Dir->setNextUpperBound(Exprs.NUB);
2505 Dir->setNumIterations(Exprs.NumIterations);
2506 Dir->setPrevLowerBoundVariable(Exprs.PrevLB);
2507 Dir->setPrevUpperBoundVariable(Exprs.PrevUB);
2508 Dir->setDistInc(Exprs.DistInc);
2509 Dir->setPrevEnsureUpperBound(Exprs.PrevEUB);
2510 Dir->setCounters(Exprs.Counters);
2511 Dir->setPrivateCounters(Exprs.PrivateCounters);
2512 Dir->setInits(Exprs.Inits);
2513 Dir->setUpdates(Exprs.Updates);
2514 Dir->setFinals(Exprs.Finals);
2515 Dir->setDependentCounters(Exprs.DependentCounters);
2516 Dir->setDependentInits(Exprs.DependentInits);
2517 Dir->setFinalsConditions(Exprs.FinalsConditions);
2518 Dir->setPreInits(Exprs.PreInits);
2519 Dir->setCombinedLowerBoundVariable(Exprs.DistCombinedFields.LB);
2520 Dir->setCombinedUpperBoundVariable(Exprs.DistCombinedFields.UB);
2521 Dir->setCombinedEnsureUpperBound(Exprs.DistCombinedFields.EUB);
2522 Dir->setCombinedInit(Exprs.DistCombinedFields.Init);
2523 Dir->setCombinedCond(Exprs.DistCombinedFields.Cond);
2524 Dir->setCombinedNextLowerBound(Exprs.DistCombinedFields.NLB);
2525 Dir->setCombinedNextUpperBound(Exprs.DistCombinedFields.NUB);
2526 Dir->setCombinedDistCond(Exprs.DistCombinedFields.DistCond);
2527 Dir->setCombinedParForInDistCond(Exprs.DistCombinedFields.ParForInDistCond);
2528 Dir->setCanBeParallelFor(CanBeParallelFor);
2529 return Dir;
2530}
2531
2534 unsigned NumClauses,
2535 unsigned CollapsedNum,
2536 EmptyShell) {
2537 return createEmptyDirective<OMPTargetTeamsGenericLoopDirective>(
2538 C, NumClauses, /*HasAssociatedStmt=*/true,
2539 numLoopChildren(CollapsedNum, OMPD_target_teams_loop), CollapsedNum);
2540}
2541
2543 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2544 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
2545 const HelperExprs &Exprs) {
2546 auto *Dir = createDirective<OMPParallelGenericLoopDirective>(
2547 C, Clauses, AssociatedStmt,
2548 numLoopChildren(CollapsedNum, OMPD_parallel_loop), StartLoc, EndLoc,
2549 CollapsedNum);
2550 Dir->setIterationVariable(Exprs.IterationVarRef);
2551 Dir->setLastIteration(Exprs.LastIteration);
2552 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
2553 Dir->setPreCond(Exprs.PreCond);
2554 Dir->setCond(Exprs.Cond);
2555 Dir->setInit(Exprs.Init);
2556 Dir->setInc(Exprs.Inc);
2557 Dir->setIsLastIterVariable(Exprs.IL);
2558 Dir->setLowerBoundVariable(Exprs.LB);
2559 Dir->setUpperBoundVariable(Exprs.UB);
2560 Dir->setStrideVariable(Exprs.ST);
2561 Dir->setEnsureUpperBound(Exprs.EUB);
2562 Dir->setNextLowerBound(Exprs.NLB);
2563 Dir->setNextUpperBound(Exprs.NUB);
2564 Dir->setNumIterations(Exprs.NumIterations);
2565 Dir->setCounters(Exprs.Counters);
2566 Dir->setPrivateCounters(Exprs.PrivateCounters);
2567 Dir->setInits(Exprs.Inits);
2568 Dir->setUpdates(Exprs.Updates);
2569 Dir->setFinals(Exprs.Finals);
2570 Dir->setDependentCounters(Exprs.DependentCounters);
2571 Dir->setDependentInits(Exprs.DependentInits);
2572 Dir->setFinalsConditions(Exprs.FinalsConditions);
2573 Dir->setPreInits(Exprs.PreInits);
2574 return Dir;
2575}
2576
2578 const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum,
2579 EmptyShell) {
2580 return createEmptyDirective<OMPParallelGenericLoopDirective>(
2581 C, NumClauses, /*HasAssociatedStmt=*/true,
2582 numLoopChildren(CollapsedNum, OMPD_parallel_loop), CollapsedNum);
2583}
2584
2587 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2588 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
2589 const HelperExprs &Exprs) {
2590 auto *Dir = createDirective<OMPTargetParallelGenericLoopDirective>(
2591 C, Clauses, AssociatedStmt,
2592 numLoopChildren(CollapsedNum, OMPD_target_parallel_loop), StartLoc,
2593 EndLoc, CollapsedNum);
2594 Dir->setIterationVariable(Exprs.IterationVarRef);
2595 Dir->setLastIteration(Exprs.LastIteration);
2596 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
2597 Dir->setPreCond(Exprs.PreCond);
2598 Dir->setCond(Exprs.Cond);
2599 Dir->setInit(Exprs.Init);
2600 Dir->setInc(Exprs.Inc);
2601 Dir->setIsLastIterVariable(Exprs.IL);
2602 Dir->setLowerBoundVariable(Exprs.LB);
2603 Dir->setUpperBoundVariable(Exprs.UB);
2604 Dir->setStrideVariable(Exprs.ST);
2605 Dir->setEnsureUpperBound(Exprs.EUB);
2606 Dir->setNextLowerBound(Exprs.NLB);
2607 Dir->setNextUpperBound(Exprs.NUB);
2608 Dir->setNumIterations(Exprs.NumIterations);
2609 Dir->setCounters(Exprs.Counters);
2610 Dir->setPrivateCounters(Exprs.PrivateCounters);
2611 Dir->setInits(Exprs.Inits);
2612 Dir->setUpdates(Exprs.Updates);
2613 Dir->setFinals(Exprs.Finals);
2614 Dir->setDependentCounters(Exprs.DependentCounters);
2615 Dir->setDependentInits(Exprs.DependentInits);
2616 Dir->setFinalsConditions(Exprs.FinalsConditions);
2617 Dir->setPreInits(Exprs.PreInits);
2618 return Dir;
2619}
2620
2623 unsigned NumClauses,
2624 unsigned CollapsedNum,
2625 EmptyShell) {
2626 return createEmptyDirective<OMPTargetParallelGenericLoopDirective>(
2627 C, NumClauses, /*HasAssociatedStmt=*/true,
2628 numLoopChildren(CollapsedNum, OMPD_target_parallel_loop), CollapsedNum);
2629}
Defines the clang::ASTContext interface.
This file defines OpenMP AST classes for executable directives and clauses.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition: ASTContext.h:188
This represents one expression.
Definition: Expr.h:110
IfStmt - This represents an if/then/else.
Definition: Stmt.h:2175
static OMPAssumeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Definition: StmtOpenMP.cpp:811
static OMPAssumeDirective * Create(const ASTContext &Ctx, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AStmt)
Definition: StmtOpenMP.cpp:801
This represents '#pragma omp atomic' directive.
Definition: StmtOpenMP.h:2947
static OMPAtomicDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:987
static OMPAtomicDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, Expressions Exprs)
Creates directive with a list of Clauses and 'x', 'v' and 'expr' parts of the atomic construct (see S...
Definition: StmtOpenMP.cpp:969
This represents '#pragma omp barrier' directive.
Definition: StmtOpenMP.h:2625
static OMPBarrierDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc)
Creates directive.
Definition: StmtOpenMP.cpp:833
static OMPBarrierDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:839
This represents '#pragma omp cancel' directive.
Definition: StmtOpenMP.h:3655
static OMPCancelDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, OpenMPDirectiveKind CancelRegion)
Creates directive.
Definition: StmtOpenMP.cpp:889
static OMPCancelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:899
This represents '#pragma omp cancellation point' directive.
Definition: StmtOpenMP.h:3597
static OMPCancellationPointDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:884
static OMPCancellationPointDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, OpenMPDirectiveKind CancelRegion)
Creates directive.
Definition: StmtOpenMP.cpp:875
Contains data for OpenMP directives: clauses, children expressions/statements (helpers for codegen) a...
void setClauses(ArrayRef< OMPClause * > Clauses)
Sets the list of variables for this clause.
Definition: StmtOpenMP.cpp:27
MutableArrayRef< Stmt * > getChildren()
Definition: StmtOpenMP.cpp:33
This represents '#pragma omp critical' directive.
Definition: StmtOpenMP.h:2076
static OMPCriticalDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:627
static OMPCriticalDirective * Create(const ASTContext &C, const DeclarationNameInfo &Name, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive.
Definition: StmtOpenMP.cpp:618
This represents '#pragma omp depobj' directive.
Definition: StmtOpenMP.h:2841
static OMPDepobjDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:929
static OMPDepobjDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses)
Creates directive with a list of Clauses.
Definition: StmtOpenMP.cpp:920
This represents '#pragma omp dispatch' directive.
Definition: StmtOpenMP.h:5948
static OMPDispatchDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, SourceLocation TargetCallLoc)
Creates directive with a list of Clauses.
static OMPDispatchDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp distribute' directive.
Definition: StmtOpenMP.h:4425
static OMPDistributeDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPDistributeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp distribute parallel for' composite directive.
Definition: StmtOpenMP.h:4547
static OMPDistributeParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPDistributeParallelForDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, Expr *TaskRedRef, bool HasCancel)
Creates directive with a list of Clauses.
This represents '#pragma omp distribute parallel for simd' composite directive.
Definition: StmtOpenMP.h:4643
static OMPDistributeParallelForSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp distribute simd' composite directive.
Definition: StmtOpenMP.h:4708
static OMPDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPDistributeSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
This represents '#pragma omp error' directive.
Definition: StmtOpenMP.h:6432
static OMPErrorDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses)
Definition: StmtOpenMP.cpp:818
static OMPErrorDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:827
bool hasAssociatedStmt() const
Returns true if directive has associated statement.
Definition: StmtOpenMP.h:518
const Stmt * getRawStmt() const
Definition: StmtOpenMP.h:593
OMPChildren * Data
Data, associated with the directive.
Definition: StmtOpenMP.h:286
const Stmt * getStructuredBlock() const
Returns the AST node representing OpenMP structured-block of this OpenMP executable directive,...
Definition: StmtOpenMP.h:588
bool isStandaloneDirective() const
Returns whether or not this is a Standalone directive.
Definition: StmtOpenMP.cpp:58
This represents '#pragma omp flush' directive.
Definition: StmtOpenMP.h:2789
static OMPFlushDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:914
static OMPFlushDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses)
Creates directive with a list of Clauses.
Definition: StmtOpenMP.cpp:905
This represents '#pragma omp for' directive.
Definition: StmtOpenMP.h:1634
static OMPForDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, Expr *TaskRedRef, bool HasCancel)
Creates directive with a list of Clauses.
Definition: StmtOpenMP.cpp:336
static OMPForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:398
This represents '#pragma omp for simd' directive.
Definition: StmtOpenMP.h:1724
static OMPForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:522
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.
Definition: StmtOpenMP.cpp:488
This represents '#pragma omp loop' directive.
Definition: StmtOpenMP.h:6103
static OMPGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with a place for NumClauses clauses.
static OMPGenericLoopDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
Represents the '#pragma omp interchange' loop transformation directive.
Definition: StmtOpenMP.h:5769
static OMPInterchangeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned NumLoops)
Build an empty '#pragma omp interchange' AST node for deserialization.
Definition: StmtOpenMP.cpp:480
static OMPInterchangeDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, unsigned NumLoops, Stmt *AssociatedStmt, Stmt *TransformedStmt, Stmt *PreInits)
Create a new AST node representation for '#pragma omp interchange'.
Definition: StmtOpenMP.cpp:467
This represents '#pragma omp interop' directive.
Definition: StmtOpenMP.h:5895
static OMPInteropDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
static OMPInteropDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses)
Creates directive.
static void doForAllLoopsBodies(Stmt *CurStmt, bool TryImperfectlyNestedLoops, unsigned NumLoops, llvm::function_ref< void(unsigned, Stmt *, Stmt *)> Callback)
Calls the specified callback function for all the loop bodies in CurStmt, from the outermost loop to ...
Definition: StmtOpenMP.cpp:179
unsigned NumAssociatedLoops
Number of collapsed loops as specified by 'collapse' clause.
Definition: StmtOpenMP.h:688
static Stmt * tryToFindNextInnerLoop(Stmt *CurStmt, bool TryImperfectlyNestedLoops)
Try to find the next loop sub-statement in the specified statement CurStmt.
Definition: StmtOpenMP.cpp:78
static bool doForAllLoops(Stmt *CurStmt, bool TryImperfectlyNestedLoops, unsigned NumLoops, llvm::function_ref< bool(unsigned, Stmt *)> Callback, llvm::function_ref< void(OMPLoopTransformationDirective *)> OnTransformationCallback)
Calls the specified callback function for all the loops in CurStmt, from the outermost to the innermo...
Definition: StmtOpenMP.cpp:125
unsigned getLoopsNumber() const
Get number of collapsed loops.
Definition: StmtOpenMP.h:877
void setFinals(ArrayRef< Expr * > A)
Definition: StmtOpenMP.cpp:237
void setDependentCounters(ArrayRef< Expr * > A)
Definition: StmtOpenMP.cpp:243
void setFinalsConditions(ArrayRef< Expr * > A)
Definition: StmtOpenMP.cpp:256
void setInits(ArrayRef< Expr * > A)
Definition: StmtOpenMP.cpp:225
static unsigned numLoopChildren(unsigned CollapsedNum, OpenMPDirectiveKind Kind)
Children number.
Definition: StmtOpenMP.h:1155
void setCounters(ArrayRef< Expr * > A)
Definition: StmtOpenMP.cpp:212
void setDependentInits(ArrayRef< Expr * > A)
Definition: StmtOpenMP.cpp:250
void setUpdates(ArrayRef< Expr * > A)
Definition: StmtOpenMP.cpp:231
void setPrivateCounters(ArrayRef< Expr * > A)
Definition: StmtOpenMP.cpp:218
The base class for all loop transformation directives.
Definition: StmtOpenMP.h:960
Stmt * getPreInits() const
Return preinits statement.
Definition: StmtOpenMP.cpp:385
Stmt * getTransformedStmt() const
Get the de-sugared statements after the loop transformation.
Definition: StmtOpenMP.cpp:372
This represents '#pragma omp masked' directive.
Definition: StmtOpenMP.h:6013
static OMPMaskedDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
static OMPMaskedDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive.
This represents '#pragma omp masked taskloop' directive.
Definition: StmtOpenMP.h:3930
static OMPMaskedTaskLoopDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel)
Creates directive with a list of Clauses.
static OMPMaskedTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp masked taskloop simd' directive.
Definition: StmtOpenMP.h:4071
static OMPMaskedTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPMaskedTaskLoopSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
This represents '#pragma omp master' directive.
Definition: StmtOpenMP.h:2028
static OMPMasterDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AssociatedStmt)
Creates directive.
Definition: StmtOpenMP.cpp:603
static OMPMasterDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:612
This represents '#pragma omp master taskloop' directive.
Definition: StmtOpenMP.h:3854
static OMPMasterTaskLoopDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel)
Creates directive with a list of Clauses.
static OMPMasterTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp master taskloop simd' directive.
Definition: StmtOpenMP.h:4006
static OMPMasterTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPMasterTaskLoopSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
This represents '#pragma omp metadirective' directive.
Definition: StmtOpenMP.h:6064
static OMPMetaDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Definition: StmtOpenMP.cpp:273
static OMPMetaDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, Stmt *IfStmt)
Definition: StmtOpenMP.cpp:262
This represents '#pragma omp ordered' directive.
Definition: StmtOpenMP.h:2893
static OMPOrderedDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive.
Definition: StmtOpenMP.cpp:950
static OMPOrderedDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, bool IsStandalone, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:960
This represents '#pragma omp parallel' directive.
Definition: StmtOpenMP.h:612
static OMPParallelDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef, bool HasCancel)
Creates directive with a list of Clauses.
Definition: StmtOpenMP.cpp:281
static OMPParallelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for N clauses.
Definition: StmtOpenMP.cpp:292
This represents '#pragma omp parallel for' directive.
Definition: StmtOpenMP.h:2147
static OMPParallelForDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, Expr *TaskRedRef, bool HasCancel)
Creates directive with a list of Clauses.
Definition: StmtOpenMP.cpp:634
static OMPParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:672
This represents '#pragma omp parallel for simd' directive.
Definition: StmtOpenMP.h:2244
static OMPParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:715
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.
Definition: StmtOpenMP.cpp:679
This represents '#pragma omp parallel loop' directive.
Definition: StmtOpenMP.h:6305
static OMPParallelGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPParallelGenericLoopDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
This represents '#pragma omp parallel masked' directive.
Definition: StmtOpenMP.h:2372
static OMPParallelMaskedDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:749
static OMPParallelMaskedDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef)
Creates directive with a list of Clauses.
Definition: StmtOpenMP.cpp:739
This represents '#pragma omp parallel masked taskloop' directive.
Definition: StmtOpenMP.h:4215
static OMPParallelMaskedTaskLoopDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel)
Creates directive with a list of Clauses.
static OMPParallelMaskedTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp parallel masked taskloop simd' directive.
Definition: StmtOpenMP.h:4360
static OMPParallelMaskedTaskLoopSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPParallelMaskedTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp parallel master' directive.
Definition: StmtOpenMP.h:2309
static OMPParallelMasterDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef)
Creates directive with a list of Clauses.
Definition: StmtOpenMP.cpp:723
static OMPParallelMasterDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:733
This represents '#pragma omp parallel master taskloop' directive.
Definition: StmtOpenMP.h:4137
static OMPParallelMasterTaskLoopDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel)
Creates directive with a list of Clauses.
static OMPParallelMasterTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp parallel master taskloop simd' directive.
Definition: StmtOpenMP.h:4293
static OMPParallelMasterTaskLoopSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPParallelMasterTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp parallel sections' directive.
Definition: StmtOpenMP.h:2436
static OMPParallelSectionsDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef, bool HasCancel)
Creates directive with a list of Clauses.
Definition: StmtOpenMP.cpp:755
static OMPParallelSectionsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:767
Represents the '#pragma omp reverse' loop transformation directive.
Definition: StmtOpenMP.h:5704
static OMPReverseDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AssociatedStmt, Stmt *TransformedStmt, Stmt *PreInits)
Create a new AST node representation for '#pragma omp reverse'.
Definition: StmtOpenMP.cpp:451
static OMPReverseDirective * CreateEmpty(const ASTContext &C)
Build an empty '#pragma omp reverse' AST node for deserialization.
Definition: StmtOpenMP.cpp:461
This represents '#pragma omp scan' directive.
Definition: StmtOpenMP.h:5842
static OMPScanDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:944
static OMPScanDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses)
Creates directive with a list of Clauses.
Definition: StmtOpenMP.cpp:935
This represents '#pragma omp scope' directive.
Definition: StmtOpenMP.h:1925
static OMPScopeDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive.
Definition: StmtOpenMP.cpp:569
static OMPScopeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:579
This represents '#pragma omp section' directive.
Definition: StmtOpenMP.h:1864
static OMPSectionDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:563
void setHasCancel(bool Has)
Set cancel state.
Definition: StmtOpenMP.h:1908
static OMPSectionDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AssociatedStmt, bool HasCancel)
Creates directive.
Definition: StmtOpenMP.cpp:551
This represents '#pragma omp sections' directive.
Definition: StmtOpenMP.h:1787
static OMPSectionsDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef, bool HasCancel)
Creates directive with a list of Clauses.
Definition: StmtOpenMP.cpp:531
static OMPSectionsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:543
This represents '#pragma omp simd' directive.
Definition: StmtOpenMP.h:1571
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.
Definition: StmtOpenMP.cpp:301
static OMPSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:327
This represents '#pragma omp single' directive.
Definition: StmtOpenMP.h:1977
static OMPSingleDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
Definition: StmtOpenMP.cpp:586
static OMPSingleDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:596
This represents '#pragma omp target data' directive.
Definition: StmtOpenMP.h:3206
static OMPTargetDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
static OMPTargetDataDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
This represents '#pragma omp target' directive.
Definition: StmtOpenMP.h:3152
static OMPTargetDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
Definition: StmtOpenMP.cpp:994
static OMPTargetDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target enter data' directive.
Definition: StmtOpenMP.h:3260
static OMPTargetEnterDataDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
static OMPTargetEnterDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
This represents '#pragma omp target exit data' directive.
Definition: StmtOpenMP.h:3315
static OMPTargetExitDataDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
static OMPTargetExitDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
This represents '#pragma omp target parallel' directive.
Definition: StmtOpenMP.h:3369
static OMPTargetParallelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTargetParallelDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef, bool HasCancel)
Creates directive with a list of Clauses.
This represents '#pragma omp target parallel for' directive.
Definition: StmtOpenMP.h:3449
static OMPTargetParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTargetParallelForDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, Expr *TaskRedRef, bool HasCancel)
Creates directive with a list of Clauses.
This represents '#pragma omp target parallel for simd' directive.
Definition: StmtOpenMP.h:4774
static OMPTargetParallelForSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPTargetParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target parallel loop' directive.
Definition: StmtOpenMP.h:6370
static OMPTargetParallelGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTargetParallelGenericLoopDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
This represents '#pragma omp target simd' directive.
Definition: StmtOpenMP.h:4841
static OMPTargetSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPTargetSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target teams' directive.
Definition: StmtOpenMP.h:5199
static OMPTargetTeamsDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
static OMPTargetTeamsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target teams distribute' combined directive.
Definition: StmtOpenMP.h:5255
static OMPTargetTeamsDistributeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTargetTeamsDistributeDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
This represents '#pragma omp target teams distribute parallel for' combined directive.
Definition: StmtOpenMP.h:5322
static OMPTargetTeamsDistributeParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTargetTeamsDistributeParallelForDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, Expr *TaskRedRef, bool HasCancel)
Creates directive with a list of Clauses.
This represents '#pragma omp target teams distribute parallel for simd' combined directive.
Definition: StmtOpenMP.h:5420
static OMPTargetTeamsDistributeParallelForSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPTargetTeamsDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target teams distribute simd' combined directive.
Definition: StmtOpenMP.h:5490
static OMPTargetTeamsDistributeSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPTargetTeamsDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target teams loop' directive.
Definition: StmtOpenMP.h:6230
static OMPTargetTeamsGenericLoopDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, bool CanBeParallelFor)
Creates directive with a list of Clauses.
static OMPTargetTeamsGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp target update' directive.
Definition: StmtOpenMP.h:4491
static OMPTargetUpdateDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTargetUpdateDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
This represents '#pragma omp task' directive.
Definition: StmtOpenMP.h:2517
static OMPTaskDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:783
static OMPTaskDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, bool HasCancel)
Creates directive with a list of Clauses.
Definition: StmtOpenMP.cpp:774
This represents '#pragma omp taskloop' directive.
Definition: StmtOpenMP.h:3715
static OMPTaskLoopDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel)
Creates directive with a list of Clauses.
static OMPTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp taskloop simd' directive.
Definition: StmtOpenMP.h:3788
static OMPTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTaskLoopSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
This represents '#pragma omp taskgroup' directive.
Definition: StmtOpenMP.h:2722
static OMPTaskgroupDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, Expr *ReductionRef)
Creates directive.
Definition: StmtOpenMP.cpp:859
static OMPTaskgroupDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:868
This represents '#pragma omp taskwait' directive.
Definition: StmtOpenMP.h:2671
static OMPTaskwaitDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:853
static OMPTaskwaitDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses)
Creates directive.
Definition: StmtOpenMP.cpp:845
This represents '#pragma omp taskyield' directive.
Definition: StmtOpenMP.h:2579
static OMPTaskyieldDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:796
static OMPTaskyieldDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc)
Creates directive.
Definition: StmtOpenMP.cpp:790
This represents '#pragma omp teams' directive.
Definition: StmtOpenMP.h:3544
static OMPTeamsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTeamsDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
This represents '#pragma omp teams distribute' directive.
Definition: StmtOpenMP.h:4906
static OMPTeamsDistributeDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPTeamsDistributeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp teams distribute parallel for' composite directive.
Definition: StmtOpenMP.h:5106
static OMPTeamsDistributeParallelForDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, Expr *TaskRedRef, bool HasCancel)
Creates directive with a list of Clauses.
static OMPTeamsDistributeParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp teams distribute parallel for simd' composite directive.
Definition: StmtOpenMP.h:5040
static OMPTeamsDistributeParallelForSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPTeamsDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp teams distribute simd' combined directive.
Definition: StmtOpenMP.h:4972
static OMPTeamsDistributeSimdDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
static OMPTeamsDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
This represents '#pragma omp teams loop' directive.
Definition: StmtOpenMP.h:6165
static OMPTeamsGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
static OMPTeamsGenericLoopDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
This represents the '#pragma omp tile' loop transformation directive.
Definition: StmtOpenMP.h:5548
static OMPTileDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned NumLoops)
Build an empty '#pragma omp tile' AST node for deserialization.
Definition: StmtOpenMP.cpp:420
static OMPTileDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, unsigned NumLoops, Stmt *AssociatedStmt, Stmt *TransformedStmt, Stmt *PreInits)
Create a new AST node representation for '#pragma omp tile'.
Definition: StmtOpenMP.cpp:408
This represents the '#pragma omp unroll' loop transformation directive.
Definition: StmtOpenMP.h:5630
static OMPUnrollDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, unsigned NumGeneratedLoops, Stmt *TransformedStmt, Stmt *PreInits)
Create a new AST node representation for '#pragma omp unroll'.
Definition: StmtOpenMP.cpp:429
static OMPUnrollDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses)
Build an empty '#pragma omp unroll' AST node for deserialization.
Definition: StmtOpenMP.cpp:443
Encodes a location in the source.
Stmt - This represents one statement.
Definition: Stmt.h:84
StmtClass getStmtClass() const
Definition: Stmt.h:1390
Stmt * IgnoreContainers(bool IgnoreCaptured=false)
Skip no-op (attributed, compound) container stmts and skip captured stmt at the top,...
Definition: Stmt.cpp:195
The JSON file list parser is used to communicate input to InstallAPI.
llvm::omp::Directive OpenMPDirectiveKind
OpenMP directives.
Definition: OpenMPKinds.h:25
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspon...
Expr * E
'expr' part of the associated expression/statement.
Definition: StmtOpenMP.h:3032
Expr * D
'd' part of the associated expression/statement.
Definition: StmtOpenMP.h:3038
Expr * UE
UE Helper expression of the form: 'OpaqueValueExpr(x) binop OpaqueValueExpr(expr)' or 'OpaqueValueExp...
Definition: StmtOpenMP.h:3036
bool IsFailOnly
True if 'v' is updated only when the condition is false (compare capture only).
Definition: StmtOpenMP.h:3047
Expr * X
'x' part of the associated expression/statement.
Definition: StmtOpenMP.h:3026
Expr * Cond
Conditional expression in atomic compare construct.
Definition: StmtOpenMP.h:3040
Expr * V
'v' part of the associated expression/statement.
Definition: StmtOpenMP.h:3028
bool IsPostfixUpdate
True if original value of 'x' must be stored in 'v', not an updated one.
Definition: StmtOpenMP.h:3044
bool IsXLHSInRHSPart
True if UE has the first form and false if the second.
Definition: StmtOpenMP.h:3042
Expr * ParForInDistCond
'omp parallel for' loop condition used when composed with 'omp distribute' in the same construct and ...
Definition: StmtOpenMP.h:736
Expr * LB
DistributeLowerBound - used when composing 'omp distribute' with 'omp for' in a same construct.
Definition: StmtOpenMP.h:710
Expr * Init
Distribute loop iteration variable init used when composing 'omp distribute' with 'omp for' in a same...
Definition: StmtOpenMP.h:720
Expr * NUB
Update of UpperBound for statically scheduled omp loops for outer loop in combined constructs (e....
Definition: StmtOpenMP.h:729
Expr * EUB
DistributeEnsureUpperBound - used when composing 'omp distribute' with 'omp for' in a same construct,...
Definition: StmtOpenMP.h:716
Expr * UB
DistributeUpperBound - used when composing 'omp distribute' with 'omp for' in a same construct.
Definition: StmtOpenMP.h:713
Expr * NLB
Update of LowerBound for statically scheduled omp loops for outer loop in combined constructs (e....
Definition: StmtOpenMP.h:726
Expr * DistCond
Distribute Loop condition used when composing 'omp distribute' with 'omp for' in a same construct whe...
Definition: StmtOpenMP.h:732
Expr * Cond
Distribute Loop condition used when composing 'omp distribute' with 'omp for' in a same construct.
Definition: StmtOpenMP.h:723
The expressions built for the OpenMP loop CodeGen for the whole collapsed loop nest.
Definition: StmtOpenMP.h:741
Expr * LastIteration
Loop last iteration number.
Definition: StmtOpenMP.h:745
SmallVector< Expr *, 4 > DependentInits
List of initializers required for the generation of the non-rectangular loops.
Definition: StmtOpenMP.h:803
SmallVector< Expr *, 4 > Inits
Expressions for loop counters inits for CodeGen.
Definition: StmtOpenMP.h:793
Expr * PrevEUB
PrevEUB - expression similar to EUB but to be used when loop scheduling uses PrevLB and PrevUB (e....
Definition: StmtOpenMP.h:787
Expr * DistInc
DistInc - increment expression for distribute loop when found combined with a further loop level (e....
Definition: StmtOpenMP.h:781
Expr * IL
IsLastIteration - local flag variable passed to runtime.
Definition: StmtOpenMP.h:759
SmallVector< Expr *, 4 > PrivateCounters
PrivateCounters Loop counters.
Definition: StmtOpenMP.h:791
Expr * CalcLastIteration
Calculation of last iteration.
Definition: StmtOpenMP.h:749
SmallVector< Expr *, 4 > Updates
Expressions for loop counters update for CodeGen.
Definition: StmtOpenMP.h:795
Expr * ST
Stride - local variable passed to runtime.
Definition: StmtOpenMP.h:765
SmallVector< Expr *, 4 > Finals
Final loop counter values for GodeGen.
Definition: StmtOpenMP.h:797
SmallVector< Expr *, 4 > FinalsConditions
List of final conditions required for the generation of the non-rectangular loops.
Definition: StmtOpenMP.h:806
Expr * PreCond
Loop pre-condition.
Definition: StmtOpenMP.h:751
Stmt * PreInits
Init statement for all captured expressions.
Definition: StmtOpenMP.h:808
Expr * IterationVarRef
Loop iteration variable.
Definition: StmtOpenMP.h:743
Expr * NumIterations
Loop number of iterations.
Definition: StmtOpenMP.h:747
SmallVector< Expr *, 4 > Counters
Counters Loop counters.
Definition: StmtOpenMP.h:789
Expr * NLB
Update of LowerBound for statically scheduled 'omp for' loops.
Definition: StmtOpenMP.h:769
Expr * PrevUB
PreviousUpperBound - local variable passed to runtime in the enclosing schedule or null if that does ...
Definition: StmtOpenMP.h:777
DistCombinedHelperExprs DistCombinedFields
Expressions used when combining OpenMP loop pragmas.
Definition: StmtOpenMP.h:811
Expr * EUB
EnsureUpperBound – expression UB = min(UB, NumIterations).
Definition: StmtOpenMP.h:767
Expr * UB
UpperBound - local variable passed to runtime.
Definition: StmtOpenMP.h:763
Expr * NUB
Update of UpperBound for statically scheduled 'omp for' loops.
Definition: StmtOpenMP.h:771
Expr * LB
LowerBound - local variable passed to runtime.
Definition: StmtOpenMP.h:761
Expr * PrevLB
PreviousLowerBound - local variable passed to runtime in the enclosing schedule or null if that does ...
Definition: StmtOpenMP.h:774
SmallVector< Expr *, 4 > DependentCounters
List of counters required for the generation of the non-rectangular loops.
Definition: StmtOpenMP.h:800
Expr * Init
Loop iteration variable init.
Definition: StmtOpenMP.h:755
A placeholder type used to construct an empty shell of a type, that will be filled in later (e....
Definition: Stmt.h:1330