clang  15.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 subclesses of Stmt class declared in StmtOpenMP.h
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #include "clang/AST/ASTContext.h"
14 #include "clang/AST/StmtOpenMP.h"
15 
16 using namespace clang;
17 using namespace llvm::omp;
18 
19 size_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::makeMutableArrayRef(getTrailingObjects<Stmt *>(), NumChildren);
35 }
36 
37 OMPChildren *OMPChildren::Create(void *Mem, ArrayRef<OMPClause *> Clauses) {
38  auto *Data = CreateEmpty(Mem, Clauses.size());
39  Data->setClauses(Clauses);
40  return Data;
41 }
42 
43 OMPChildren *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 
52 OMPChildren *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 
77 Stmt *
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,
207  NumAssociatedLoops,
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 
409  SourceLocation EndLoc, ArrayRef<OMPClause *> Clauses,
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 
430  SourceLocation EndLoc, ArrayRef<OMPClause *> Clauses,
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, unsigned CollapsedNum,
453  ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
454  const HelperExprs &Exprs) {
455  auto *Dir = createDirective<OMPForSimdDirective>(
456  C, Clauses, AssociatedStmt, numLoopChildren(CollapsedNum, OMPD_for_simd),
457  StartLoc, EndLoc, CollapsedNum);
458  Dir->setIterationVariable(Exprs.IterationVarRef);
459  Dir->setLastIteration(Exprs.LastIteration);
460  Dir->setCalcLastIteration(Exprs.CalcLastIteration);
461  Dir->setPreCond(Exprs.PreCond);
462  Dir->setCond(Exprs.Cond);
463  Dir->setInit(Exprs.Init);
464  Dir->setInc(Exprs.Inc);
465  Dir->setIsLastIterVariable(Exprs.IL);
466  Dir->setLowerBoundVariable(Exprs.LB);
467  Dir->setUpperBoundVariable(Exprs.UB);
468  Dir->setStrideVariable(Exprs.ST);
469  Dir->setEnsureUpperBound(Exprs.EUB);
470  Dir->setNextLowerBound(Exprs.NLB);
471  Dir->setNextUpperBound(Exprs.NUB);
472  Dir->setNumIterations(Exprs.NumIterations);
473  Dir->setCounters(Exprs.Counters);
474  Dir->setPrivateCounters(Exprs.PrivateCounters);
475  Dir->setInits(Exprs.Inits);
476  Dir->setUpdates(Exprs.Updates);
477  Dir->setFinals(Exprs.Finals);
478  Dir->setDependentCounters(Exprs.DependentCounters);
479  Dir->setDependentInits(Exprs.DependentInits);
480  Dir->setFinalsConditions(Exprs.FinalsConditions);
481  Dir->setPreInits(Exprs.PreInits);
482  return Dir;
483 }
484 
486  unsigned NumClauses,
487  unsigned CollapsedNum,
488  EmptyShell) {
489  return createEmptyDirective<OMPForSimdDirective>(
490  C, NumClauses, /*HasAssociatedStmt=*/true,
491  numLoopChildren(CollapsedNum, OMPD_for_simd), CollapsedNum);
492 }
493 
495  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
496  ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef,
497  bool HasCancel) {
498  auto *Dir = createDirective<OMPSectionsDirective>(C, Clauses, AssociatedStmt,
499  /*NumChildren=*/1, StartLoc,
500  EndLoc);
501  Dir->setTaskReductionRefExpr(TaskRedRef);
502  Dir->setHasCancel(HasCancel);
503  return Dir;
504 }
505 
507  unsigned NumClauses,
508  EmptyShell) {
509  return createEmptyDirective<OMPSectionsDirective>(C, NumClauses,
510  /*HasAssociatedStmt=*/true,
511  /*NumChildren=*/1);
512 }
513 
515  SourceLocation StartLoc,
516  SourceLocation EndLoc,
517  Stmt *AssociatedStmt,
518  bool HasCancel) {
519  auto *Dir =
520  createDirective<OMPSectionDirective>(C, llvm::None, AssociatedStmt,
521  /*NumChildren=*/0, StartLoc, EndLoc);
522  Dir->setHasCancel(HasCancel);
523  return Dir;
524 }
525 
527  EmptyShell) {
528  return createEmptyDirective<OMPSectionDirective>(C, /*NumClauses=*/0,
529  /*HasAssociatedStmt=*/true);
530 }
531 
533  SourceLocation StartLoc,
534  SourceLocation EndLoc,
535  ArrayRef<OMPClause *> Clauses,
536  Stmt *AssociatedStmt) {
537  return createDirective<OMPSingleDirective>(C, Clauses, AssociatedStmt,
538  /*NumChildren=*/0, StartLoc,
539  EndLoc);
540 }
541 
543  unsigned NumClauses,
544  EmptyShell) {
545  return createEmptyDirective<OMPSingleDirective>(C, NumClauses,
546  /*HasAssociatedStmt=*/true);
547 }
548 
550  SourceLocation StartLoc,
551  SourceLocation EndLoc,
552  Stmt *AssociatedStmt) {
553  return createDirective<OMPMasterDirective>(C, llvm::None, AssociatedStmt,
554  /*NumChildren=*/0, StartLoc,
555  EndLoc);
556 }
557 
559  EmptyShell) {
560  return createEmptyDirective<OMPMasterDirective>(C, /*NumClauses=*/0,
561  /*HasAssociatedStmt=*/true);
562 }
563 
565  const ASTContext &C, const DeclarationNameInfo &Name,
566  SourceLocation StartLoc, SourceLocation EndLoc,
567  ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt) {
568  return createDirective<OMPCriticalDirective>(C, Clauses, AssociatedStmt,
569  /*NumChildren=*/0, Name,
570  StartLoc, EndLoc);
571 }
572 
574  unsigned NumClauses,
575  EmptyShell) {
576  return createEmptyDirective<OMPCriticalDirective>(C, NumClauses,
577  /*HasAssociatedStmt=*/true);
578 }
579 
581  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
582  unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
583  const HelperExprs &Exprs, Expr *TaskRedRef, bool HasCancel) {
584  auto *Dir = createDirective<OMPParallelForDirective>(
585  C, Clauses, AssociatedStmt,
586  numLoopChildren(CollapsedNum, OMPD_parallel_for) + 1, StartLoc, EndLoc,
587  CollapsedNum);
588  Dir->setIterationVariable(Exprs.IterationVarRef);
589  Dir->setLastIteration(Exprs.LastIteration);
590  Dir->setCalcLastIteration(Exprs.CalcLastIteration);
591  Dir->setPreCond(Exprs.PreCond);
592  Dir->setCond(Exprs.Cond);
593  Dir->setInit(Exprs.Init);
594  Dir->setInc(Exprs.Inc);
595  Dir->setIsLastIterVariable(Exprs.IL);
596  Dir->setLowerBoundVariable(Exprs.LB);
597  Dir->setUpperBoundVariable(Exprs.UB);
598  Dir->setStrideVariable(Exprs.ST);
599  Dir->setEnsureUpperBound(Exprs.EUB);
600  Dir->setNextLowerBound(Exprs.NLB);
601  Dir->setNextUpperBound(Exprs.NUB);
602  Dir->setNumIterations(Exprs.NumIterations);
603  Dir->setCounters(Exprs.Counters);
604  Dir->setPrivateCounters(Exprs.PrivateCounters);
605  Dir->setInits(Exprs.Inits);
606  Dir->setUpdates(Exprs.Updates);
607  Dir->setFinals(Exprs.Finals);
608  Dir->setDependentCounters(Exprs.DependentCounters);
609  Dir->setDependentInits(Exprs.DependentInits);
610  Dir->setFinalsConditions(Exprs.FinalsConditions);
611  Dir->setPreInits(Exprs.PreInits);
612  Dir->setTaskReductionRefExpr(TaskRedRef);
613  Dir->setHasCancel(HasCancel);
614  return Dir;
615 }
616 
618 OMPParallelForDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses,
619  unsigned CollapsedNum, EmptyShell) {
620  return createEmptyDirective<OMPParallelForDirective>(
621  C, NumClauses, /*HasAssociatedStmt=*/true,
622  numLoopChildren(CollapsedNum, OMPD_parallel_for) + 1, CollapsedNum);
623 }
624 
626  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
627  unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
628  const HelperExprs &Exprs) {
629  auto *Dir = createDirective<OMPParallelForSimdDirective>(
630  C, Clauses, AssociatedStmt,
631  numLoopChildren(CollapsedNum, OMPD_parallel_for_simd), StartLoc, EndLoc,
632  CollapsedNum);
633  Dir->setIterationVariable(Exprs.IterationVarRef);
634  Dir->setLastIteration(Exprs.LastIteration);
635  Dir->setCalcLastIteration(Exprs.CalcLastIteration);
636  Dir->setPreCond(Exprs.PreCond);
637  Dir->setCond(Exprs.Cond);
638  Dir->setInit(Exprs.Init);
639  Dir->setInc(Exprs.Inc);
640  Dir->setIsLastIterVariable(Exprs.IL);
641  Dir->setLowerBoundVariable(Exprs.LB);
642  Dir->setUpperBoundVariable(Exprs.UB);
643  Dir->setStrideVariable(Exprs.ST);
644  Dir->setEnsureUpperBound(Exprs.EUB);
645  Dir->setNextLowerBound(Exprs.NLB);
646  Dir->setNextUpperBound(Exprs.NUB);
647  Dir->setNumIterations(Exprs.NumIterations);
648  Dir->setCounters(Exprs.Counters);
649  Dir->setPrivateCounters(Exprs.PrivateCounters);
650  Dir->setInits(Exprs.Inits);
651  Dir->setUpdates(Exprs.Updates);
652  Dir->setFinals(Exprs.Finals);
653  Dir->setDependentCounters(Exprs.DependentCounters);
654  Dir->setDependentInits(Exprs.DependentInits);
655  Dir->setFinalsConditions(Exprs.FinalsConditions);
656  Dir->setPreInits(Exprs.PreInits);
657  return Dir;
658 }
659 
662  unsigned NumClauses,
663  unsigned CollapsedNum, EmptyShell) {
664  return createEmptyDirective<OMPParallelForSimdDirective>(
665  C, NumClauses, /*HasAssociatedStmt=*/true,
666  numLoopChildren(CollapsedNum, OMPD_parallel_for_simd), CollapsedNum);
667 }
668 
670  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
671  ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef) {
672  auto *Dir = createDirective<OMPParallelMasterDirective>(
673  C, Clauses, AssociatedStmt, /*NumChildren=*/1, StartLoc, EndLoc);
674  Dir->setTaskReductionRefExpr(TaskRedRef);
675  return Dir;
676 }
677 
680  unsigned NumClauses, EmptyShell) {
681  return createEmptyDirective<OMPParallelMasterDirective>(
682  C, NumClauses, /*HasAssociatedStmt=*/true, /*NumChildren=*/1);
683 }
684 
686  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
687  ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef,
688  bool HasCancel) {
689  auto *Dir = createDirective<OMPParallelSectionsDirective>(
690  C, Clauses, AssociatedStmt, /*NumChildren=*/1, StartLoc, EndLoc);
691  Dir->setTaskReductionRefExpr(TaskRedRef);
692  Dir->setHasCancel(HasCancel);
693  return Dir;
694 }
695 
698  unsigned NumClauses, EmptyShell) {
699  return createEmptyDirective<OMPParallelSectionsDirective>(
700  C, NumClauses, /*HasAssociatedStmt=*/true, /*NumChildren=*/1);
701 }
702 
705  SourceLocation EndLoc, ArrayRef<OMPClause *> Clauses,
706  Stmt *AssociatedStmt, bool HasCancel) {
707  auto *Dir = createDirective<OMPTaskDirective>(
708  C, Clauses, AssociatedStmt, /*NumChildren=*/0, StartLoc, EndLoc);
709  Dir->setHasCancel(HasCancel);
710  return Dir;
711 }
712 
714  unsigned NumClauses,
715  EmptyShell) {
716  return createEmptyDirective<OMPTaskDirective>(C, NumClauses,
717  /*HasAssociatedStmt=*/true);
718 }
719 
721  SourceLocation StartLoc,
722  SourceLocation EndLoc) {
723  return new (C) OMPTaskyieldDirective(StartLoc, EndLoc);
724 }
725 
727  EmptyShell) {
728  return new (C) OMPTaskyieldDirective();
729 }
730 
732  SourceLocation StartLoc,
733  SourceLocation EndLoc) {
734  return new (C) OMPBarrierDirective(StartLoc, EndLoc);
735 }
736 
738  EmptyShell) {
739  return new (C) OMPBarrierDirective();
740 }
741 
744  SourceLocation EndLoc,
745  ArrayRef<OMPClause *> Clauses) {
746  return createDirective<OMPTaskwaitDirective>(
747  C, Clauses, /*AssociatedStmt=*/nullptr, /*NumChildren=*/0, StartLoc,
748  EndLoc);
749 }
750 
752  unsigned NumClauses,
753  EmptyShell) {
754  return createEmptyDirective<OMPTaskwaitDirective>(C, NumClauses);
755 }
756 
758  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
759  ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *ReductionRef) {
760  auto *Dir = createDirective<OMPTaskgroupDirective>(
761  C, Clauses, AssociatedStmt, /*NumChildren=*/1, StartLoc, EndLoc);
762  Dir->setReductionRef(ReductionRef);
763  return Dir;
764 }
765 
767  unsigned NumClauses,
768  EmptyShell) {
769  return createEmptyDirective<OMPTaskgroupDirective>(
770  C, NumClauses, /*HasAssociatedStmt=*/true, /*NumChildren=*/1);
771 }
772 
774  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
775  OpenMPDirectiveKind CancelRegion) {
776  auto *Dir = new (C) OMPCancellationPointDirective(StartLoc, EndLoc);
777  Dir->setCancelRegion(CancelRegion);
778  return Dir;
779 }
780 
783  return new (C) OMPCancellationPointDirective();
784 }
785 
788  SourceLocation EndLoc, ArrayRef<OMPClause *> Clauses,
789  OpenMPDirectiveKind CancelRegion) {
790  auto *Dir = createDirective<OMPCancelDirective>(
791  C, Clauses, /*AssociatedStmt=*/nullptr, /*NumChildren=*/0, StartLoc,
792  EndLoc);
793  Dir->setCancelRegion(CancelRegion);
794  return Dir;
795 }
796 
798  unsigned NumClauses,
799  EmptyShell) {
800  return createEmptyDirective<OMPCancelDirective>(C, NumClauses);
801 }
802 
804  SourceLocation StartLoc,
805  SourceLocation EndLoc,
806  ArrayRef<OMPClause *> Clauses) {
807  return createDirective<OMPFlushDirective>(
808  C, Clauses, /*AssociatedStmt=*/nullptr, /*NumChildren=*/0, StartLoc,
809  EndLoc);
810 }
811 
813  unsigned NumClauses,
814  EmptyShell) {
815  return createEmptyDirective<OMPFlushDirective>(C, NumClauses);
816 }
817 
819  SourceLocation StartLoc,
820  SourceLocation EndLoc,
821  ArrayRef<OMPClause *> Clauses) {
822  return createDirective<OMPDepobjDirective>(
823  C, Clauses, /*AssociatedStmt=*/nullptr,
824  /*NumChildren=*/0, StartLoc, EndLoc);
825 }
826 
828  unsigned NumClauses,
829  EmptyShell) {
830  return createEmptyDirective<OMPDepobjDirective>(C, NumClauses);
831 }
832 
834  SourceLocation StartLoc,
835  SourceLocation EndLoc,
836  ArrayRef<OMPClause *> Clauses) {
837  return createDirective<OMPScanDirective>(C, Clauses,
838  /*AssociatedStmt=*/nullptr,
839  /*NumChildren=*/0, StartLoc, EndLoc);
840 }
841 
843  unsigned NumClauses,
844  EmptyShell) {
845  return createEmptyDirective<OMPScanDirective>(C, NumClauses);
846 }
847 
849  SourceLocation StartLoc,
850  SourceLocation EndLoc,
851  ArrayRef<OMPClause *> Clauses,
852  Stmt *AssociatedStmt) {
853  return createDirective<OMPOrderedDirective>(
854  C, Clauses, cast_or_null<CapturedStmt>(AssociatedStmt),
855  /*NumChildren=*/0, StartLoc, EndLoc);
856 }
857 
859  unsigned NumClauses,
860  bool IsStandalone,
861  EmptyShell) {
862  return createEmptyDirective<OMPOrderedDirective>(C, NumClauses,
863  !IsStandalone);
864 }
865 
868  SourceLocation EndLoc, ArrayRef<OMPClause *> Clauses,
869  Stmt *AssociatedStmt, Expressions Exprs) {
870  auto *Dir = createDirective<OMPAtomicDirective>(
871  C, Clauses, AssociatedStmt, /*NumChildren=*/6, StartLoc, EndLoc);
872  Dir->setX(Exprs.X);
873  Dir->setV(Exprs.V);
874  Dir->setExpr(Exprs.E);
875  Dir->setUpdateExpr(Exprs.UE);
876  Dir->setD(Exprs.D);
877  Dir->setCond(Exprs.Cond);
878  Dir->Flags.IsXLHSInRHSPart = Exprs.IsXLHSInRHSPart ? 1 : 0;
879  Dir->Flags.IsPostfixUpdate = Exprs.IsPostfixUpdate ? 1 : 0;
880  return Dir;
881 }
882 
884  unsigned NumClauses,
885  EmptyShell) {
886  return createEmptyDirective<OMPAtomicDirective>(
887  C, NumClauses, /*HasAssociatedStmt=*/true, /*NumChildren=*/6);
888 }
889 
891  SourceLocation StartLoc,
892  SourceLocation EndLoc,
893  ArrayRef<OMPClause *> Clauses,
894  Stmt *AssociatedStmt) {
895  return createDirective<OMPTargetDirective>(
896  C, Clauses, AssociatedStmt, /*NumChildren=*/0, StartLoc, EndLoc);
897 }
898 
900  unsigned NumClauses,
901  EmptyShell) {
902  return createEmptyDirective<OMPTargetDirective>(C, NumClauses,
903  /*HasAssociatedStmt=*/true);
904 }
905 
907  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
908  ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef,
909  bool HasCancel) {
910  auto *Dir = createDirective<OMPTargetParallelDirective>(
911  C, Clauses, AssociatedStmt, /*NumChildren=*/1, StartLoc, EndLoc);
912  Dir->setTaskReductionRefExpr(TaskRedRef);
913  Dir->setHasCancel(HasCancel);
914  return Dir;
915 }
916 
919  unsigned NumClauses, EmptyShell) {
920  return createEmptyDirective<OMPTargetParallelDirective>(
921  C, NumClauses, /*HasAssociatedStmt=*/true, /*NumChildren=*/1);
922 }
923 
925  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
926  unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
927  const HelperExprs &Exprs, Expr *TaskRedRef, bool HasCancel) {
928  auto *Dir = createDirective<OMPTargetParallelForDirective>(
929  C, Clauses, AssociatedStmt,
930  numLoopChildren(CollapsedNum, OMPD_target_parallel_for) + 1, StartLoc,
931  EndLoc, CollapsedNum);
932  Dir->setIterationVariable(Exprs.IterationVarRef);
933  Dir->setLastIteration(Exprs.LastIteration);
934  Dir->setCalcLastIteration(Exprs.CalcLastIteration);
935  Dir->setPreCond(Exprs.PreCond);
936  Dir->setCond(Exprs.Cond);
937  Dir->setInit(Exprs.Init);
938  Dir->setInc(Exprs.Inc);
939  Dir->setIsLastIterVariable(Exprs.IL);
940  Dir->setLowerBoundVariable(Exprs.LB);
941  Dir->setUpperBoundVariable(Exprs.UB);
942  Dir->setStrideVariable(Exprs.ST);
943  Dir->setEnsureUpperBound(Exprs.EUB);
944  Dir->setNextLowerBound(Exprs.NLB);
945  Dir->setNextUpperBound(Exprs.NUB);
946  Dir->setNumIterations(Exprs.NumIterations);
947  Dir->setCounters(Exprs.Counters);
948  Dir->setPrivateCounters(Exprs.PrivateCounters);
949  Dir->setInits(Exprs.Inits);
950  Dir->setUpdates(Exprs.Updates);
951  Dir->setFinals(Exprs.Finals);
952  Dir->setDependentCounters(Exprs.DependentCounters);
953  Dir->setDependentInits(Exprs.DependentInits);
954  Dir->setFinalsConditions(Exprs.FinalsConditions);
955  Dir->setPreInits(Exprs.PreInits);
956  Dir->setTaskReductionRefExpr(TaskRedRef);
957  Dir->setHasCancel(HasCancel);
958  return Dir;
959 }
960 
963  unsigned NumClauses,
964  unsigned CollapsedNum, EmptyShell) {
965  return createEmptyDirective<OMPTargetParallelForDirective>(
966  C, NumClauses, /*HasAssociatedStmt=*/true,
967  numLoopChildren(CollapsedNum, OMPD_target_parallel_for) + 1,
968  CollapsedNum);
969 }
970 
972  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
973  ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt) {
974  return createDirective<OMPTargetDataDirective>(
975  C, Clauses, AssociatedStmt, /*NumChildren=*/0, StartLoc, EndLoc);
976 }
977 
979  unsigned N,
980  EmptyShell) {
981  return createEmptyDirective<OMPTargetDataDirective>(
982  C, N, /*HasAssociatedStmt=*/true);
983 }
984 
986  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
987  ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt) {
988  return createDirective<OMPTargetEnterDataDirective>(
989  C, Clauses, AssociatedStmt, /*NumChildren=*/0, StartLoc, EndLoc);
990 }
991 
994  EmptyShell) {
995  return createEmptyDirective<OMPTargetEnterDataDirective>(
996  C, N, /*HasAssociatedStmt=*/true);
997 }
998 
1000  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1001  ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt) {
1002  return createDirective<OMPTargetExitDataDirective>(
1003  C, Clauses, AssociatedStmt, /*NumChildren=*/0, StartLoc, EndLoc);
1004 }
1005 
1008  EmptyShell) {
1009  return createEmptyDirective<OMPTargetExitDataDirective>(
1010  C, N, /*HasAssociatedStmt=*/true);
1011 }
1012 
1014  SourceLocation StartLoc,
1015  SourceLocation EndLoc,
1016  ArrayRef<OMPClause *> Clauses,
1017  Stmt *AssociatedStmt) {
1018  return createDirective<OMPTeamsDirective>(
1019  C, Clauses, AssociatedStmt, /*NumChildren=*/0, StartLoc, EndLoc);
1020 }
1021 
1023  unsigned NumClauses,
1024  EmptyShell) {
1025  return createEmptyDirective<OMPTeamsDirective>(C, NumClauses,
1026  /*HasAssociatedStmt=*/true);
1027 }
1028 
1030  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1031  unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1032  const HelperExprs &Exprs, bool HasCancel) {
1033  auto *Dir = createDirective<OMPTaskLoopDirective>(
1034  C, Clauses, AssociatedStmt, numLoopChildren(CollapsedNum, OMPD_taskloop),
1035  StartLoc, 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->setHasCancel(HasCancel);
1061  return Dir;
1062 }
1063 
1065  unsigned NumClauses,
1066  unsigned CollapsedNum,
1067  EmptyShell) {
1068  return createEmptyDirective<OMPTaskLoopDirective>(
1069  C, NumClauses, /*HasAssociatedStmt=*/true,
1070  numLoopChildren(CollapsedNum, OMPD_taskloop), CollapsedNum);
1071 }
1072 
1074  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1075  unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1076  const HelperExprs &Exprs) {
1077  auto *Dir = createDirective<OMPTaskLoopSimdDirective>(
1078  C, Clauses, AssociatedStmt,
1079  numLoopChildren(CollapsedNum, OMPD_taskloop_simd), StartLoc, EndLoc,
1080  CollapsedNum);
1081  Dir->setIterationVariable(Exprs.IterationVarRef);
1082  Dir->setLastIteration(Exprs.LastIteration);
1083  Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1084  Dir->setPreCond(Exprs.PreCond);
1085  Dir->setCond(Exprs.Cond);
1086  Dir->setInit(Exprs.Init);
1087  Dir->setInc(Exprs.Inc);
1088  Dir->setIsLastIterVariable(Exprs.IL);
1089  Dir->setLowerBoundVariable(Exprs.LB);
1090  Dir->setUpperBoundVariable(Exprs.UB);
1091  Dir->setStrideVariable(Exprs.ST);
1092  Dir->setEnsureUpperBound(Exprs.EUB);
1093  Dir->setNextLowerBound(Exprs.NLB);
1094  Dir->setNextUpperBound(Exprs.NUB);
1095  Dir->setNumIterations(Exprs.NumIterations);
1096  Dir->setCounters(Exprs.Counters);
1097  Dir->setPrivateCounters(Exprs.PrivateCounters);
1098  Dir->setInits(Exprs.Inits);
1099  Dir->setUpdates(Exprs.Updates);
1100  Dir->setFinals(Exprs.Finals);
1101  Dir->setDependentCounters(Exprs.DependentCounters);
1102  Dir->setDependentInits(Exprs.DependentInits);
1103  Dir->setFinalsConditions(Exprs.FinalsConditions);
1104  Dir->setPreInits(Exprs.PreInits);
1105  return Dir;
1106 }
1107 
1110  unsigned CollapsedNum, EmptyShell) {
1111  return createEmptyDirective<OMPTaskLoopSimdDirective>(
1112  C, NumClauses, /*HasAssociatedStmt=*/true,
1113  numLoopChildren(CollapsedNum, OMPD_taskloop_simd), CollapsedNum);
1114 }
1115 
1117  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1118  unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1119  const HelperExprs &Exprs, bool HasCancel) {
1120  auto *Dir = createDirective<OMPMasterTaskLoopDirective>(
1121  C, Clauses, AssociatedStmt,
1122  numLoopChildren(CollapsedNum, OMPD_master_taskloop), StartLoc, EndLoc,
1123  CollapsedNum);
1124  Dir->setIterationVariable(Exprs.IterationVarRef);
1125  Dir->setLastIteration(Exprs.LastIteration);
1126  Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1127  Dir->setPreCond(Exprs.PreCond);
1128  Dir->setCond(Exprs.Cond);
1129  Dir->setInit(Exprs.Init);
1130  Dir->setInc(Exprs.Inc);
1131  Dir->setIsLastIterVariable(Exprs.IL);
1132  Dir->setLowerBoundVariable(Exprs.LB);
1133  Dir->setUpperBoundVariable(Exprs.UB);
1134  Dir->setStrideVariable(Exprs.ST);
1135  Dir->setEnsureUpperBound(Exprs.EUB);
1136  Dir->setNextLowerBound(Exprs.NLB);
1137  Dir->setNextUpperBound(Exprs.NUB);
1138  Dir->setNumIterations(Exprs.NumIterations);
1139  Dir->setCounters(Exprs.Counters);
1140  Dir->setPrivateCounters(Exprs.PrivateCounters);
1141  Dir->setInits(Exprs.Inits);
1142  Dir->setUpdates(Exprs.Updates);
1143  Dir->setFinals(Exprs.Finals);
1144  Dir->setDependentCounters(Exprs.DependentCounters);
1145  Dir->setDependentInits(Exprs.DependentInits);
1146  Dir->setFinalsConditions(Exprs.FinalsConditions);
1147  Dir->setPreInits(Exprs.PreInits);
1148  Dir->setHasCancel(HasCancel);
1149  return Dir;
1150 }
1151 
1154  unsigned NumClauses,
1155  unsigned CollapsedNum, EmptyShell) {
1156  return createEmptyDirective<OMPMasterTaskLoopDirective>(
1157  C, NumClauses, /*HasAssociatedStmt=*/true,
1158  numLoopChildren(CollapsedNum, OMPD_master_taskloop), CollapsedNum);
1159 }
1160 
1162  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1163  unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1164  const HelperExprs &Exprs) {
1165  auto *Dir = createDirective<OMPMasterTaskLoopSimdDirective>(
1166  C, Clauses, AssociatedStmt,
1167  numLoopChildren(CollapsedNum, OMPD_master_taskloop_simd), StartLoc,
1168  EndLoc, CollapsedNum);
1169  Dir->setIterationVariable(Exprs.IterationVarRef);
1170  Dir->setLastIteration(Exprs.LastIteration);
1171  Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1172  Dir->setPreCond(Exprs.PreCond);
1173  Dir->setCond(Exprs.Cond);
1174  Dir->setInit(Exprs.Init);
1175  Dir->setInc(Exprs.Inc);
1176  Dir->setIsLastIterVariable(Exprs.IL);
1177  Dir->setLowerBoundVariable(Exprs.LB);
1178  Dir->setUpperBoundVariable(Exprs.UB);
1179  Dir->setStrideVariable(Exprs.ST);
1180  Dir->setEnsureUpperBound(Exprs.EUB);
1181  Dir->setNextLowerBound(Exprs.NLB);
1182  Dir->setNextUpperBound(Exprs.NUB);
1183  Dir->setNumIterations(Exprs.NumIterations);
1184  Dir->setCounters(Exprs.Counters);
1185  Dir->setPrivateCounters(Exprs.PrivateCounters);
1186  Dir->setInits(Exprs.Inits);
1187  Dir->setUpdates(Exprs.Updates);
1188  Dir->setFinals(Exprs.Finals);
1189  Dir->setDependentCounters(Exprs.DependentCounters);
1190  Dir->setDependentInits(Exprs.DependentInits);
1191  Dir->setFinalsConditions(Exprs.FinalsConditions);
1192  Dir->setPreInits(Exprs.PreInits);
1193  return Dir;
1194 }
1195 
1198  unsigned NumClauses,
1199  unsigned CollapsedNum, EmptyShell) {
1200  return createEmptyDirective<OMPMasterTaskLoopSimdDirective>(
1201  C, NumClauses, /*HasAssociatedStmt=*/true,
1202  numLoopChildren(CollapsedNum, OMPD_master_taskloop_simd), CollapsedNum);
1203 }
1204 
1206  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1207  unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1208  const HelperExprs &Exprs, bool HasCancel) {
1209  auto *Dir = createDirective<OMPParallelMasterTaskLoopDirective>(
1210  C, Clauses, AssociatedStmt,
1211  numLoopChildren(CollapsedNum, OMPD_parallel_master_taskloop), StartLoc,
1212  EndLoc, CollapsedNum);
1213  Dir->setIterationVariable(Exprs.IterationVarRef);
1214  Dir->setLastIteration(Exprs.LastIteration);
1215  Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1216  Dir->setPreCond(Exprs.PreCond);
1217  Dir->setCond(Exprs.Cond);
1218  Dir->setInit(Exprs.Init);
1219  Dir->setInc(Exprs.Inc);
1220  Dir->setIsLastIterVariable(Exprs.IL);
1221  Dir->setLowerBoundVariable(Exprs.LB);
1222  Dir->setUpperBoundVariable(Exprs.UB);
1223  Dir->setStrideVariable(Exprs.ST);
1224  Dir->setEnsureUpperBound(Exprs.EUB);
1225  Dir->setNextLowerBound(Exprs.NLB);
1226  Dir->setNextUpperBound(Exprs.NUB);
1227  Dir->setNumIterations(Exprs.NumIterations);
1228  Dir->setCounters(Exprs.Counters);
1229  Dir->setPrivateCounters(Exprs.PrivateCounters);
1230  Dir->setInits(Exprs.Inits);
1231  Dir->setUpdates(Exprs.Updates);
1232  Dir->setFinals(Exprs.Finals);
1233  Dir->setDependentCounters(Exprs.DependentCounters);
1234  Dir->setDependentInits(Exprs.DependentInits);
1235  Dir->setFinalsConditions(Exprs.FinalsConditions);
1236  Dir->setPreInits(Exprs.PreInits);
1237  Dir->setHasCancel(HasCancel);
1238  return Dir;
1239 }
1240 
1243  unsigned NumClauses,
1244  unsigned CollapsedNum,
1245  EmptyShell) {
1246  return createEmptyDirective<OMPParallelMasterTaskLoopDirective>(
1247  C, NumClauses, /*HasAssociatedStmt=*/true,
1248  numLoopChildren(CollapsedNum, OMPD_parallel_master_taskloop),
1249  CollapsedNum);
1250 }
1251 
1254  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1255  unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1256  const HelperExprs &Exprs) {
1257  auto *Dir = createDirective<OMPParallelMasterTaskLoopSimdDirective>(
1258  C, Clauses, AssociatedStmt,
1259  numLoopChildren(CollapsedNum, OMPD_parallel_master_taskloop_simd),
1260  StartLoc, EndLoc, CollapsedNum);
1261  Dir->setIterationVariable(Exprs.IterationVarRef);
1262  Dir->setLastIteration(Exprs.LastIteration);
1263  Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1264  Dir->setPreCond(Exprs.PreCond);
1265  Dir->setCond(Exprs.Cond);
1266  Dir->setInit(Exprs.Init);
1267  Dir->setInc(Exprs.Inc);
1268  Dir->setIsLastIterVariable(Exprs.IL);
1269  Dir->setLowerBoundVariable(Exprs.LB);
1270  Dir->setUpperBoundVariable(Exprs.UB);
1271  Dir->setStrideVariable(Exprs.ST);
1272  Dir->setEnsureUpperBound(Exprs.EUB);
1273  Dir->setNextLowerBound(Exprs.NLB);
1274  Dir->setNextUpperBound(Exprs.NUB);
1275  Dir->setNumIterations(Exprs.NumIterations);
1276  Dir->setCounters(Exprs.Counters);
1277  Dir->setPrivateCounters(Exprs.PrivateCounters);
1278  Dir->setInits(Exprs.Inits);
1279  Dir->setUpdates(Exprs.Updates);
1280  Dir->setFinals(Exprs.Finals);
1281  Dir->setDependentCounters(Exprs.DependentCounters);
1282  Dir->setDependentInits(Exprs.DependentInits);
1283  Dir->setFinalsConditions(Exprs.FinalsConditions);
1284  Dir->setPreInits(Exprs.PreInits);
1285  return Dir;
1286 }
1287 
1290  unsigned NumClauses,
1291  unsigned CollapsedNum,
1292  EmptyShell) {
1293  return createEmptyDirective<OMPParallelMasterTaskLoopSimdDirective>(
1294  C, NumClauses, /*HasAssociatedStmt=*/true,
1295  numLoopChildren(CollapsedNum, OMPD_parallel_master_taskloop_simd),
1296  CollapsedNum);
1297 }
1298 
1300  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1301  unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1302  const HelperExprs &Exprs) {
1303  auto *Dir = createDirective<OMPDistributeDirective>(
1304  C, Clauses, AssociatedStmt,
1305  numLoopChildren(CollapsedNum, OMPD_distribute), StartLoc, EndLoc,
1306  CollapsedNum);
1307  Dir->setIterationVariable(Exprs.IterationVarRef);
1308  Dir->setLastIteration(Exprs.LastIteration);
1309  Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1310  Dir->setPreCond(Exprs.PreCond);
1311  Dir->setCond(Exprs.Cond);
1312  Dir->setInit(Exprs.Init);
1313  Dir->setInc(Exprs.Inc);
1314  Dir->setIsLastIterVariable(Exprs.IL);
1315  Dir->setLowerBoundVariable(Exprs.LB);
1316  Dir->setUpperBoundVariable(Exprs.UB);
1317  Dir->setStrideVariable(Exprs.ST);
1318  Dir->setEnsureUpperBound(Exprs.EUB);
1319  Dir->setNextLowerBound(Exprs.NLB);
1320  Dir->setNextUpperBound(Exprs.NUB);
1321  Dir->setNumIterations(Exprs.NumIterations);
1322  Dir->setCounters(Exprs.Counters);
1323  Dir->setPrivateCounters(Exprs.PrivateCounters);
1324  Dir->setInits(Exprs.Inits);
1325  Dir->setUpdates(Exprs.Updates);
1326  Dir->setFinals(Exprs.Finals);
1327  Dir->setDependentCounters(Exprs.DependentCounters);
1328  Dir->setDependentInits(Exprs.DependentInits);
1329  Dir->setFinalsConditions(Exprs.FinalsConditions);
1330  Dir->setPreInits(Exprs.PreInits);
1331  return Dir;
1332 }
1333 
1335 OMPDistributeDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses,
1336  unsigned CollapsedNum, EmptyShell) {
1337  return createEmptyDirective<OMPDistributeDirective>(
1338  C, NumClauses, /*HasAssociatedStmt=*/true,
1339  numLoopChildren(CollapsedNum, OMPD_distribute), CollapsedNum);
1340 }
1341 
1343  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1344  ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt) {
1345  return createDirective<OMPTargetUpdateDirective>(C, Clauses, AssociatedStmt,
1346  /*NumChildren=*/0, StartLoc,
1347  EndLoc);
1348 }
1349 
1352  EmptyShell) {
1353  return createEmptyDirective<OMPTargetUpdateDirective>(
1354  C, NumClauses, /*HasAssociatedStmt=*/true);
1355 }
1356 
1358  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1359  unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1360  const HelperExprs &Exprs, Expr *TaskRedRef, bool HasCancel) {
1361  auto *Dir = createDirective<OMPDistributeParallelForDirective>(
1362  C, Clauses, AssociatedStmt,
1363  numLoopChildren(CollapsedNum, OMPD_distribute_parallel_for) + 1, StartLoc,
1364  EndLoc, CollapsedNum);
1365  Dir->setIterationVariable(Exprs.IterationVarRef);
1366  Dir->setLastIteration(Exprs.LastIteration);
1367  Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1368  Dir->setPreCond(Exprs.PreCond);
1369  Dir->setCond(Exprs.Cond);
1370  Dir->setInit(Exprs.Init);
1371  Dir->setInc(Exprs.Inc);
1372  Dir->setIsLastIterVariable(Exprs.IL);
1373  Dir->setLowerBoundVariable(Exprs.LB);
1374  Dir->setUpperBoundVariable(Exprs.UB);
1375  Dir->setStrideVariable(Exprs.ST);
1376  Dir->setEnsureUpperBound(Exprs.EUB);
1377  Dir->setNextLowerBound(Exprs.NLB);
1378  Dir->setNextUpperBound(Exprs.NUB);
1379  Dir->setNumIterations(Exprs.NumIterations);
1380  Dir->setPrevLowerBoundVariable(Exprs.PrevLB);
1381  Dir->setPrevUpperBoundVariable(Exprs.PrevUB);
1382  Dir->setDistInc(Exprs.DistInc);
1383  Dir->setPrevEnsureUpperBound(Exprs.PrevEUB);
1384  Dir->setCounters(Exprs.Counters);
1385  Dir->setPrivateCounters(Exprs.PrivateCounters);
1386  Dir->setInits(Exprs.Inits);
1387  Dir->setUpdates(Exprs.Updates);
1388  Dir->setFinals(Exprs.Finals);
1389  Dir->setDependentCounters(Exprs.DependentCounters);
1390  Dir->setDependentInits(Exprs.DependentInits);
1391  Dir->setFinalsConditions(Exprs.FinalsConditions);
1392  Dir->setPreInits(Exprs.PreInits);
1393  Dir->setCombinedLowerBoundVariable(Exprs.DistCombinedFields.LB);
1394  Dir->setCombinedUpperBoundVariable(Exprs.DistCombinedFields.UB);
1395  Dir->setCombinedEnsureUpperBound(Exprs.DistCombinedFields.EUB);
1396  Dir->setCombinedInit(Exprs.DistCombinedFields.Init);
1397  Dir->setCombinedCond(Exprs.DistCombinedFields.Cond);
1398  Dir->setCombinedNextLowerBound(Exprs.DistCombinedFields.NLB);
1399  Dir->setCombinedNextUpperBound(Exprs.DistCombinedFields.NUB);
1400  Dir->setCombinedDistCond(Exprs.DistCombinedFields.DistCond);
1401  Dir->setCombinedParForInDistCond(Exprs.DistCombinedFields.ParForInDistCond);
1402  Dir->setTaskReductionRefExpr(TaskRedRef);
1403  Dir->HasCancel = HasCancel;
1404  return Dir;
1405 }
1406 
1409  unsigned NumClauses,
1410  unsigned CollapsedNum,
1411  EmptyShell) {
1412  return createEmptyDirective<OMPDistributeParallelForDirective>(
1413  C, NumClauses, /*HasAssociatedStmt=*/true,
1414  numLoopChildren(CollapsedNum, OMPD_distribute_parallel_for) + 1,
1415  CollapsedNum);
1416 }
1417 
1420  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1421  unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1422  const HelperExprs &Exprs) {
1423  auto *Dir = createDirective<OMPDistributeParallelForSimdDirective>(
1424  C, Clauses, AssociatedStmt,
1425  numLoopChildren(CollapsedNum, OMPD_distribute_parallel_for_simd),
1426  StartLoc, EndLoc, CollapsedNum);
1427  Dir->setIterationVariable(Exprs.IterationVarRef);
1428  Dir->setLastIteration(Exprs.LastIteration);
1429  Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1430  Dir->setPreCond(Exprs.PreCond);
1431  Dir->setCond(Exprs.Cond);
1432  Dir->setInit(Exprs.Init);
1433  Dir->setInc(Exprs.Inc);
1434  Dir->setIsLastIterVariable(Exprs.IL);
1435  Dir->setLowerBoundVariable(Exprs.LB);
1436  Dir->setUpperBoundVariable(Exprs.UB);
1437  Dir->setStrideVariable(Exprs.ST);
1438  Dir->setEnsureUpperBound(Exprs.EUB);
1439  Dir->setNextLowerBound(Exprs.NLB);
1440  Dir->setNextUpperBound(Exprs.NUB);
1441  Dir->setNumIterations(Exprs.NumIterations);
1442  Dir->setPrevLowerBoundVariable(Exprs.PrevLB);
1443  Dir->setPrevUpperBoundVariable(Exprs.PrevUB);
1444  Dir->setDistInc(Exprs.DistInc);
1445  Dir->setPrevEnsureUpperBound(Exprs.PrevEUB);
1446  Dir->setCounters(Exprs.Counters);
1447  Dir->setPrivateCounters(Exprs.PrivateCounters);
1448  Dir->setInits(Exprs.Inits);
1449  Dir->setUpdates(Exprs.Updates);
1450  Dir->setFinals(Exprs.Finals);
1451  Dir->setDependentCounters(Exprs.DependentCounters);
1452  Dir->setDependentInits(Exprs.DependentInits);
1453  Dir->setFinalsConditions(Exprs.FinalsConditions);
1454  Dir->setPreInits(Exprs.PreInits);
1455  Dir->setCombinedLowerBoundVariable(Exprs.DistCombinedFields.LB);
1456  Dir->setCombinedUpperBoundVariable(Exprs.DistCombinedFields.UB);
1457  Dir->setCombinedEnsureUpperBound(Exprs.DistCombinedFields.EUB);
1458  Dir->setCombinedInit(Exprs.DistCombinedFields.Init);
1459  Dir->setCombinedCond(Exprs.DistCombinedFields.Cond);
1460  Dir->setCombinedNextLowerBound(Exprs.DistCombinedFields.NLB);
1461  Dir->setCombinedNextUpperBound(Exprs.DistCombinedFields.NUB);
1462  Dir->setCombinedDistCond(Exprs.DistCombinedFields.DistCond);
1463  Dir->setCombinedParForInDistCond(Exprs.DistCombinedFields.ParForInDistCond);
1464  return Dir;
1465 }
1466 
1469  unsigned NumClauses,
1470  unsigned CollapsedNum,
1471  EmptyShell) {
1472  return createEmptyDirective<OMPDistributeParallelForSimdDirective>(
1473  C, NumClauses, /*HasAssociatedStmt=*/true,
1474  numLoopChildren(CollapsedNum, OMPD_distribute_parallel_for_simd),
1475  CollapsedNum);
1476 }
1477 
1479  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1480  unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1481  const HelperExprs &Exprs) {
1482  auto *Dir = createDirective<OMPDistributeSimdDirective>(
1483  C, Clauses, AssociatedStmt,
1484  numLoopChildren(CollapsedNum, OMPD_distribute_simd), StartLoc, EndLoc,
1485  CollapsedNum);
1486  Dir->setIterationVariable(Exprs.IterationVarRef);
1487  Dir->setLastIteration(Exprs.LastIteration);
1488  Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1489  Dir->setPreCond(Exprs.PreCond);
1490  Dir->setCond(Exprs.Cond);
1491  Dir->setInit(Exprs.Init);
1492  Dir->setInc(Exprs.Inc);
1493  Dir->setIsLastIterVariable(Exprs.IL);
1494  Dir->setLowerBoundVariable(Exprs.LB);
1495  Dir->setUpperBoundVariable(Exprs.UB);
1496  Dir->setStrideVariable(Exprs.ST);
1497  Dir->setEnsureUpperBound(Exprs.EUB);
1498  Dir->setNextLowerBound(Exprs.NLB);
1499  Dir->setNextUpperBound(Exprs.NUB);
1500  Dir->setNumIterations(Exprs.NumIterations);
1501  Dir->setCounters(Exprs.Counters);
1502  Dir->setPrivateCounters(Exprs.PrivateCounters);
1503  Dir->setInits(Exprs.Inits);
1504  Dir->setUpdates(Exprs.Updates);
1505  Dir->setFinals(Exprs.Finals);
1506  Dir->setDependentCounters(Exprs.DependentCounters);
1507  Dir->setDependentInits(Exprs.DependentInits);
1508  Dir->setFinalsConditions(Exprs.FinalsConditions);
1509  Dir->setPreInits(Exprs.PreInits);
1510  return Dir;
1511 }
1512 
1515  unsigned NumClauses,
1516  unsigned CollapsedNum, EmptyShell) {
1517  return createEmptyDirective<OMPDistributeSimdDirective>(
1518  C, NumClauses, /*HasAssociatedStmt=*/true,
1519  numLoopChildren(CollapsedNum, OMPD_distribute_simd), CollapsedNum);
1520 }
1521 
1523  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1524  unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1525  const HelperExprs &Exprs) {
1526  auto *Dir = createDirective<OMPTargetParallelForSimdDirective>(
1527  C, Clauses, AssociatedStmt,
1528  numLoopChildren(CollapsedNum, OMPD_target_parallel_for_simd), StartLoc,
1529  EndLoc, CollapsedNum);
1530  Dir->setIterationVariable(Exprs.IterationVarRef);
1531  Dir->setLastIteration(Exprs.LastIteration);
1532  Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1533  Dir->setPreCond(Exprs.PreCond);
1534  Dir->setCond(Exprs.Cond);
1535  Dir->setInit(Exprs.Init);
1536  Dir->setInc(Exprs.Inc);
1537  Dir->setIsLastIterVariable(Exprs.IL);
1538  Dir->setLowerBoundVariable(Exprs.LB);
1539  Dir->setUpperBoundVariable(Exprs.UB);
1540  Dir->setStrideVariable(Exprs.ST);
1541  Dir->setEnsureUpperBound(Exprs.EUB);
1542  Dir->setNextLowerBound(Exprs.NLB);
1543  Dir->setNextUpperBound(Exprs.NUB);
1544  Dir->setNumIterations(Exprs.NumIterations);
1545  Dir->setCounters(Exprs.Counters);
1546  Dir->setPrivateCounters(Exprs.PrivateCounters);
1547  Dir->setInits(Exprs.Inits);
1548  Dir->setUpdates(Exprs.Updates);
1549  Dir->setFinals(Exprs.Finals);
1550  Dir->setDependentCounters(Exprs.DependentCounters);
1551  Dir->setDependentInits(Exprs.DependentInits);
1552  Dir->setFinalsConditions(Exprs.FinalsConditions);
1553  Dir->setPreInits(Exprs.PreInits);
1554  return Dir;
1555 }
1556 
1559  unsigned NumClauses,
1560  unsigned CollapsedNum,
1561  EmptyShell) {
1562  return createEmptyDirective<OMPTargetParallelForSimdDirective>(
1563  C, NumClauses, /*HasAssociatedStmt=*/true,
1564  numLoopChildren(CollapsedNum, OMPD_target_parallel_for_simd),
1565  CollapsedNum);
1566 }
1567 
1570  SourceLocation EndLoc, unsigned CollapsedNum,
1571  ArrayRef<OMPClause *> Clauses,
1572  Stmt *AssociatedStmt, const HelperExprs &Exprs) {
1573  auto *Dir = createDirective<OMPTargetSimdDirective>(
1574  C, Clauses, AssociatedStmt,
1575  numLoopChildren(CollapsedNum, OMPD_target_simd), StartLoc, EndLoc,
1576  CollapsedNum);
1577  Dir->setIterationVariable(Exprs.IterationVarRef);
1578  Dir->setLastIteration(Exprs.LastIteration);
1579  Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1580  Dir->setPreCond(Exprs.PreCond);
1581  Dir->setCond(Exprs.Cond);
1582  Dir->setInit(Exprs.Init);
1583  Dir->setInc(Exprs.Inc);
1584  Dir->setCounters(Exprs.Counters);
1585  Dir->setPrivateCounters(Exprs.PrivateCounters);
1586  Dir->setInits(Exprs.Inits);
1587  Dir->setUpdates(Exprs.Updates);
1588  Dir->setFinals(Exprs.Finals);
1589  Dir->setDependentCounters(Exprs.DependentCounters);
1590  Dir->setDependentInits(Exprs.DependentInits);
1591  Dir->setFinalsConditions(Exprs.FinalsConditions);
1592  Dir->setPreInits(Exprs.PreInits);
1593  return Dir;
1594 }
1595 
1597 OMPTargetSimdDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses,
1598  unsigned CollapsedNum, EmptyShell) {
1599  return createEmptyDirective<OMPTargetSimdDirective>(
1600  C, NumClauses, /*HasAssociatedStmt=*/true,
1601  numLoopChildren(CollapsedNum, OMPD_target_simd), CollapsedNum);
1602 }
1603 
1605  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1606  unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1607  const HelperExprs &Exprs) {
1608  auto *Dir = createDirective<OMPTeamsDistributeDirective>(
1609  C, Clauses, AssociatedStmt,
1610  numLoopChildren(CollapsedNum, OMPD_teams_distribute), StartLoc, EndLoc,
1611  CollapsedNum);
1612  Dir->setIterationVariable(Exprs.IterationVarRef);
1613  Dir->setLastIteration(Exprs.LastIteration);
1614  Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1615  Dir->setPreCond(Exprs.PreCond);
1616  Dir->setCond(Exprs.Cond);
1617  Dir->setInit(Exprs.Init);
1618  Dir->setInc(Exprs.Inc);
1619  Dir->setIsLastIterVariable(Exprs.IL);
1620  Dir->setLowerBoundVariable(Exprs.LB);
1621  Dir->setUpperBoundVariable(Exprs.UB);
1622  Dir->setStrideVariable(Exprs.ST);
1623  Dir->setEnsureUpperBound(Exprs.EUB);
1624  Dir->setNextLowerBound(Exprs.NLB);
1625  Dir->setNextUpperBound(Exprs.NUB);
1626  Dir->setNumIterations(Exprs.NumIterations);
1627  Dir->setCounters(Exprs.Counters);
1628  Dir->setPrivateCounters(Exprs.PrivateCounters);
1629  Dir->setInits(Exprs.Inits);
1630  Dir->setUpdates(Exprs.Updates);
1631  Dir->setFinals(Exprs.Finals);
1632  Dir->setDependentCounters(Exprs.DependentCounters);
1633  Dir->setDependentInits(Exprs.DependentInits);
1634  Dir->setFinalsConditions(Exprs.FinalsConditions);
1635  Dir->setPreInits(Exprs.PreInits);
1636  return Dir;
1637 }
1638 
1641  unsigned NumClauses,
1642  unsigned CollapsedNum, EmptyShell) {
1643  return createEmptyDirective<OMPTeamsDistributeDirective>(
1644  C, NumClauses, /*HasAssociatedStmt=*/true,
1645  numLoopChildren(CollapsedNum, OMPD_teams_distribute), CollapsedNum);
1646 }
1647 
1649  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1650  unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1651  const HelperExprs &Exprs) {
1652  auto *Dir = createDirective<OMPTeamsDistributeSimdDirective>(
1653  C, Clauses, AssociatedStmt,
1654  numLoopChildren(CollapsedNum, OMPD_teams_distribute_simd), StartLoc,
1655  EndLoc, CollapsedNum);
1656  Dir->setIterationVariable(Exprs.IterationVarRef);
1657  Dir->setLastIteration(Exprs.LastIteration);
1658  Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1659  Dir->setPreCond(Exprs.PreCond);
1660  Dir->setCond(Exprs.Cond);
1661  Dir->setInit(Exprs.Init);
1662  Dir->setInc(Exprs.Inc);
1663  Dir->setIsLastIterVariable(Exprs.IL);
1664  Dir->setLowerBoundVariable(Exprs.LB);
1665  Dir->setUpperBoundVariable(Exprs.UB);
1666  Dir->setStrideVariable(Exprs.ST);
1667  Dir->setEnsureUpperBound(Exprs.EUB);
1668  Dir->setNextLowerBound(Exprs.NLB);
1669  Dir->setNextUpperBound(Exprs.NUB);
1670  Dir->setNumIterations(Exprs.NumIterations);
1671  Dir->setCounters(Exprs.Counters);
1672  Dir->setPrivateCounters(Exprs.PrivateCounters);
1673  Dir->setInits(Exprs.Inits);
1674  Dir->setUpdates(Exprs.Updates);
1675  Dir->setFinals(Exprs.Finals);
1676  Dir->setDependentCounters(Exprs.DependentCounters);
1677  Dir->setDependentInits(Exprs.DependentInits);
1678  Dir->setFinalsConditions(Exprs.FinalsConditions);
1679  Dir->setPreInits(Exprs.PreInits);
1680  return Dir;
1681 }
1682 
1684  const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum,
1685  EmptyShell) {
1686  return createEmptyDirective<OMPTeamsDistributeSimdDirective>(
1687  C, NumClauses, /*HasAssociatedStmt=*/true,
1688  numLoopChildren(CollapsedNum, OMPD_teams_distribute_simd), CollapsedNum);
1689 }
1690 
1693  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1694  unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1695  const HelperExprs &Exprs) {
1696  auto *Dir = createDirective<OMPTeamsDistributeParallelForSimdDirective>(
1697  C, Clauses, AssociatedStmt,
1698  numLoopChildren(CollapsedNum, OMPD_teams_distribute_parallel_for_simd),
1699  StartLoc, EndLoc, CollapsedNum);
1700  Dir->setIterationVariable(Exprs.IterationVarRef);
1701  Dir->setLastIteration(Exprs.LastIteration);
1702  Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1703  Dir->setPreCond(Exprs.PreCond);
1704  Dir->setCond(Exprs.Cond);
1705  Dir->setInit(Exprs.Init);
1706  Dir->setInc(Exprs.Inc);
1707  Dir->setIsLastIterVariable(Exprs.IL);
1708  Dir->setLowerBoundVariable(Exprs.LB);
1709  Dir->setUpperBoundVariable(Exprs.UB);
1710  Dir->setStrideVariable(Exprs.ST);
1711  Dir->setEnsureUpperBound(Exprs.EUB);
1712  Dir->setNextLowerBound(Exprs.NLB);
1713  Dir->setNextUpperBound(Exprs.NUB);
1714  Dir->setNumIterations(Exprs.NumIterations);
1715  Dir->setPrevLowerBoundVariable(Exprs.PrevLB);
1716  Dir->setPrevUpperBoundVariable(Exprs.PrevUB);
1717  Dir->setDistInc(Exprs.DistInc);
1718  Dir->setPrevEnsureUpperBound(Exprs.PrevEUB);
1719  Dir->setCounters(Exprs.Counters);
1720  Dir->setPrivateCounters(Exprs.PrivateCounters);
1721  Dir->setInits(Exprs.Inits);
1722  Dir->setUpdates(Exprs.Updates);
1723  Dir->setFinals(Exprs.Finals);
1724  Dir->setDependentCounters(Exprs.DependentCounters);
1725  Dir->setDependentInits(Exprs.DependentInits);
1726  Dir->setFinalsConditions(Exprs.FinalsConditions);
1727  Dir->setPreInits(Exprs.PreInits);
1728  Dir->setCombinedLowerBoundVariable(Exprs.DistCombinedFields.LB);
1729  Dir->setCombinedUpperBoundVariable(Exprs.DistCombinedFields.UB);
1730  Dir->setCombinedEnsureUpperBound(Exprs.DistCombinedFields.EUB);
1731  Dir->setCombinedInit(Exprs.DistCombinedFields.Init);
1732  Dir->setCombinedCond(Exprs.DistCombinedFields.Cond);
1733  Dir->setCombinedNextLowerBound(Exprs.DistCombinedFields.NLB);
1734  Dir->setCombinedNextUpperBound(Exprs.DistCombinedFields.NUB);
1735  Dir->setCombinedDistCond(Exprs.DistCombinedFields.DistCond);
1736  Dir->setCombinedParForInDistCond(Exprs.DistCombinedFields.ParForInDistCond);
1737  return Dir;
1738 }
1739 
1742  unsigned NumClauses,
1743  unsigned CollapsedNum,
1744  EmptyShell) {
1745  return createEmptyDirective<OMPTeamsDistributeParallelForSimdDirective>(
1746  C, NumClauses, /*HasAssociatedStmt=*/true,
1747  numLoopChildren(CollapsedNum, OMPD_teams_distribute_parallel_for_simd),
1748  CollapsedNum);
1749 }
1750 
1753  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1754  unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1755  const HelperExprs &Exprs, Expr *TaskRedRef, bool HasCancel) {
1756  auto *Dir = createDirective<OMPTeamsDistributeParallelForDirective>(
1757  C, Clauses, AssociatedStmt,
1758  numLoopChildren(CollapsedNum, OMPD_teams_distribute_parallel_for) + 1,
1759  StartLoc, EndLoc, CollapsedNum);
1760  Dir->setIterationVariable(Exprs.IterationVarRef);
1761  Dir->setLastIteration(Exprs.LastIteration);
1762  Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1763  Dir->setPreCond(Exprs.PreCond);
1764  Dir->setCond(Exprs.Cond);
1765  Dir->setInit(Exprs.Init);
1766  Dir->setInc(Exprs.Inc);
1767  Dir->setIsLastIterVariable(Exprs.IL);
1768  Dir->setLowerBoundVariable(Exprs.LB);
1769  Dir->setUpperBoundVariable(Exprs.UB);
1770  Dir->setStrideVariable(Exprs.ST);
1771  Dir->setEnsureUpperBound(Exprs.EUB);
1772  Dir->setNextLowerBound(Exprs.NLB);
1773  Dir->setNextUpperBound(Exprs.NUB);
1774  Dir->setNumIterations(Exprs.NumIterations);
1775  Dir->setPrevLowerBoundVariable(Exprs.PrevLB);
1776  Dir->setPrevUpperBoundVariable(Exprs.PrevUB);
1777  Dir->setDistInc(Exprs.DistInc);
1778  Dir->setPrevEnsureUpperBound(Exprs.PrevEUB);
1779  Dir->setCounters(Exprs.Counters);
1780  Dir->setPrivateCounters(Exprs.PrivateCounters);
1781  Dir->setInits(Exprs.Inits);
1782  Dir->setUpdates(Exprs.Updates);
1783  Dir->setFinals(Exprs.Finals);
1784  Dir->setDependentCounters(Exprs.DependentCounters);
1785  Dir->setDependentInits(Exprs.DependentInits);
1786  Dir->setFinalsConditions(Exprs.FinalsConditions);
1787  Dir->setPreInits(Exprs.PreInits);
1788  Dir->setCombinedLowerBoundVariable(Exprs.DistCombinedFields.LB);
1789  Dir->setCombinedUpperBoundVariable(Exprs.DistCombinedFields.UB);
1790  Dir->setCombinedEnsureUpperBound(Exprs.DistCombinedFields.EUB);
1791  Dir->setCombinedInit(Exprs.DistCombinedFields.Init);
1792  Dir->setCombinedCond(Exprs.DistCombinedFields.Cond);
1793  Dir->setCombinedNextLowerBound(Exprs.DistCombinedFields.NLB);
1794  Dir->setCombinedNextUpperBound(Exprs.DistCombinedFields.NUB);
1795  Dir->setCombinedDistCond(Exprs.DistCombinedFields.DistCond);
1796  Dir->setCombinedParForInDistCond(Exprs.DistCombinedFields.ParForInDistCond);
1797  Dir->setTaskReductionRefExpr(TaskRedRef);
1798  Dir->HasCancel = HasCancel;
1799  return Dir;
1800 }
1801 
1804  unsigned NumClauses,
1805  unsigned CollapsedNum,
1806  EmptyShell) {
1807  return createEmptyDirective<OMPTeamsDistributeParallelForDirective>(
1808  C, NumClauses, /*HasAssociatedStmt=*/true,
1809  numLoopChildren(CollapsedNum, OMPD_teams_distribute_parallel_for) + 1,
1810  CollapsedNum);
1811 }
1812 
1814  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1815  ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt) {
1816  return createDirective<OMPTargetTeamsDirective>(C, Clauses, AssociatedStmt,
1817  /*NumChildren=*/0, StartLoc,
1818  EndLoc);
1819 }
1820 
1822 OMPTargetTeamsDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses,
1823  EmptyShell) {
1824  return createEmptyDirective<OMPTargetTeamsDirective>(
1825  C, NumClauses, /*HasAssociatedStmt=*/true);
1826 }
1827 
1829  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1830  unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1831  const HelperExprs &Exprs) {
1832  auto *Dir = createDirective<OMPTargetTeamsDistributeDirective>(
1833  C, Clauses, AssociatedStmt,
1834  numLoopChildren(CollapsedNum, OMPD_target_teams_distribute), StartLoc,
1835  EndLoc, CollapsedNum);
1836  Dir->setIterationVariable(Exprs.IterationVarRef);
1837  Dir->setLastIteration(Exprs.LastIteration);
1838  Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1839  Dir->setPreCond(Exprs.PreCond);
1840  Dir->setCond(Exprs.Cond);
1841  Dir->setInit(Exprs.Init);
1842  Dir->setInc(Exprs.Inc);
1843  Dir->setIsLastIterVariable(Exprs.IL);
1844  Dir->setLowerBoundVariable(Exprs.LB);
1845  Dir->setUpperBoundVariable(Exprs.UB);
1846  Dir->setStrideVariable(Exprs.ST);
1847  Dir->setEnsureUpperBound(Exprs.EUB);
1848  Dir->setNextLowerBound(Exprs.NLB);
1849  Dir->setNextUpperBound(Exprs.NUB);
1850  Dir->setNumIterations(Exprs.NumIterations);
1851  Dir->setCounters(Exprs.Counters);
1852  Dir->setPrivateCounters(Exprs.PrivateCounters);
1853  Dir->setInits(Exprs.Inits);
1854  Dir->setUpdates(Exprs.Updates);
1855  Dir->setFinals(Exprs.Finals);
1856  Dir->setDependentCounters(Exprs.DependentCounters);
1857  Dir->setDependentInits(Exprs.DependentInits);
1858  Dir->setFinalsConditions(Exprs.FinalsConditions);
1859  Dir->setPreInits(Exprs.PreInits);
1860  return Dir;
1861 }
1862 
1865  unsigned NumClauses,
1866  unsigned CollapsedNum,
1867  EmptyShell) {
1868  return createEmptyDirective<OMPTargetTeamsDistributeDirective>(
1869  C, NumClauses, /*HasAssociatedStmt=*/true,
1870  numLoopChildren(CollapsedNum, OMPD_target_teams_distribute),
1871  CollapsedNum);
1872 }
1873 
1876  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1877  unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1878  const HelperExprs &Exprs, Expr *TaskRedRef, bool HasCancel) {
1879  auto *Dir = createDirective<OMPTargetTeamsDistributeParallelForDirective>(
1880  C, Clauses, AssociatedStmt,
1881  numLoopChildren(CollapsedNum, OMPD_target_teams_distribute_parallel_for) +
1882  1,
1883  StartLoc, EndLoc, CollapsedNum);
1884  Dir->setIterationVariable(Exprs.IterationVarRef);
1885  Dir->setLastIteration(Exprs.LastIteration);
1886  Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1887  Dir->setPreCond(Exprs.PreCond);
1888  Dir->setCond(Exprs.Cond);
1889  Dir->setInit(Exprs.Init);
1890  Dir->setInc(Exprs.Inc);
1891  Dir->setIsLastIterVariable(Exprs.IL);
1892  Dir->setLowerBoundVariable(Exprs.LB);
1893  Dir->setUpperBoundVariable(Exprs.UB);
1894  Dir->setStrideVariable(Exprs.ST);
1895  Dir->setEnsureUpperBound(Exprs.EUB);
1896  Dir->setNextLowerBound(Exprs.NLB);
1897  Dir->setNextUpperBound(Exprs.NUB);
1898  Dir->setNumIterations(Exprs.NumIterations);
1899  Dir->setPrevLowerBoundVariable(Exprs.PrevLB);
1900  Dir->setPrevUpperBoundVariable(Exprs.PrevUB);
1901  Dir->setDistInc(Exprs.DistInc);
1902  Dir->setPrevEnsureUpperBound(Exprs.PrevEUB);
1903  Dir->setCounters(Exprs.Counters);
1904  Dir->setPrivateCounters(Exprs.PrivateCounters);
1905  Dir->setInits(Exprs.Inits);
1906  Dir->setUpdates(Exprs.Updates);
1907  Dir->setFinals(Exprs.Finals);
1908  Dir->setDependentCounters(Exprs.DependentCounters);
1909  Dir->setDependentInits(Exprs.DependentInits);
1910  Dir->setFinalsConditions(Exprs.FinalsConditions);
1911  Dir->setPreInits(Exprs.PreInits);
1912  Dir->setCombinedLowerBoundVariable(Exprs.DistCombinedFields.LB);
1913  Dir->setCombinedUpperBoundVariable(Exprs.DistCombinedFields.UB);
1914  Dir->setCombinedEnsureUpperBound(Exprs.DistCombinedFields.EUB);
1915  Dir->setCombinedInit(Exprs.DistCombinedFields.Init);
1916  Dir->setCombinedCond(Exprs.DistCombinedFields.Cond);
1917  Dir->setCombinedNextLowerBound(Exprs.DistCombinedFields.NLB);
1918  Dir->setCombinedNextUpperBound(Exprs.DistCombinedFields.NUB);
1919  Dir->setCombinedDistCond(Exprs.DistCombinedFields.DistCond);
1920  Dir->setCombinedParForInDistCond(Exprs.DistCombinedFields.ParForInDistCond);
1921  Dir->setTaskReductionRefExpr(TaskRedRef);
1922  Dir->HasCancel = HasCancel;
1923  return Dir;
1924 }
1925 
1928  unsigned NumClauses,
1929  unsigned CollapsedNum,
1930  EmptyShell) {
1931  return createEmptyDirective<OMPTargetTeamsDistributeParallelForDirective>(
1932  C, NumClauses, /*HasAssociatedStmt=*/true,
1933  numLoopChildren(CollapsedNum, OMPD_target_teams_distribute_parallel_for) +
1934  1,
1935  CollapsedNum);
1936 }
1937 
1940  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1941  unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1942  const HelperExprs &Exprs) {
1943  auto *Dir = createDirective<OMPTargetTeamsDistributeParallelForSimdDirective>(
1944  C, Clauses, AssociatedStmt,
1945  numLoopChildren(CollapsedNum,
1946  OMPD_target_teams_distribute_parallel_for_simd),
1947  StartLoc, EndLoc, CollapsedNum);
1948  Dir->setIterationVariable(Exprs.IterationVarRef);
1949  Dir->setLastIteration(Exprs.LastIteration);
1950  Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1951  Dir->setPreCond(Exprs.PreCond);
1952  Dir->setCond(Exprs.Cond);
1953  Dir->setInit(Exprs.Init);
1954  Dir->setInc(Exprs.Inc);
1955  Dir->setIsLastIterVariable(Exprs.IL);
1956  Dir->setLowerBoundVariable(Exprs.LB);
1957  Dir->setUpperBoundVariable(Exprs.UB);
1958  Dir->setStrideVariable(Exprs.ST);
1959  Dir->setEnsureUpperBound(Exprs.EUB);
1960  Dir->setNextLowerBound(Exprs.NLB);
1961  Dir->setNextUpperBound(Exprs.NUB);
1962  Dir->setNumIterations(Exprs.NumIterations);
1963  Dir->setPrevLowerBoundVariable(Exprs.PrevLB);
1964  Dir->setPrevUpperBoundVariable(Exprs.PrevUB);
1965  Dir->setDistInc(Exprs.DistInc);
1966  Dir->setPrevEnsureUpperBound(Exprs.PrevEUB);
1967  Dir->setCounters(Exprs.Counters);
1968  Dir->setPrivateCounters(Exprs.PrivateCounters);
1969  Dir->setInits(Exprs.Inits);
1970  Dir->setUpdates(Exprs.Updates);
1971  Dir->setFinals(Exprs.Finals);
1972  Dir->setDependentCounters(Exprs.DependentCounters);
1973  Dir->setDependentInits(Exprs.DependentInits);
1974  Dir->setFinalsConditions(Exprs.FinalsConditions);
1975  Dir->setPreInits(Exprs.PreInits);
1976  Dir->setCombinedLowerBoundVariable(Exprs.DistCombinedFields.LB);
1977  Dir->setCombinedUpperBoundVariable(Exprs.DistCombinedFields.UB);
1978  Dir->setCombinedEnsureUpperBound(Exprs.DistCombinedFields.EUB);
1979  Dir->setCombinedInit(Exprs.DistCombinedFields.Init);
1980  Dir->setCombinedCond(Exprs.DistCombinedFields.Cond);
1981  Dir->setCombinedNextLowerBound(Exprs.DistCombinedFields.NLB);
1982  Dir->setCombinedNextUpperBound(Exprs.DistCombinedFields.NUB);
1983  Dir->setCombinedDistCond(Exprs.DistCombinedFields.DistCond);
1984  Dir->setCombinedParForInDistCond(Exprs.DistCombinedFields.ParForInDistCond);
1985  return Dir;
1986 }
1987 
1990  const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum,
1991  EmptyShell) {
1992  return createEmptyDirective<OMPTargetTeamsDistributeParallelForSimdDirective>(
1993  C, NumClauses, /*HasAssociatedStmt=*/true,
1994  numLoopChildren(CollapsedNum,
1995  OMPD_target_teams_distribute_parallel_for_simd),
1996  CollapsedNum);
1997 }
1998 
2001  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2002  unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
2003  const HelperExprs &Exprs) {
2004  auto *Dir = createDirective<OMPTargetTeamsDistributeSimdDirective>(
2005  C, Clauses, AssociatedStmt,
2006  numLoopChildren(CollapsedNum, OMPD_target_teams_distribute_simd),
2007  StartLoc, EndLoc, CollapsedNum);
2008  Dir->setIterationVariable(Exprs.IterationVarRef);
2009  Dir->setLastIteration(Exprs.LastIteration);
2010  Dir->setCalcLastIteration(Exprs.CalcLastIteration);
2011  Dir->setPreCond(Exprs.PreCond);
2012  Dir->setCond(Exprs.Cond);
2013  Dir->setInit(Exprs.Init);
2014  Dir->setInc(Exprs.Inc);
2015  Dir->setIsLastIterVariable(Exprs.IL);
2016  Dir->setLowerBoundVariable(Exprs.LB);
2017  Dir->setUpperBoundVariable(Exprs.UB);
2018  Dir->setStrideVariable(Exprs.ST);
2019  Dir->setEnsureUpperBound(Exprs.EUB);
2020  Dir->setNextLowerBound(Exprs.NLB);
2021  Dir->setNextUpperBound(Exprs.NUB);
2022  Dir->setNumIterations(Exprs.NumIterations);
2023  Dir->setCounters(Exprs.Counters);
2024  Dir->setPrivateCounters(Exprs.PrivateCounters);
2025  Dir->setInits(Exprs.Inits);
2026  Dir->setUpdates(Exprs.Updates);
2027  Dir->setFinals(Exprs.Finals);
2028  Dir->setDependentCounters(Exprs.DependentCounters);
2029  Dir->setDependentInits(Exprs.DependentInits);
2030  Dir->setFinalsConditions(Exprs.FinalsConditions);
2031  Dir->setPreInits(Exprs.PreInits);
2032  return Dir;
2033 }
2034 
2037  unsigned NumClauses,
2038  unsigned CollapsedNum,
2039  EmptyShell) {
2040  return createEmptyDirective<OMPTargetTeamsDistributeSimdDirective>(
2041  C, NumClauses, /*HasAssociatedStmt=*/true,
2042  numLoopChildren(CollapsedNum, OMPD_target_teams_distribute_simd),
2043  CollapsedNum);
2044 }
2045 
2048  SourceLocation EndLoc,
2049  ArrayRef<OMPClause *> Clauses) {
2050  return createDirective<OMPInteropDirective>(
2051  C, Clauses, /*AssociatedStmt=*/nullptr, /*NumChildren=*/0, StartLoc,
2052  EndLoc);
2053 }
2054 
2056  unsigned NumClauses,
2057  EmptyShell) {
2058  return createEmptyDirective<OMPInteropDirective>(C, NumClauses);
2059 }
2060 
2062  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2063  ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
2064  SourceLocation TargetCallLoc) {
2065  auto *Dir = createDirective<OMPDispatchDirective>(
2066  C, Clauses, AssociatedStmt, /*NumChildren=*/0, StartLoc, EndLoc);
2067  Dir->setTargetCallLoc(TargetCallLoc);
2068  return Dir;
2069 }
2070 
2072  unsigned NumClauses,
2073  EmptyShell) {
2074  return createEmptyDirective<OMPDispatchDirective>(C, NumClauses,
2075  /*HasAssociatedStmt=*/true,
2076  /*NumChildren=*/0);
2077 }
2078 
2080  SourceLocation StartLoc,
2081  SourceLocation EndLoc,
2082  ArrayRef<OMPClause *> Clauses,
2083  Stmt *AssociatedStmt) {
2084  return createDirective<OMPMaskedDirective>(C, Clauses, AssociatedStmt,
2085  /*NumChildren=*/0, StartLoc,
2086  EndLoc);
2087 }
2088 
2090  unsigned NumClauses,
2091  EmptyShell) {
2092  return createEmptyDirective<OMPMaskedDirective>(C, NumClauses,
2093  /*HasAssociatedStmt=*/true);
2094 }
2095 
2097  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2098  unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
2099  const HelperExprs &Exprs) {
2100  auto *Dir = createDirective<OMPGenericLoopDirective>(
2101  C, Clauses, AssociatedStmt, numLoopChildren(CollapsedNum, OMPD_loop),
2102  StartLoc, EndLoc, CollapsedNum);
2103  Dir->setIterationVariable(Exprs.IterationVarRef);
2104  Dir->setLastIteration(Exprs.LastIteration);
2105  Dir->setCalcLastIteration(Exprs.CalcLastIteration);
2106  Dir->setPreCond(Exprs.PreCond);
2107  Dir->setCond(Exprs.Cond);
2108  Dir->setInit(Exprs.Init);
2109  Dir->setInc(Exprs.Inc);
2110  Dir->setIsLastIterVariable(Exprs.IL);
2111  Dir->setLowerBoundVariable(Exprs.LB);
2112  Dir->setUpperBoundVariable(Exprs.UB);
2113  Dir->setStrideVariable(Exprs.ST);
2114  Dir->setEnsureUpperBound(Exprs.EUB);
2115  Dir->setNextLowerBound(Exprs.NLB);
2116  Dir->setNextUpperBound(Exprs.NUB);
2117  Dir->setNumIterations(Exprs.NumIterations);
2118  Dir->setCounters(Exprs.Counters);
2119  Dir->setPrivateCounters(Exprs.PrivateCounters);
2120  Dir->setInits(Exprs.Inits);
2121  Dir->setUpdates(Exprs.Updates);
2122  Dir->setFinals(Exprs.Finals);
2123  Dir->setDependentCounters(Exprs.DependentCounters);
2124  Dir->setDependentInits(Exprs.DependentInits);
2125  Dir->setFinalsConditions(Exprs.FinalsConditions);
2126  Dir->setPreInits(Exprs.PreInits);
2127  return Dir;
2128 }
2129 
2131 OMPGenericLoopDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses,
2132  unsigned CollapsedNum, EmptyShell) {
2133  return createEmptyDirective<OMPGenericLoopDirective>(
2134  C, NumClauses, /*HasAssociatedStmt=*/true,
2135  numLoopChildren(CollapsedNum, OMPD_loop), CollapsedNum);
2136 }
2137 
2139  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2140  unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
2141  const HelperExprs &Exprs) {
2142  auto *Dir = createDirective<OMPTeamsGenericLoopDirective>(
2143  C, Clauses, AssociatedStmt,
2144  numLoopChildren(CollapsedNum, OMPD_teams_loop), StartLoc, EndLoc,
2145  CollapsedNum);
2146  Dir->setIterationVariable(Exprs.IterationVarRef);
2147  Dir->setLastIteration(Exprs.LastIteration);
2148  Dir->setCalcLastIteration(Exprs.CalcLastIteration);
2149  Dir->setPreCond(Exprs.PreCond);
2150  Dir->setCond(Exprs.Cond);
2151  Dir->setInit(Exprs.Init);
2152  Dir->setInc(Exprs.Inc);
2153  Dir->setIsLastIterVariable(Exprs.IL);
2154  Dir->setLowerBoundVariable(Exprs.LB);
2155  Dir->setUpperBoundVariable(Exprs.UB);
2156  Dir->setStrideVariable(Exprs.ST);
2157  Dir->setEnsureUpperBound(Exprs.EUB);
2158  Dir->setNextLowerBound(Exprs.NLB);
2159  Dir->setNextUpperBound(Exprs.NUB);
2160  Dir->setNumIterations(Exprs.NumIterations);
2161  Dir->setCounters(Exprs.Counters);
2162  Dir->setPrivateCounters(Exprs.PrivateCounters);
2163  Dir->setInits(Exprs.Inits);
2164  Dir->setUpdates(Exprs.Updates);
2165  Dir->setFinals(Exprs.Finals);
2166  Dir->setDependentCounters(Exprs.DependentCounters);
2167  Dir->setDependentInits(Exprs.DependentInits);
2168  Dir->setFinalsConditions(Exprs.FinalsConditions);
2169  Dir->setPreInits(Exprs.PreInits);
2170  return Dir;
2171 }
2172 
2175  unsigned NumClauses,
2176  unsigned CollapsedNum, EmptyShell) {
2177  return createEmptyDirective<OMPTeamsGenericLoopDirective>(
2178  C, NumClauses, /*HasAssociatedStmt=*/true,
2179  numLoopChildren(CollapsedNum, OMPD_teams_loop), CollapsedNum);
2180 }
2181 
2183  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2184  unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
2185  const HelperExprs &Exprs) {
2186  auto *Dir = createDirective<OMPTargetTeamsGenericLoopDirective>(
2187  C, Clauses, AssociatedStmt,
2188  numLoopChildren(CollapsedNum, OMPD_target_teams_loop), StartLoc, EndLoc,
2189  CollapsedNum);
2190  Dir->setIterationVariable(Exprs.IterationVarRef);
2191  Dir->setLastIteration(Exprs.LastIteration);
2192  Dir->setCalcLastIteration(Exprs.CalcLastIteration);
2193  Dir->setPreCond(Exprs.PreCond);
2194  Dir->setCond(Exprs.Cond);
2195  Dir->setInit(Exprs.Init);
2196  Dir->setInc(Exprs.Inc);
2197  Dir->setIsLastIterVariable(Exprs.IL);
2198  Dir->setLowerBoundVariable(Exprs.LB);
2199  Dir->setUpperBoundVariable(Exprs.UB);
2200  Dir->setStrideVariable(Exprs.ST);
2201  Dir->setEnsureUpperBound(Exprs.EUB);
2202  Dir->setNextLowerBound(Exprs.NLB);
2203  Dir->setNextUpperBound(Exprs.NUB);
2204  Dir->setNumIterations(Exprs.NumIterations);
2205  Dir->setCounters(Exprs.Counters);
2206  Dir->setPrivateCounters(Exprs.PrivateCounters);
2207  Dir->setInits(Exprs.Inits);
2208  Dir->setUpdates(Exprs.Updates);
2209  Dir->setFinals(Exprs.Finals);
2210  Dir->setDependentCounters(Exprs.DependentCounters);
2211  Dir->setDependentInits(Exprs.DependentInits);
2212  Dir->setFinalsConditions(Exprs.FinalsConditions);
2213  Dir->setPreInits(Exprs.PreInits);
2214  return Dir;
2215 }
2216 
2219  unsigned NumClauses,
2220  unsigned CollapsedNum,
2221  EmptyShell) {
2222  return createEmptyDirective<OMPTargetTeamsGenericLoopDirective>(
2223  C, NumClauses, /*HasAssociatedStmt=*/true,
2224  numLoopChildren(CollapsedNum, OMPD_target_teams_loop), CollapsedNum);
2225 }
2226 
2228  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2229  unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
2230  const HelperExprs &Exprs) {
2231  auto *Dir = createDirective<OMPParallelGenericLoopDirective>(
2232  C, Clauses, AssociatedStmt,
2233  numLoopChildren(CollapsedNum, OMPD_parallel_loop), StartLoc, EndLoc,
2234  CollapsedNum);
2235  Dir->setIterationVariable(Exprs.IterationVarRef);
2236  Dir->setLastIteration(Exprs.LastIteration);
2237  Dir->setCalcLastIteration(Exprs.CalcLastIteration);
2238  Dir->setPreCond(Exprs.PreCond);
2239  Dir->setCond(Exprs.Cond);
2240  Dir->setInit(Exprs.Init);
2241  Dir->setInc(Exprs.Inc);
2242  Dir->setIsLastIterVariable(Exprs.IL);
2243  Dir->setLowerBoundVariable(Exprs.LB);
2244  Dir->setUpperBoundVariable(Exprs.UB);
2245  Dir->setStrideVariable(Exprs.ST);
2246  Dir->setEnsureUpperBound(Exprs.EUB);
2247  Dir->setNextLowerBound(Exprs.NLB);
2248  Dir->setNextUpperBound(Exprs.NUB);
2249  Dir->setNumIterations(Exprs.NumIterations);
2250  Dir->setCounters(Exprs.Counters);
2251  Dir->setPrivateCounters(Exprs.PrivateCounters);
2252  Dir->setInits(Exprs.Inits);
2253  Dir->setUpdates(Exprs.Updates);
2254  Dir->setFinals(Exprs.Finals);
2255  Dir->setDependentCounters(Exprs.DependentCounters);
2256  Dir->setDependentInits(Exprs.DependentInits);
2257  Dir->setFinalsConditions(Exprs.FinalsConditions);
2258  Dir->setPreInits(Exprs.PreInits);
2259  return Dir;
2260 }
2261 
2263  const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum,
2264  EmptyShell) {
2265  return createEmptyDirective<OMPParallelGenericLoopDirective>(
2266  C, NumClauses, /*HasAssociatedStmt=*/true,
2267  numLoopChildren(CollapsedNum, OMPD_parallel_loop), CollapsedNum);
2268 }
2269 
2272  const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
2273  unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
2274  const HelperExprs &Exprs) {
2275  auto *Dir = createDirective<OMPTargetParallelGenericLoopDirective>(
2276  C, Clauses, AssociatedStmt,
2277  numLoopChildren(CollapsedNum, OMPD_target_parallel_loop), StartLoc,
2278  EndLoc, CollapsedNum);
2279  Dir->setIterationVariable(Exprs.IterationVarRef);
2280  Dir->setLastIteration(Exprs.LastIteration);
2281  Dir->setCalcLastIteration(Exprs.CalcLastIteration);
2282  Dir->setPreCond(Exprs.PreCond);
2283  Dir->setCond(Exprs.Cond);
2284  Dir->setInit(Exprs.Init);
2285  Dir->setInc(Exprs.Inc);
2286  Dir->setIsLastIterVariable(Exprs.IL);
2287  Dir->setLowerBoundVariable(Exprs.LB);
2288  Dir->setUpperBoundVariable(Exprs.UB);
2289  Dir->setStrideVariable(Exprs.ST);
2290  Dir->setEnsureUpperBound(Exprs.EUB);
2291  Dir->setNextLowerBound(Exprs.NLB);
2292  Dir->setNextUpperBound(Exprs.NUB);
2293  Dir->setNumIterations(Exprs.NumIterations);
2294  Dir->setCounters(Exprs.Counters);
2295  Dir->setPrivateCounters(Exprs.PrivateCounters);
2296  Dir->setInits(Exprs.Inits);
2297  Dir->setUpdates(Exprs.Updates);
2298  Dir->setFinals(Exprs.Finals);
2299  Dir->setDependentCounters(Exprs.DependentCounters);
2300  Dir->setDependentInits(Exprs.DependentInits);
2301  Dir->setFinalsConditions(Exprs.FinalsConditions);
2302  Dir->setPreInits(Exprs.PreInits);
2303  return Dir;
2304 }
2305 
2308  unsigned NumClauses,
2309  unsigned CollapsedNum,
2310  EmptyShell) {
2311  return createEmptyDirective<OMPTargetParallelGenericLoopDirective>(
2312  C, NumClauses, /*HasAssociatedStmt=*/true,
2313  numLoopChildren(CollapsedNum, OMPD_target_parallel_loop), CollapsedNum);
2314 }
clang::OMPTeamsDirective::CreateEmpty
static OMPTeamsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:1022
clang::OMPLoopBasedDirective::HelperExprs::IterationVarRef
Expr * IterationVarRef
Loop iteration variable.
Definition: StmtOpenMP.h:742
clang::OMPForDirective
This represents '#pragma omp for' directive.
Definition: StmtOpenMP.h:1628
clang::OMPLoopDirective::setFinals
void setFinals(ArrayRef< Expr * > A)
Definition: StmtOpenMP.cpp:237
clang::OMPLoopBasedDirective::DistCombinedHelperExprs::Cond
Expr * Cond
Distribute Loop condition used when composing 'omp distribute' with 'omp for' in a same construct.
Definition: StmtOpenMP.h:722
clang::OMPMasterTaskLoopSimdDirective
This represents '#pragma omp master taskloop simd' directive.
Definition: StmtOpenMP.h:3786
clang::OMPLoopBasedDirective::HelperExprs::PrevEUB
Expr * PrevEUB
PrevEUB - expression similar to EUB but to be used when loop scheduling uses PrevLB and PrevUB (e....
Definition: StmtOpenMP.h:786
clang::OMPParallelDirective::CreateEmpty
static OMPParallelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for N clauses.
Definition: StmtOpenMP.cpp:292
clang::OMPTaskyieldDirective
This represents '#pragma omp taskyield' directive.
Definition: StmtOpenMP.h:2459
clang::OMPChildren::getChildren
MutableArrayRef< Stmt * > getChildren()
Definition: StmtOpenMP.cpp:33
clang::OMPParallelMasterDirective::CreateEmpty
static OMPParallelMasterDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:679
clang::OMPCriticalDirective::Create
static OMPCriticalDirective * Create(const ASTContext &C, const DeclarationNameInfo &Name, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive.
Definition: StmtOpenMP.cpp:564
clang::OMPTargetSimdDirective::Create
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.
Definition: StmtOpenMP.cpp:1569
clang::OMPAtomicDirective::Expressions::E
Expr * E
'expr' part of the associated expression/statement.
Definition: StmtOpenMP.h:2901
clang::OMPTeamsGenericLoopDirective::CreateEmpty
static OMPTeamsGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:2174
clang::OMPCancellationPointDirective::Create
static OMPCancellationPointDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, OpenMPDirectiveKind CancelRegion)
Creates directive.
Definition: StmtOpenMP.cpp:773
clang::OMPAtomicDirective::Expressions::Cond
Expr * Cond
Conditional expression in atomic compare construct.
Definition: StmtOpenMP.h:2909
clang::OMPTargetExitDataDirective::CreateEmpty
static OMPTargetExitDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
Definition: StmtOpenMP.cpp:1007
clang::OMPDispatchDirective::Create
static OMPDispatchDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, SourceLocation TargetCallLoc)
Creates directive with a list of Clauses.
Definition: StmtOpenMP.cpp:2061
clang::OMPTeamsGenericLoopDirective::Create
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.
Definition: StmtOpenMP.cpp:2138
clang::OMPTeamsDirective::Create
static OMPTeamsDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
Definition: StmtOpenMP.cpp:1013
clang::OMPTileDirective
This represents the '#pragma omp tile' loop transformation directive.
Definition: StmtOpenMP.h:5118
clang::OMPLoopBasedDirective::HelperExprs::LB
Expr * LB
LowerBound - local variable passed to runtime.
Definition: StmtOpenMP.h:760
clang::OMPMaskedDirective
This represents '#pragma omp masked' directive.
Definition: StmtOpenMP.h:5445
clang::OMPLoopBasedDirective::DistCombinedHelperExprs::Init
Expr * Init
Distribute loop iteration variable init used when composing 'omp distribute' with 'omp for' in a same...
Definition: StmtOpenMP.h:719
clang::OMPLoopBasedDirective::DistCombinedHelperExprs::ParForInDistCond
Expr * ParForInDistCond
'omp parallel for' loop condition used when composed with 'omp distribute' in the same construct and ...
Definition: StmtOpenMP.h:735
clang::OMPLoopBasedDirective::HelperExprs::Counters
SmallVector< Expr *, 4 > Counters
Counters Loop counters.
Definition: StmtOpenMP.h:788
clang::OMPLoopBasedDirective::HelperExprs::DistInc
Expr * DistInc
DistInc - increment expression for distribute loop when found combined with a further loop level (e....
Definition: StmtOpenMP.h:780
clang::OMPCancelDirective::CreateEmpty
static OMPCancelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:797
clang::OMPParallelMasterTaskLoopDirective
This represents '#pragma omp parallel master taskloop' directive.
Definition: StmtOpenMP.h:3852
clang::OMPTargetParallelGenericLoopDirective
This represents '#pragma omp target parallel loop' directive.
Definition: StmtOpenMP.h:5793
clang::OMPDistributeParallelForSimdDirective::CreateEmpty
static OMPDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:1468
clang::OMPLoopBasedDirective::DistCombinedHelperExprs::UB
Expr * UB
DistributeUpperBound - used when composing 'omp distribute' with 'omp for' in a same construct.
Definition: StmtOpenMP.h:712
clang::OMPLoopTransformationDirective::getTransformedStmt
Stmt * getTransformedStmt() const
Get the de-sugared statements after after the loop transformation.
Definition: StmtOpenMP.cpp:372
clang::OMPTargetTeamsDistributeDirective
This represents '#pragma omp target teams distribute' combined directive.
Definition: StmtOpenMP.h:4825
clang::OMPTargetParallelForDirective::Create
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.
Definition: StmtOpenMP.cpp:924
clang::OMPDepobjDirective::CreateEmpty
static OMPDepobjDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:827
clang::OMPTargetTeamsDistributeSimdDirective
This represents '#pragma omp target teams distribute simd' combined directive.
Definition: StmtOpenMP.h:5060
llvm::SmallVector
Definition: LLVM.h:38
clang::OMPLoopBasedDirective::HelperExprs::IL
Expr * IL
IsLastIteration - local flag variable passed to runtime.
Definition: StmtOpenMP.h:758
clang::SourceLocation
Encodes a location in the source.
Definition: SourceLocation.h:86
clang::OMPTileDirective::CreateEmpty
static OMPTileDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned NumLoops)
Build an empty '#pragma omp tile' AST node for deserialization.
Definition: StmtOpenMP.cpp:420
clang::OMPLoopDirective::setFinalsConditions
void setFinalsConditions(ArrayRef< Expr * > A)
Definition: StmtOpenMP.cpp:256
clang::OMPTargetParallelDirective::CreateEmpty
static OMPTargetParallelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:918
clang::OMPDepobjDirective::Create
static OMPDepobjDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses)
Creates directive with a list of Clauses.
Definition: StmtOpenMP.cpp:818
clang::OMPMasterDirective
This represents '#pragma omp master' directive.
Definition: StmtOpenMP.h:1971
clang::OMPMasterTaskLoopDirective::CreateEmpty
static OMPMasterTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:1153
clang::OMPLoopBasedDirective::tryToFindNextInnerLoop
static Stmt * tryToFindNextInnerLoop(Stmt *CurStmt, bool TryImperfectlyNestedLoops)
Try to find the next loop sub-statement in the specified statement CurStmt.
Definition: StmtOpenMP.cpp:78
clang::OMPTaskwaitDirective
This represents '#pragma omp taskwait' directive.
Definition: StmtOpenMP.h:2551
clang::OMPFlushDirective::Create
static OMPFlushDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses)
Creates directive with a list of Clauses.
Definition: StmtOpenMP.cpp:803
clang::OMPParallelDirective::Create
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
clang::OMPSectionDirective
This represents '#pragma omp section' directive.
Definition: StmtOpenMP.h:1858
clang::OMPAtomicDirective::Expressions::UE
Expr * UE
UE Helper expression of the form: 'OpaqueValueExpr(x) binop OpaqueValueExpr(expr)' or 'OpaqueValueExp...
Definition: StmtOpenMP.h:2905
clang::OMPTargetDirective::Create
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:890
clang::OMPLoopBasedDirective::HelperExprs::Inits
SmallVector< Expr *, 4 > Inits
Expressions for loop counters inits for CodeGen.
Definition: StmtOpenMP.h:792
clang::OMPTeamsDistributeSimdDirective
This represents '#pragma omp teams distribute simd' combined directive.
Definition: StmtOpenMP.h:4542
clang::OMPCancellationPointDirective::CreateEmpty
static OMPCancellationPointDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:782
clang::IfStmt
IfStmt - This represents an if/then/else.
Definition: Stmt.h:1909
clang::OMPDistributeDirective::Create
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.
Definition: StmtOpenMP.cpp:1299
clang::OMPInteropDirective::Create
static OMPInteropDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses)
Creates directive.
Definition: StmtOpenMP.cpp:2047
clang::OMPLoopBasedDirective::HelperExprs::DependentCounters
SmallVector< Expr *, 4 > DependentCounters
List of counters required for the generation of the non-rectangular loops.
Definition: StmtOpenMP.h:799
clang::OMPLoopBasedDirective::HelperExprs::FinalsConditions
SmallVector< Expr *, 4 > FinalsConditions
List of final conditions required for the generation of the non-rectangular loops.
Definition: StmtOpenMP.h:805
clang::OMPTaskgroupDirective::CreateEmpty
static OMPTaskgroupDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:766
clang::OMPLoopTransformationDirective
The base class for all loop transformation directives.
Definition: StmtOpenMP.h:959
clang::OMPDistributeDirective::CreateEmpty
static OMPDistributeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:1335
clang::OMPTaskLoopDirective::Create
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.
Definition: StmtOpenMP.cpp:1029
clang::OMPAtomicDirective::Expressions::IsXLHSInRHSPart
bool IsXLHSInRHSPart
True if UE has the first form and false if the second.
Definition: StmtOpenMP.h:2911
clang::OMPSingleDirective::CreateEmpty
static OMPSingleDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:542
clang::OMPSectionDirective::CreateEmpty
static OMPSectionDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:526
clang::OMPTargetParallelGenericLoopDirective::CreateEmpty
static OMPTargetParallelGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:2307
clang::OMPMasterTaskLoopSimdDirective::Create
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.
Definition: StmtOpenMP.cpp:1161
clang::OMPLoopBasedDirective::HelperExprs::PreCond
Expr * PreCond
Loop pre-condition.
Definition: StmtOpenMP.h:750
clang::Stmt::EmptyShell
A placeholder type used to construct an empty shell of a type, that will be filled in later (e....
Definition: Stmt.h:1103
clang::OMPTargetTeamsDistributeParallelForDirective
This represents '#pragma omp target teams distribute parallel for' combined directive.
Definition: StmtOpenMP.h:4891
clang::OMPDistributeParallelForDirective::Create
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.
Definition: StmtOpenMP.cpp:1357
clang::OMPTaskgroupDirective
This represents '#pragma omp taskgroup' directive.
Definition: StmtOpenMP.h:2602
clang::OMPTargetTeamsDistributeParallelForSimdDirective::Create
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.
Definition: StmtOpenMP.cpp:1939
clang::OMPTaskwaitDirective::Create
static OMPTaskwaitDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses)
Creates directive.
Definition: StmtOpenMP.cpp:743
clang::OMPTargetTeamsDistributeSimdDirective::Create
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.
Definition: StmtOpenMP.cpp:2000
clang::OMPTaskLoopDirective::CreateEmpty
static OMPTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:1064
clang::OMPTargetExitDataDirective
This represents '#pragma omp target exit data' directive.
Definition: StmtOpenMP.h:3171
clang::OMPForSimdDirective
This represents '#pragma omp for simd' directive.
Definition: StmtOpenMP.h:1718
clang::OMPParallelGenericLoopDirective
This represents '#pragma omp parallel loop' directive.
Definition: StmtOpenMP.h:5728
llvm::MutableArrayRef
Definition: LLVM.h:35
clang::OMPLoopBasedDirective::HelperExprs::NLB
Expr * NLB
Update of LowerBound for statically scheduled 'omp for' loops.
Definition: StmtOpenMP.h:768
clang::OMPTargetTeamsDistributeParallelForDirective::CreateEmpty
static OMPTargetTeamsDistributeParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:1927
clang::OMPLoopBasedDirective::HelperExprs::PrivateCounters
SmallVector< Expr *, 4 > PrivateCounters
PrivateCounters Loop counters.
Definition: StmtOpenMP.h:790
clang::OMPTargetDataDirective::Create
static OMPTargetDataDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
Definition: StmtOpenMP.cpp:971
clang::OMPParallelMasterDirective
This represents '#pragma omp parallel master' directive.
Definition: StmtOpenMP.h:2252
clang::OMPParallelSectionsDirective::Create
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:685
clang::OMPMasterTaskLoopDirective::Create
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.
Definition: StmtOpenMP.cpp:1116
clang::OMPSimdDirective::Create
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
clang::OMPChildren
Contains data for OpenMP directives: clauses, children expressions/statements (helpers for codegen) a...
Definition: OpenMPClause.h:8880
StmtOpenMP.h
clang::OMPLoopDirective::setUpdates
void setUpdates(ArrayRef< Expr * > A)
Definition: StmtOpenMP.cpp:231
clang::OMPTargetUpdateDirective::CreateEmpty
static OMPTargetUpdateDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:1351
clang::OMPLoopBasedDirective::DistCombinedHelperExprs::EUB
Expr * EUB
DistributeEnsureUpperBound - used when composing 'omp distribute' with 'omp for' in a same construct,...
Definition: StmtOpenMP.h:715
clang::OMPForDirective::CreateEmpty
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
clang::OMPOrderedDirective::Create
static OMPOrderedDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive.
Definition: StmtOpenMP.cpp:848
clang::OMPDistributeSimdDirective::CreateEmpty
static OMPDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:1514
clang::OMPTeamsDirective
This represents '#pragma omp teams' directive.
Definition: StmtOpenMP.h:3400
clang::OMPLoopBasedDirective::HelperExprs::LastIteration
Expr * LastIteration
Loop last iteration number.
Definition: StmtOpenMP.h:744
clang::OMPForDirective::Create
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
clang::OMPParallelForDirective::CreateEmpty
static OMPParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:618
clang::OMPScanDirective
This represents '#pragma omp scan' directive.
Definition: StmtOpenMP.h:5274
clang::OMPMaskedDirective::CreateEmpty
static OMPMaskedDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:2089
clang::ASTContext
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition: ASTContext.h:208
clang::OMPDistributeParallelForSimdDirective::Create
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.
Definition: StmtOpenMP.cpp:1419
clang::OMPMetaDirective
This represents '#pragma omp metadirective' directive.
Definition: StmtOpenMP.h:5496
clang::OMPCancelDirective::Create
static OMPCancelDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, OpenMPDirectiveKind CancelRegion)
Creates directive.
Definition: StmtOpenMP.cpp:787
clang::OMPCriticalDirective::CreateEmpty
static OMPCriticalDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:573
clang::OMPExecutableDirective::isStandaloneDirective
bool isStandaloneDirective() const
Returns whether or not this is a Standalone directive.
Definition: StmtOpenMP.cpp:58
clang::OMPTaskLoopSimdDirective::Create
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.
Definition: StmtOpenMP.cpp:1073
clang::OMPDistributeParallelForSimdDirective
This represents '#pragma omp distribute parallel for simd' composite directive.
Definition: StmtOpenMP.h:4213
clang::OMPParallelMasterTaskLoopDirective::Create
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.
Definition: StmtOpenMP.cpp:1205
clang::OMPLoopBasedDirective::HelperExprs::CalcLastIteration
Expr * CalcLastIteration
Calculation of last iteration.
Definition: StmtOpenMP.h:748
clang::OMPDepobjDirective
This represents '#pragma omp depobj' directive.
Definition: StmtOpenMP.h:2721
clang::OMPParallelForSimdDirective::Create
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:625
clang::OMPTargetTeamsDirective::CreateEmpty
static OMPTargetTeamsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:1822
clang::OMPMetaDirective::Create
static OMPMetaDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, Stmt *IfStmt)
Definition: StmtOpenMP.cpp:262
clang::OMPAtomicDirective::CreateEmpty
static OMPAtomicDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:883
clang::OMPSectionDirective::Create
static OMPSectionDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AssociatedStmt, bool HasCancel)
Creates directive.
Definition: StmtOpenMP.cpp:514
clang::OMPParallelDirective
This represents '#pragma omp parallel' directive.
Definition: StmtOpenMP.h:611
ASTContext.h
clang::OMPParallelForSimdDirective
This represents '#pragma omp parallel for simd' directive.
Definition: StmtOpenMP.h:2187
clang::OMPTaskDirective
This represents '#pragma omp task' directive.
Definition: StmtOpenMP.h:2397
clang::OMPTargetParallelDirective
This represents '#pragma omp target parallel' directive.
Definition: StmtOpenMP.h:3225
clang::OMPLoopBasedDirective::HelperExprs::PreInits
Stmt * PreInits
Init statement for all captured expressions.
Definition: StmtOpenMP.h:807
clang::OMPParallelForDirective
This represents '#pragma omp parallel for' directive.
Definition: StmtOpenMP.h:2090
clang::OMPSingleDirective::Create
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:532
clang::OMPParallelSectionsDirective::CreateEmpty
static OMPParallelSectionsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:697
clang::OMPTargetExitDataDirective::Create
static OMPTargetExitDataDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
Definition: StmtOpenMP.cpp:999
clang::OMPMasterDirective::CreateEmpty
static OMPMasterDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:558
clang::OMPChildren::setClauses
void setClauses(ArrayRef< OMPClause * > Clauses)
Sets the list of variables for this clause.
Definition: StmtOpenMP.cpp:27
clang::OMPLoopBasedDirective::HelperExprs::Inc
Expr * Inc
Loop increment.
Definition: StmtOpenMP.h:756
clang::OMPCriticalDirective
This represents '#pragma omp critical' directive.
Definition: StmtOpenMP.h:2019
clang::OMPLoopDirective::setInits
void setInits(ArrayRef< Expr * > A)
Definition: StmtOpenMP.cpp:225
clang::OMPTargetTeamsGenericLoopDirective
This represents '#pragma omp target teams loop' directive.
Definition: StmtOpenMP.h:5662
clang::OMPTargetParallelForSimdDirective
This represents '#pragma omp target parallel for simd' directive.
Definition: StmtOpenMP.h:4344
clang::OMPLoopBasedDirective::HelperExprs::DependentInits
SmallVector< Expr *, 4 > DependentInits
List of initializers required for the generation of the non-rectangular loops.
Definition: StmtOpenMP.h:802
clang::OMPMasterTaskLoopDirective
This represents '#pragma omp master taskloop' directive.
Definition: StmtOpenMP.h:3710
clang::OMPTeamsDistributeDirective
This represents '#pragma omp teams distribute' directive.
Definition: StmtOpenMP.h:4476
clang::OMPTargetParallelForDirective::CreateEmpty
static OMPTargetParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:962
clang::OMPParallelMasterTaskLoopSimdDirective::Create
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.
Definition: StmtOpenMP.cpp:1253
clang::OMPParallelMasterDirective::Create
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:669
clang::OMPLoopDirective::setPrivateCounters
void setPrivateCounters(ArrayRef< Expr * > A)
Definition: StmtOpenMP.cpp:218
clang::OMPTaskyieldDirective::CreateEmpty
static OMPTaskyieldDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:726
clang::OMPAtomicDirective::Expressions::X
Expr * X
'x' part of the associated expression/statement.
Definition: StmtOpenMP.h:2897
clang::OMPLoopBasedDirective::DistCombinedHelperExprs::DistCond
Expr * DistCond
Distribute Loop condition used when composing 'omp distribute' with 'omp for' in a same construct whe...
Definition: StmtOpenMP.h:731
clang::OMPMetaDirective::CreateEmpty
static OMPMetaDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Definition: StmtOpenMP.cpp:273
clang::OMPLoopBasedDirective::HelperExprs::EUB
Expr * EUB
EnsureUpperBound – expression UB = min(UB, NumIterations).
Definition: StmtOpenMP.h:766
clang::OMPTargetTeamsDistributeDirective::CreateEmpty
static OMPTargetTeamsDistributeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:1864
clang::OMPUnrollDirective::Create
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
clang::OMPScanDirective::CreateEmpty
static OMPScanDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:842
clang::OMPTargetSimdDirective::CreateEmpty
static OMPTargetSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:1597
clang::OMPExecutableDirective::getStructuredBlock
const Stmt * getStructuredBlock() const
Returns the AST node representing OpenMP structured-block of this OpenMP executable directive,...
Definition: StmtOpenMP.h:587
clang::OMPCancelDirective
This represents '#pragma omp cancel' directive.
Definition: StmtOpenMP.h:3511
clang::OMPMasterDirective::Create
static OMPMasterDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AssociatedStmt)
Creates directive.
Definition: StmtOpenMP.cpp:549
clang::OMPTeamsDistributeParallelForSimdDirective::CreateEmpty
static OMPTeamsDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:1741
clang::OMPForSimdDirective::Create
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:451
clang::OMPSectionsDirective
This represents '#pragma omp sections' directive.
Definition: StmtOpenMP.h:1781
clang::OMPLoopBasedDirective::doForAllLoopsBodies
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
clang::OMPLoopBasedDirective::HelperExprs::PrevUB
Expr * PrevUB
PreviousUpperBound - local variable passed to runtime in the enclosing schedule or null if that does ...
Definition: StmtOpenMP.h:776
clang::OMPTargetTeamsDistributeParallelForSimdDirective
This represents '#pragma omp target teams distribute parallel for simd' combined directive.
Definition: StmtOpenMP.h:4989
clang::OMPTaskyieldDirective::Create
static OMPTaskyieldDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc)
Creates directive.
Definition: StmtOpenMP.cpp:720
clang::OMPFlushDirective
This represents '#pragma omp flush' directive.
Definition: StmtOpenMP.h:2669
clang::OMPTargetEnterDataDirective
This represents '#pragma omp target enter data' directive.
Definition: StmtOpenMP.h:3116
clang::OMPInteropDirective
This represents '#pragma omp interop' directive.
Definition: StmtOpenMP.h:5327
clang::OMPTargetDataDirective::CreateEmpty
static OMPTargetDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
Definition: StmtOpenMP.cpp:978
clang::OMPDistributeDirective
This represents '#pragma omp distribute' directive.
Definition: StmtOpenMP.h:3995
clang::OMPTeamsGenericLoopDirective
This represents '#pragma omp teams loop' directive.
Definition: StmtOpenMP.h:5597
clang::Stmt::IgnoreContainers
Stmt * IgnoreContainers(bool IgnoreCaptured=false)
Skip no-op (attributed, compound) container stmts and skip captured stmt at the top,...
Definition: Stmt.cpp:195
clang::OMPDispatchDirective::CreateEmpty
static OMPDispatchDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:2071
clang::OMPSingleDirective
This represents '#pragma omp single' directive.
Definition: StmtOpenMP.h:1920
clang::OMPTaskwaitDirective::CreateEmpty
static OMPTaskwaitDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:751
clang::OMPSectionsDirective::Create
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:494
clang::OMPTargetUpdateDirective::Create
static OMPTargetUpdateDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
Definition: StmtOpenMP.cpp:1342
clang::OMPLoopBasedDirective::HelperExprs
The expressions built for the OpenMP loop CodeGen for the whole collapsed loop nest.
Definition: StmtOpenMP.h:740
clang::OMPParallelForSimdDirective::CreateEmpty
static OMPParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:661
clang::OMPForSimdDirective::CreateEmpty
static OMPForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:485
clang::OMPBarrierDirective::CreateEmpty
static OMPBarrierDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:737
clang::OMPParallelMasterTaskLoopSimdDirective::CreateEmpty
static OMPParallelMasterTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:1289
llvm::ArrayRef
Definition: LLVM.h:34
clang::OMPTaskLoopDirective
This represents '#pragma omp taskloop' directive.
Definition: StmtOpenMP.h:3571
clang::OMPTeamsDistributeParallelForSimdDirective::Create
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.
Definition: StmtOpenMP.cpp:1692
clang::OMPLoopBasedDirective::HelperExprs::Finals
SmallVector< Expr *, 4 > Finals
Final loop counter values for GodeGen.
Definition: StmtOpenMP.h:796
clang::OMPTaskgroupDirective::Create
static OMPTaskgroupDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, Expr *ReductionRef)
Creates directive.
Definition: StmtOpenMP.cpp:757
clang::OMPLoopBasedDirective::HelperExprs::Updates
SmallVector< Expr *, 4 > Updates
Expressions for loop counters update for CodeGen.
Definition: StmtOpenMP.h:794
clang::OMPTargetTeamsDistributeSimdDirective::CreateEmpty
static OMPTargetTeamsDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:2036
clang::OMPCancellationPointDirective
This represents '#pragma omp cancellation point' directive.
Definition: StmtOpenMP.h:3453
clang::OMPDispatchDirective
This represents '#pragma omp dispatch' directive.
Definition: StmtOpenMP.h:5380
clang::OMPTargetTeamsDirective::Create
static OMPTargetTeamsDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
Definition: StmtOpenMP.cpp:1813
clang::OMPSectionsDirective::CreateEmpty
static OMPSectionsDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:506
clang::OMPTeamsDistributeDirective::CreateEmpty
static OMPTeamsDistributeDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:1640
clang::OMPTaskLoopSimdDirective::CreateEmpty
static OMPTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:1109
clang::OMPParallelGenericLoopDirective::CreateEmpty
static OMPParallelGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:2262
clang::OMPParallelGenericLoopDirective::Create
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.
Definition: StmtOpenMP.cpp:2227
clang::OMPLoopBasedDirective::DistCombinedHelperExprs::NLB
Expr * NLB
Update of LowerBound for statically scheduled omp loops for outer loop in combined constructs (e....
Definition: StmtOpenMP.h:725
clang::OMPInteropDirective::CreateEmpty
static OMPInteropDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:2055
clang::OMPTargetDirective::CreateEmpty
static OMPTargetDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:899
clang::OMPMaskedDirective::Create
static OMPMaskedDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive.
Definition: StmtOpenMP.cpp:2079
clang::OMPParallelMasterTaskLoopDirective::CreateEmpty
static OMPParallelMasterTaskLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:1242
clang::OMPLoopBasedDirective::HelperExprs::NumIterations
Expr * NumIterations
Loop number of iterations.
Definition: StmtOpenMP.h:746
clang::OMPTeamsDistributeSimdDirective::CreateEmpty
static OMPTeamsDistributeSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:1683
clang::OMPUnrollDirective::CreateEmpty
static OMPUnrollDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses)
Build an empty '#pragma omp unroll' AST node for deserialization.
Definition: StmtOpenMP.cpp:443
clang::OMPLoopDirective::setCounters
void setCounters(ArrayRef< Expr * > A)
Definition: StmtOpenMP.cpp:212
clang::OMPSimdDirective::CreateEmpty
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
clang::OMPTeamsDistributeParallelForDirective
This represents '#pragma omp teams distribute parallel for' composite directive.
Definition: StmtOpenMP.h:4676
clang::OMPLoopBasedDirective::DistCombinedHelperExprs::LB
Expr * LB
DistributeLowerBound - used when composing 'omp distribute' with 'omp for' in a same construct.
Definition: StmtOpenMP.h:709
clang::OMPOrderedDirective::CreateEmpty
static OMPOrderedDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, bool IsStandalone, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:858
clang::OMPTeamsDistributeParallelForDirective::Create
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.
Definition: StmtOpenMP.cpp:1752
clang::OMPAtomicDirective::Create
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:867
clang::OMPSimdDirective
This represents '#pragma omp simd' directive.
Definition: StmtOpenMP.h:1565
clang::OMPAtomicDirective::Expressions::D
Expr * D
'd' part of the associated expression/statement.
Definition: StmtOpenMP.h:2907
clang::OMPTargetParallelGenericLoopDirective::Create
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.
Definition: StmtOpenMP.cpp:2271
clang::OMPTeamsDistributeSimdDirective::Create
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.
Definition: StmtOpenMP.cpp:1648
clang
Definition: CalledOnceCheck.h:17
clang::OMPLoopBasedDirective::HelperExprs::PrevLB
Expr * PrevLB
PreviousLowerBound - local variable passed to runtime in the enclosing schedule or null if that does ...
Definition: StmtOpenMP.h:773
clang::OMPAtomicDirective::Expressions::IsPostfixUpdate
bool IsPostfixUpdate
True if original value of 'x' must be stored in 'v', not an updated one.
Definition: StmtOpenMP.h:2913
clang::OMPTargetTeamsDirective
This represents '#pragma omp target teams' directive.
Definition: StmtOpenMP.h:4769
clang::OMPLoopBasedDirective::HelperExprs::Init
Expr * Init
Loop iteration variable init.
Definition: StmtOpenMP.h:754
clang::OMPTargetTeamsGenericLoopDirective::CreateEmpty
static OMPTargetTeamsGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:2218
clang::OMPTargetTeamsDistributeDirective::Create
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.
Definition: StmtOpenMP.cpp:1828
clang::Stmt
Stmt - This represents one statement.
Definition: Stmt.h:69
clang::OMPDistributeParallelForDirective
This represents '#pragma omp distribute parallel for' composite directive.
Definition: StmtOpenMP.h:4117
clang::OMPGenericLoopDirective::CreateEmpty
static OMPGenericLoopDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with a place for NumClauses clauses.
Definition: StmtOpenMP.cpp:2131
clang::OMPBarrierDirective::Create
static OMPBarrierDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc)
Creates directive.
Definition: StmtOpenMP.cpp:731
clang::OMPTargetTeamsDistributeParallelForDirective::Create
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.
Definition: StmtOpenMP.cpp:1875
clang::OMPTargetParallelDirective::Create
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.
Definition: StmtOpenMP.cpp:906
clang::OMPMasterTaskLoopSimdDirective::CreateEmpty
static OMPMasterTaskLoopSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:1197
clang::OMPTeamsDistributeDirective::Create
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.
Definition: StmtOpenMP.cpp:1604
clang::OMPUnrollDirective
This represents the '#pragma omp unroll' loop transformation directive.
Definition: StmtOpenMP.h:5200
clang::OMPLoopTransformationDirective::getPreInits
Stmt * getPreInits() const
Return preinits statement.
Definition: StmtOpenMP.cpp:385
clang::OMPDistributeSimdDirective::Create
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.
Definition: StmtOpenMP.cpp:1478
clang::OMPTaskDirective::Create
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:704
clang::OMPLoopDirective::setDependentInits
void setDependentInits(ArrayRef< Expr * > A)
Definition: StmtOpenMP.cpp:250
clang::OMPTargetDirective
This represents '#pragma omp target' directive.
Definition: StmtOpenMP.h:3008
clang::OMPTargetParallelForSimdDirective::CreateEmpty
static OMPTargetParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:1558
clang::OMPGenericLoopDirective
This represents '#pragma omp loop' directive.
Definition: StmtOpenMP.h:5535
clang::OMPTargetUpdateDirective
This represents '#pragma omp target update' directive.
Definition: StmtOpenMP.h:4061
clang::OMPAtomicDirective::Expressions::V
Expr * V
'v' part of the associated expression/statement.
Definition: StmtOpenMP.h:2899
clang::OMPLoopBasedDirective::HelperExprs::NUB
Expr * NUB
Update of UpperBound for statically scheduled 'omp for' loops.
Definition: StmtOpenMP.h:770
clang::OMPGenericLoopDirective::Create
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.
Definition: StmtOpenMP.cpp:2096
clang::OMPOrderedDirective
This represents '#pragma omp ordered' directive.
Definition: StmtOpenMP.h:2773
clang::OMPLoopBasedDirective::HelperExprs::ST
Expr * ST
Stride - local variable passed to runtime.
Definition: StmtOpenMP.h:764
clang::OMPTargetParallelForSimdDirective::Create
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.
Definition: StmtOpenMP.cpp:1522
clang::OpenMPDirectiveKind
llvm::omp::Directive OpenMPDirectiveKind
OpenMP directives.
Definition: OpenMPKinds.h:24
clang::OMPDistributeSimdDirective
This represents '#pragma omp distribute simd' composite directive.
Definition: StmtOpenMP.h:4278
clang::OMPTargetEnterDataDirective::CreateEmpty
static OMPTargetEnterDataDirective * CreateEmpty(const ASTContext &C, unsigned N, EmptyShell)
Creates an empty directive with the place for N clauses.
Definition: StmtOpenMP.cpp:993
clang::OMPParallelMasterTaskLoopSimdDirective
This represents '#pragma omp parallel master taskloop simd' directive.
Definition: StmtOpenMP.h:3930
clang::OMPScanDirective::Create
static OMPScanDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses)
Creates directive with a list of Clauses.
Definition: StmtOpenMP.cpp:833
clang::OMPLoopBasedDirective::HelperExprs::UB
Expr * UB
UpperBound - local variable passed to runtime.
Definition: StmtOpenMP.h:762
clang::Expr
This represents one expression.
Definition: Expr.h:109
clang::OMPDistributeParallelForDirective::CreateEmpty
static OMPDistributeParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:1408
clang::OMPTargetDataDirective
This represents '#pragma omp target data' directive.
Definition: StmtOpenMP.h:3062
clang::OMPTileDirective::Create
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
clang::OMPParallelForDirective::Create
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:580
clang::OMPTeamsDistributeParallelForDirective::CreateEmpty
static OMPTeamsDistributeParallelForDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:1803
clang::OMPTargetEnterDataDirective::Create
static OMPTargetEnterDataDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
Definition: StmtOpenMP.cpp:985
clang::OMPTargetSimdDirective
This represents '#pragma omp target simd' directive.
Definition: StmtOpenMP.h:4411
clang::OMPTaskDirective::CreateEmpty
static OMPTaskDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:713
clang::OMPLoopBasedDirective::HelperExprs::DistCombinedFields
DistCombinedHelperExprs DistCombinedFields
Expressions used when combining OpenMP loop pragmas.
Definition: StmtOpenMP.h:810
clang::DeclarationNameInfo
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnd...
Definition: DeclarationName.h:767
clang::OMPLoopBasedDirective::HelperExprs::Cond
Expr * Cond
Loop condition.
Definition: StmtOpenMP.h:752
clang::OMPTaskLoopSimdDirective
This represents '#pragma omp taskloop simd' directive.
Definition: StmtOpenMP.h:3644
clang::OMPLoopBasedDirective::doForAllLoops
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
clang::OMPTargetParallelForDirective
This represents '#pragma omp target parallel for' directive.
Definition: StmtOpenMP.h:3305
clang::OMPParallelSectionsDirective
This represents '#pragma omp parallel sections' directive.
Definition: StmtOpenMP.h:2316
clang::OMPTargetTeamsGenericLoopDirective::Create
static OMPTargetTeamsGenericLoopDirective * 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:2182
clang::OMPAtomicDirective::Expressions
Definition: StmtOpenMP.h:2895
clang::OMPAtomicDirective
This represents '#pragma omp atomic' directive.
Definition: StmtOpenMP.h:2827
clang::OMPLoopDirective::getBody
Stmt * getBody()
Definition: StmtOpenMP.cpp:202
clang::OMPTargetTeamsDistributeParallelForSimdDirective::CreateEmpty
static OMPTargetTeamsDistributeParallelForSimdDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:1989
clang::OMPLoopBasedDirective::DistCombinedHelperExprs::NUB
Expr * NUB
Update of UpperBound for statically scheduled omp loops for outer loop in combined constructs (e....
Definition: StmtOpenMP.h:728
clang::OMPLoopDirective::setDependentCounters
void setDependentCounters(ArrayRef< Expr * > A)
Definition: StmtOpenMP.cpp:243
clang::OMPTeamsDistributeParallelForSimdDirective
This represents '#pragma omp teams distribute parallel for simd' composite directive.
Definition: StmtOpenMP.h:4609
clang::OMPBarrierDirective
This represents '#pragma omp barrier' directive.
Definition: StmtOpenMP.h:2505
clang::OMPFlushDirective::CreateEmpty
static OMPFlushDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive with the place for NumClauses clauses.
Definition: StmtOpenMP.cpp:812