clang 8.0.0

StmtOpenMP.cpp
Go to the documentation of this file.
1 //===--- StmtOpenMP.cpp - Classes for OpenMP directives -------------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file implements the subclesses of Stmt class declared in StmtOpenMP.h
11 //
12 //===----------------------------------------------------------------------===//
13
14 #include "clang/AST/StmtOpenMP.h"
15
16 #include "clang/AST/ASTContext.h"
17
18 using namespace clang;
19
20 void OMPExecutableDirective::setClauses(ArrayRef<OMPClause *> Clauses) {
21 assert(Clauses.size() == getNumClauses() &&
22 "Number of clauses is not the same as the preallocated buffer");
23 std::copy(Clauses.begin(), Clauses.end(), getClauses().begin());
24 }
25
26 void OMPLoopDirective::setCounters(ArrayRef<Expr *> A) {
27 assert(A.size() == getCollapsedNumber() &&
28 "Number of loop counters is not the same as the collapsed number");
29 std::copy(A.begin(), A.end(), getCounters().begin());
30 }
31
32 void OMPLoopDirective::setPrivateCounters(ArrayRef<Expr *> A) {
33 assert(A.size() == getCollapsedNumber() && "Number of loop private counters "
34 "is not the same as the collapsed "
35 "number");
36 std::copy(A.begin(), A.end(), getPrivateCounters().begin());
37 }
38
39 void OMPLoopDirective::setInits(ArrayRef<Expr *> A) {
40 assert(A.size() == getCollapsedNumber() &&
41 "Number of counter inits is not the same as the collapsed number");
42 std::copy(A.begin(), A.end(), getInits().begin());
43 }
44
45 void OMPLoopDirective::setUpdates(ArrayRef<Expr *> A) {
46 assert(A.size() == getCollapsedNumber() &&
47 "Number of counter updates is not the same as the collapsed number");
48 std::copy(A.begin(), A.end(), getUpdates().begin());
49 }
50
51 void OMPLoopDirective::setFinals(ArrayRef<Expr *> A) {
52 assert(A.size() == getCollapsedNumber() &&
53 "Number of counter finals is not the same as the collapsed number");
54 std::copy(A.begin(), A.end(), getFinals().begin());
55 }
56
57 OMPParallelDirective *OMPParallelDirective::Create(
58 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
59 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, bool HasCancel) {
60 unsigned Size =
61 llvm::alignTo(sizeof(OMPParallelDirective), alignof(OMPClause *));
62 void *Mem =
63 C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *));
64 OMPParallelDirective *Dir =
65 new (Mem) OMPParallelDirective(StartLoc, EndLoc, Clauses.size());
66 Dir->setClauses(Clauses);
67 Dir->setAssociatedStmt(AssociatedStmt);
68 Dir->setHasCancel(HasCancel);
69 return Dir;
70 }
71
72 OMPParallelDirective *OMPParallelDirective::CreateEmpty(const ASTContext &C,
73 unsigned NumClauses,
74 EmptyShell) {
75 unsigned Size =
76 llvm::alignTo(sizeof(OMPParallelDirective), alignof(OMPClause *));
77 void *Mem =
78 C.Allocate(Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *));
79 return new (Mem) OMPParallelDirective(NumClauses);
80 }
81
82 OMPSimdDirective *
83 OMPSimdDirective::Create(const ASTContext &C, SourceLocation StartLoc,
84 SourceLocation EndLoc, unsigned CollapsedNum,
85 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
86 const HelperExprs &Exprs) {
87 unsigned Size = llvm::alignTo(sizeof(OMPSimdDirective), alignof(OMPClause *));
88 void *Mem =
89 C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() +
90 sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_simd));
91 OMPSimdDirective *Dir = new (Mem)
92 OMPSimdDirective(StartLoc, EndLoc, CollapsedNum, Clauses.size());
93 Dir->setClauses(Clauses);
94 Dir->setAssociatedStmt(AssociatedStmt);
95 Dir->setIterationVariable(Exprs.IterationVarRef);
96 Dir->setLastIteration(Exprs.LastIteration);
97 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
98 Dir->setPreCond(Exprs.PreCond);
99 Dir->setCond(Exprs.Cond);
100 Dir->setInit(Exprs.Init);
101 Dir->setInc(Exprs.Inc);
102 Dir->setCounters(Exprs.Counters);
103 Dir->setPrivateCounters(Exprs.PrivateCounters);
104 Dir->setInits(Exprs.Inits);
105 Dir->setUpdates(Exprs.Updates);
106 Dir->setFinals(Exprs.Finals);
107 Dir->setPreInits(Exprs.PreInits);
108 return Dir;
109 }
110
111 OMPSimdDirective *OMPSimdDirective::CreateEmpty(const ASTContext &C,
112 unsigned NumClauses,
113 unsigned CollapsedNum,
114 EmptyShell) {
115 unsigned Size = llvm::alignTo(sizeof(OMPSimdDirective), alignof(OMPClause *));
116 void *Mem =
117 C.Allocate(Size + sizeof(OMPClause *) * NumClauses +
118 sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_simd));
119 return new (Mem) OMPSimdDirective(CollapsedNum, NumClauses);
120 }
121
122 OMPForDirective *
123 OMPForDirective::Create(const ASTContext &C, SourceLocation StartLoc,
124 SourceLocation EndLoc, unsigned CollapsedNum,
125 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
126 const HelperExprs &Exprs, bool HasCancel) {
127 unsigned Size = llvm::alignTo(sizeof(OMPForDirective), alignof(OMPClause *));
128 void *Mem =
129 C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() +
130 sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_for));
131 OMPForDirective *Dir =
132 new (Mem) OMPForDirective(StartLoc, EndLoc, CollapsedNum, Clauses.size());
133 Dir->setClauses(Clauses);
134 Dir->setAssociatedStmt(AssociatedStmt);
135 Dir->setIterationVariable(Exprs.IterationVarRef);
136 Dir->setLastIteration(Exprs.LastIteration);
137 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
138 Dir->setPreCond(Exprs.PreCond);
139 Dir->setCond(Exprs.Cond);
140 Dir->setInit(Exprs.Init);
141 Dir->setInc(Exprs.Inc);
142 Dir->setIsLastIterVariable(Exprs.IL);
143 Dir->setLowerBoundVariable(Exprs.LB);
144 Dir->setUpperBoundVariable(Exprs.UB);
145 Dir->setStrideVariable(Exprs.ST);
146 Dir->setEnsureUpperBound(Exprs.EUB);
147 Dir->setNextLowerBound(Exprs.NLB);
148 Dir->setNextUpperBound(Exprs.NUB);
149 Dir->setNumIterations(Exprs.NumIterations);
150 Dir->setCounters(Exprs.Counters);
151 Dir->setPrivateCounters(Exprs.PrivateCounters);
152 Dir->setInits(Exprs.Inits);
153 Dir->setUpdates(Exprs.Updates);
154 Dir->setFinals(Exprs.Finals);
155 Dir->setPreInits(Exprs.PreInits);
156 Dir->setHasCancel(HasCancel);
157 return Dir;
158 }
159
160 OMPForDirective *OMPForDirective::CreateEmpty(const ASTContext &C,
161 unsigned NumClauses,
162 unsigned CollapsedNum,
163 EmptyShell) {
164 unsigned Size = llvm::alignTo(sizeof(OMPForDirective), alignof(OMPClause *));
165 void *Mem =
166 C.Allocate(Size + sizeof(OMPClause *) * NumClauses +
167 sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_for));
168 return new (Mem) OMPForDirective(CollapsedNum, NumClauses);
169 }
170
171 OMPForSimdDirective *
172 OMPForSimdDirective::Create(const ASTContext &C, SourceLocation StartLoc,
173 SourceLocation EndLoc, unsigned CollapsedNum,
174 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
175 const HelperExprs &Exprs) {
176 unsigned Size =
177 llvm::alignTo(sizeof(OMPForSimdDirective), alignof(OMPClause *));
178 void *Mem =
179 C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() +
180 sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_for_simd));
181 OMPForSimdDirective *Dir = new (Mem)
182 OMPForSimdDirective(StartLoc, EndLoc, CollapsedNum, Clauses.size());
183 Dir->setClauses(Clauses);
184 Dir->setAssociatedStmt(AssociatedStmt);
185 Dir->setIterationVariable(Exprs.IterationVarRef);
186 Dir->setLastIteration(Exprs.LastIteration);
187 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
188 Dir->setPreCond(Exprs.PreCond);
189 Dir->setCond(Exprs.Cond);
190 Dir->setInit(Exprs.Init);
191 Dir->setInc(Exprs.Inc);
192 Dir->setIsLastIterVariable(Exprs.IL);
193 Dir->setLowerBoundVariable(Exprs.LB);
194 Dir->setUpperBoundVariable(Exprs.UB);
195 Dir->setStrideVariable(Exprs.ST);
196 Dir->setEnsureUpperBound(Exprs.EUB);
197 Dir->setNextLowerBound(Exprs.NLB);
198 Dir->setNextUpperBound(Exprs.NUB);
199 Dir->setNumIterations(Exprs.NumIterations);
200 Dir->setCounters(Exprs.Counters);
201 Dir->setPrivateCounters(Exprs.PrivateCounters);
202 Dir->setInits(Exprs.Inits);
203 Dir->setUpdates(Exprs.Updates);
204 Dir->setFinals(Exprs.Finals);
205 Dir->setPreInits(Exprs.PreInits);
206 return Dir;
207 }
208
209 OMPForSimdDirective *OMPForSimdDirective::CreateEmpty(const ASTContext &C,
210 unsigned NumClauses,
211 unsigned CollapsedNum,
212 EmptyShell) {
213 unsigned Size =
214 llvm::alignTo(sizeof(OMPForSimdDirective), alignof(OMPClause *));
215 void *Mem =
216 C.Allocate(Size + sizeof(OMPClause *) * NumClauses +
217 sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_for_simd));
218 return new (Mem) OMPForSimdDirective(CollapsedNum, NumClauses);
219 }
220
221 OMPSectionsDirective *OMPSectionsDirective::Create(
222 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
223 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, bool HasCancel) {
224 unsigned Size =
225 llvm::alignTo(sizeof(OMPSectionsDirective), alignof(OMPClause *));
226 void *Mem =
227 C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *));
228 OMPSectionsDirective *Dir =
229 new (Mem) OMPSectionsDirective(StartLoc, EndLoc, Clauses.size());
230 Dir->setClauses(Clauses);
231 Dir->setAssociatedStmt(AssociatedStmt);
232 Dir->setHasCancel(HasCancel);
233 return Dir;
234 }
235
236 OMPSectionsDirective *OMPSectionsDirective::CreateEmpty(const ASTContext &C,
237 unsigned NumClauses,
238 EmptyShell) {
239 unsigned Size =
240 llvm::alignTo(sizeof(OMPSectionsDirective), alignof(OMPClause *));
241 void *Mem =
242 C.Allocate(Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *));
243 return new (Mem) OMPSectionsDirective(NumClauses);
244 }
245
246 OMPSectionDirective *OMPSectionDirective::Create(const ASTContext &C,
247 SourceLocation StartLoc,
248 SourceLocation EndLoc,
249 Stmt *AssociatedStmt,
250 bool HasCancel) {
251 unsigned Size = llvm::alignTo(sizeof(OMPSectionDirective), alignof(Stmt *));
252 void *Mem = C.Allocate(Size + sizeof(Stmt *));
253 OMPSectionDirective *Dir = new (Mem) OMPSectionDirective(StartLoc, EndLoc);
254 Dir->setAssociatedStmt(AssociatedStmt);
255 Dir->setHasCancel(HasCancel);
256 return Dir;
257 }
258
259 OMPSectionDirective *OMPSectionDirective::CreateEmpty(const ASTContext &C,
260 EmptyShell) {
261 unsigned Size = llvm::alignTo(sizeof(OMPSectionDirective), alignof(Stmt *));
262 void *Mem = C.Allocate(Size + sizeof(Stmt *));
263 return new (Mem) OMPSectionDirective();
264 }
265
266 OMPSingleDirective *OMPSingleDirective::Create(const ASTContext &C,
267 SourceLocation StartLoc,
268 SourceLocation EndLoc,
269 ArrayRef<OMPClause *> Clauses,
270 Stmt *AssociatedStmt) {
271 unsigned Size =
272 llvm::alignTo(sizeof(OMPSingleDirective), alignof(OMPClause *));
273 void *Mem =
274 C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *));
275 OMPSingleDirective *Dir =
276 new (Mem) OMPSingleDirective(StartLoc, EndLoc, Clauses.size());
277 Dir->setClauses(Clauses);
278 Dir->setAssociatedStmt(AssociatedStmt);
279 return Dir;
280 }
281
282 OMPSingleDirective *OMPSingleDirective::CreateEmpty(const ASTContext &C,
283 unsigned NumClauses,
284 EmptyShell) {
285 unsigned Size =
286 llvm::alignTo(sizeof(OMPSingleDirective), alignof(OMPClause *));
287 void *Mem =
288 C.Allocate(Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *));
289 return new (Mem) OMPSingleDirective(NumClauses);
290 }
291
292 OMPMasterDirective *OMPMasterDirective::Create(const ASTContext &C,
293 SourceLocation StartLoc,
294 SourceLocation EndLoc,
295 Stmt *AssociatedStmt) {
296 unsigned Size = llvm::alignTo(sizeof(OMPMasterDirective), alignof(Stmt *));
297 void *Mem = C.Allocate(Size + sizeof(Stmt *));
298 OMPMasterDirective *Dir = new (Mem) OMPMasterDirective(StartLoc, EndLoc);
299 Dir->setAssociatedStmt(AssociatedStmt);
300 return Dir;
301 }
302
303 OMPMasterDirective *OMPMasterDirective::CreateEmpty(const ASTContext &C,
304 EmptyShell) {
305 unsigned Size = llvm::alignTo(sizeof(OMPMasterDirective), alignof(Stmt *));
306 void *Mem = C.Allocate(Size + sizeof(Stmt *));
307 return new (Mem) OMPMasterDirective();
308 }
309
310 OMPCriticalDirective *OMPCriticalDirective::Create(
311 const ASTContext &C, const DeclarationNameInfo &Name,
312 SourceLocation StartLoc, SourceLocation EndLoc,
313 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt) {
314 unsigned Size =
315 llvm::alignTo(sizeof(OMPCriticalDirective), alignof(OMPClause *));
316 void *Mem =
317 C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *));
318 OMPCriticalDirective *Dir =
319 new (Mem) OMPCriticalDirective(Name, StartLoc, EndLoc, Clauses.size());
320 Dir->setClauses(Clauses);
321 Dir->setAssociatedStmt(AssociatedStmt);
322 return Dir;
323 }
324
325 OMPCriticalDirective *OMPCriticalDirective::CreateEmpty(const ASTContext &C,
326 unsigned NumClauses,
327 EmptyShell) {
328 unsigned Size =
329 llvm::alignTo(sizeof(OMPCriticalDirective), alignof(OMPClause *));
330 void *Mem =
331 C.Allocate(Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *));
332 return new (Mem) OMPCriticalDirective(NumClauses);
333 }
334
335 OMPParallelForDirective *OMPParallelForDirective::Create(
336 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
337 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
338 const HelperExprs &Exprs, bool HasCancel) {
339 unsigned Size =
340 llvm::alignTo(sizeof(OMPParallelForDirective), alignof(OMPClause *));
341 void *Mem = C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() +
342 sizeof(Stmt *) *
343 numLoopChildren(CollapsedNum, OMPD_parallel_for));
344 OMPParallelForDirective *Dir = new (Mem)
345 OMPParallelForDirective(StartLoc, EndLoc, CollapsedNum, Clauses.size());
346 Dir->setClauses(Clauses);
347 Dir->setAssociatedStmt(AssociatedStmt);
348 Dir->setIterationVariable(Exprs.IterationVarRef);
349 Dir->setLastIteration(Exprs.LastIteration);
350 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
351 Dir->setPreCond(Exprs.PreCond);
352 Dir->setCond(Exprs.Cond);
353 Dir->setInit(Exprs.Init);
354 Dir->setInc(Exprs.Inc);
355 Dir->setIsLastIterVariable(Exprs.IL);
356 Dir->setLowerBoundVariable(Exprs.LB);
357 Dir->setUpperBoundVariable(Exprs.UB);
358 Dir->setStrideVariable(Exprs.ST);
359 Dir->setEnsureUpperBound(Exprs.EUB);
360 Dir->setNextLowerBound(Exprs.NLB);
361 Dir->setNextUpperBound(Exprs.NUB);
362 Dir->setNumIterations(Exprs.NumIterations);
363 Dir->setCounters(Exprs.Counters);
364 Dir->setPrivateCounters(Exprs.PrivateCounters);
365 Dir->setInits(Exprs.Inits);
366 Dir->setUpdates(Exprs.Updates);
367 Dir->setFinals(Exprs.Finals);
368 Dir->setPreInits(Exprs.PreInits);
369 Dir->setHasCancel(HasCancel);
370 return Dir;
371 }
372
373 OMPParallelForDirective *
374 OMPParallelForDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses,
375 unsigned CollapsedNum, EmptyShell) {
376 unsigned Size =
377 llvm::alignTo(sizeof(OMPParallelForDirective), alignof(OMPClause *));
378 void *Mem = C.Allocate(Size + sizeof(OMPClause *) * NumClauses +
379 sizeof(Stmt *) *
380 numLoopChildren(CollapsedNum, OMPD_parallel_for));
381 return new (Mem) OMPParallelForDirective(CollapsedNum, NumClauses);
382 }
383
384 OMPParallelForSimdDirective *OMPParallelForSimdDirective::Create(
385 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
386 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
387 const HelperExprs &Exprs) {
388 unsigned Size =
389 llvm::alignTo(sizeof(OMPParallelForSimdDirective), alignof(OMPClause *));
390 void *Mem = C.Allocate(
391 Size + sizeof(OMPClause *) * Clauses.size() +
392 sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_parallel_for_simd));
393 OMPParallelForSimdDirective *Dir = new (Mem) OMPParallelForSimdDirective(
394 StartLoc, EndLoc, CollapsedNum, Clauses.size());
395 Dir->setClauses(Clauses);
396 Dir->setAssociatedStmt(AssociatedStmt);
397 Dir->setIterationVariable(Exprs.IterationVarRef);
398 Dir->setLastIteration(Exprs.LastIteration);
399 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
400 Dir->setPreCond(Exprs.PreCond);
401 Dir->setCond(Exprs.Cond);
402 Dir->setInit(Exprs.Init);
403 Dir->setInc(Exprs.Inc);
404 Dir->setIsLastIterVariable(Exprs.IL);
405 Dir->setLowerBoundVariable(Exprs.LB);
406 Dir->setUpperBoundVariable(Exprs.UB);
407 Dir->setStrideVariable(Exprs.ST);
408 Dir->setEnsureUpperBound(Exprs.EUB);
409 Dir->setNextLowerBound(Exprs.NLB);
410 Dir->setNextUpperBound(Exprs.NUB);
411 Dir->setNumIterations(Exprs.NumIterations);
412 Dir->setCounters(Exprs.Counters);
413 Dir->setPrivateCounters(Exprs.PrivateCounters);
414 Dir->setInits(Exprs.Inits);
415 Dir->setUpdates(Exprs.Updates);
416 Dir->setFinals(Exprs.Finals);
417 Dir->setPreInits(Exprs.PreInits);
418 return Dir;
419 }
420
421 OMPParallelForSimdDirective *
422 OMPParallelForSimdDirective::CreateEmpty(const ASTContext &C,
423 unsigned NumClauses,
424 unsigned CollapsedNum, EmptyShell) {
425 unsigned Size =
426 llvm::alignTo(sizeof(OMPParallelForSimdDirective), alignof(OMPClause *));
427 void *Mem = C.Allocate(
428 Size + sizeof(OMPClause *) * NumClauses +
429 sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_parallel_for_simd));
430 return new (Mem) OMPParallelForSimdDirective(CollapsedNum, NumClauses);
431 }
432
433 OMPParallelSectionsDirective *OMPParallelSectionsDirective::Create(
434 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
435 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, bool HasCancel) {
436 unsigned Size =
437 llvm::alignTo(sizeof(OMPParallelSectionsDirective), alignof(OMPClause *));
438 void *Mem =
439 C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *));
440 OMPParallelSectionsDirective *Dir =
441 new (Mem) OMPParallelSectionsDirective(StartLoc, EndLoc, Clauses.size());
442 Dir->setClauses(Clauses);
443 Dir->setAssociatedStmt(AssociatedStmt);
444 Dir->setHasCancel(HasCancel);
445 return Dir;
446 }
447
448 OMPParallelSectionsDirective *
449 OMPParallelSectionsDirective::CreateEmpty(const ASTContext &C,
450 unsigned NumClauses, EmptyShell) {
451 unsigned Size =
452 llvm::alignTo(sizeof(OMPParallelSectionsDirective), alignof(OMPClause *));
453 void *Mem =
454 C.Allocate(Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *));
455 return new (Mem) OMPParallelSectionsDirective(NumClauses);
456 }
457
458 OMPTaskDirective *
459 OMPTaskDirective::Create(const ASTContext &C, SourceLocation StartLoc,
460 SourceLocation EndLoc, ArrayRef<OMPClause *> Clauses,
461 Stmt *AssociatedStmt, bool HasCancel) {
462 unsigned Size = llvm::alignTo(sizeof(OMPTaskDirective), alignof(OMPClause *));
463 void *Mem =
464 C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *));
465 OMPTaskDirective *Dir =
466 new (Mem) OMPTaskDirective(StartLoc, EndLoc, Clauses.size());
467 Dir->setClauses(Clauses);
468 Dir->setAssociatedStmt(AssociatedStmt);
469 Dir->setHasCancel(HasCancel);
470 return Dir;
471 }
472
473 OMPTaskDirective *OMPTaskDirective::CreateEmpty(const ASTContext &C,
474 unsigned NumClauses,
475 EmptyShell) {
476 unsigned Size = llvm::alignTo(sizeof(OMPTaskDirective), alignof(OMPClause *));
477 void *Mem =
478 C.Allocate(Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *));
479 return new (Mem) OMPTaskDirective(NumClauses);
480 }
481
482 OMPTaskyieldDirective *OMPTaskyieldDirective::Create(const ASTContext &C,
483 SourceLocation StartLoc,
484 SourceLocation EndLoc) {
485 void *Mem = C.Allocate(sizeof(OMPTaskyieldDirective));
486 OMPTaskyieldDirective *Dir =
487 new (Mem) OMPTaskyieldDirective(StartLoc, EndLoc);
488 return Dir;
489 }
490
491 OMPTaskyieldDirective *OMPTaskyieldDirective::CreateEmpty(const ASTContext &C,
492 EmptyShell) {
493 void *Mem = C.Allocate(sizeof(OMPTaskyieldDirective));
494 return new (Mem) OMPTaskyieldDirective();
495 }
496
497 OMPBarrierDirective *OMPBarrierDirective::Create(const ASTContext &C,
498 SourceLocation StartLoc,
499 SourceLocation EndLoc) {
500 void *Mem = C.Allocate(sizeof(OMPBarrierDirective));
501 OMPBarrierDirective *Dir = new (Mem) OMPBarrierDirective(StartLoc, EndLoc);
502 return Dir;
503 }
504
505 OMPBarrierDirective *OMPBarrierDirective::CreateEmpty(const ASTContext &C,
506 EmptyShell) {
507 void *Mem = C.Allocate(sizeof(OMPBarrierDirective));
508 return new (Mem) OMPBarrierDirective();
509 }
510
511 OMPTaskwaitDirective *OMPTaskwaitDirective::Create(const ASTContext &C,
512 SourceLocation StartLoc,
513 SourceLocation EndLoc) {
514 void *Mem = C.Allocate(sizeof(OMPTaskwaitDirective));
515 OMPTaskwaitDirective *Dir = new (Mem) OMPTaskwaitDirective(StartLoc, EndLoc);
516 return Dir;
517 }
518
519 OMPTaskwaitDirective *OMPTaskwaitDirective::CreateEmpty(const ASTContext &C,
520 EmptyShell) {
521 void *Mem = C.Allocate(sizeof(OMPTaskwaitDirective));
522 return new (Mem) OMPTaskwaitDirective();
523 }
524
525 OMPTaskgroupDirective *OMPTaskgroupDirective::Create(
526 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
527 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *ReductionRef) {
528 unsigned Size = llvm::alignTo(sizeof(OMPTaskgroupDirective) +
529 sizeof(OMPClause *) * Clauses.size(),
530 alignof(Stmt *));
531 void *Mem = C.Allocate(Size + sizeof(Stmt *) + sizeof(Expr *));
532 OMPTaskgroupDirective *Dir =
533 new (Mem) OMPTaskgroupDirective(StartLoc, EndLoc, Clauses.size());
534 Dir->setAssociatedStmt(AssociatedStmt);
535 Dir->setReductionRef(ReductionRef);
536 Dir->setClauses(Clauses);
537 return Dir;
538 }
539
540 OMPTaskgroupDirective *OMPTaskgroupDirective::CreateEmpty(const ASTContext &C,
541 unsigned NumClauses,
542 EmptyShell) {
543 unsigned Size = llvm::alignTo(sizeof(OMPTaskgroupDirective) +
544 sizeof(OMPClause *) * NumClauses,
545 alignof(Stmt *));
546 void *Mem = C.Allocate(Size + sizeof(Stmt *) + sizeof(Expr *));
547 return new (Mem) OMPTaskgroupDirective(NumClauses);
548 }
549
550 OMPCancellationPointDirective *OMPCancellationPointDirective::Create(
551 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
552 OpenMPDirectiveKind CancelRegion) {
553 unsigned Size =
554 llvm::alignTo(sizeof(OMPCancellationPointDirective), alignof(Stmt *));
555 void *Mem = C.Allocate(Size);
556 OMPCancellationPointDirective *Dir =
557 new (Mem) OMPCancellationPointDirective(StartLoc, EndLoc);
558 Dir->setCancelRegion(CancelRegion);
559 return Dir;
560 }
561
562 OMPCancellationPointDirective *
563 OMPCancellationPointDirective::CreateEmpty(const ASTContext &C, EmptyShell) {
564 unsigned Size =
565 llvm::alignTo(sizeof(OMPCancellationPointDirective), alignof(Stmt *));
566 void *Mem = C.Allocate(Size);
567 return new (Mem) OMPCancellationPointDirective();
568 }
569
570 OMPCancelDirective *
571 OMPCancelDirective::Create(const ASTContext &C, SourceLocation StartLoc,
572 SourceLocation EndLoc, ArrayRef<OMPClause *> Clauses,
573 OpenMPDirectiveKind CancelRegion) {
574 unsigned Size = llvm::alignTo(sizeof(OMPCancelDirective) +
575 sizeof(OMPClause *) * Clauses.size(),
576 alignof(Stmt *));
577 void *Mem = C.Allocate(Size);
578 OMPCancelDirective *Dir =
579 new (Mem) OMPCancelDirective(StartLoc, EndLoc, Clauses.size());
580 Dir->setClauses(Clauses);
581 Dir->setCancelRegion(CancelRegion);
582 return Dir;
583 }
584
585 OMPCancelDirective *OMPCancelDirective::CreateEmpty(const ASTContext &C,
586 unsigned NumClauses,
587 EmptyShell) {
588 unsigned Size = llvm::alignTo(sizeof(OMPCancelDirective) +
589 sizeof(OMPClause *) * NumClauses,
590 alignof(Stmt *));
591 void *Mem = C.Allocate(Size);
592 return new (Mem) OMPCancelDirective(NumClauses);
593 }
594
595 OMPFlushDirective *OMPFlushDirective::Create(const ASTContext &C,
596 SourceLocation StartLoc,
597 SourceLocation EndLoc,
598 ArrayRef<OMPClause *> Clauses) {
599 unsigned Size =
600 llvm::alignTo(sizeof(OMPFlushDirective), alignof(OMPClause *));
601 void *Mem = C.Allocate(Size + sizeof(OMPClause *) * Clauses.size());
602 OMPFlushDirective *Dir =
603 new (Mem) OMPFlushDirective(StartLoc, EndLoc, Clauses.size());
604 Dir->setClauses(Clauses);
605 return Dir;
606 }
607
608 OMPFlushDirective *OMPFlushDirective::CreateEmpty(const ASTContext &C,
609 unsigned NumClauses,
610 EmptyShell) {
611 unsigned Size =
612 llvm::alignTo(sizeof(OMPFlushDirective), alignof(OMPClause *));
613 void *Mem = C.Allocate(Size + sizeof(OMPClause *) * NumClauses);
614 return new (Mem) OMPFlushDirective(NumClauses);
615 }
616
617 OMPOrderedDirective *OMPOrderedDirective::Create(const ASTContext &C,
618 SourceLocation StartLoc,
619 SourceLocation EndLoc,
620 ArrayRef<OMPClause *> Clauses,
621 Stmt *AssociatedStmt) {
622 unsigned Size =
623 llvm::alignTo(sizeof(OMPOrderedDirective), alignof(OMPClause *));
624 void *Mem =
625 C.Allocate(Size + sizeof(Stmt *) + sizeof(OMPClause *) * Clauses.size());
626 OMPOrderedDirective *Dir =
627 new (Mem) OMPOrderedDirective(StartLoc, EndLoc, Clauses.size());
628 Dir->setClauses(Clauses);
629 Dir->setAssociatedStmt(AssociatedStmt);
630 return Dir;
631 }
632
633 OMPOrderedDirective *OMPOrderedDirective::CreateEmpty(const ASTContext &C,
634 unsigned NumClauses,
635 EmptyShell) {
636 unsigned Size =
637 llvm::alignTo(sizeof(OMPOrderedDirective), alignof(OMPClause *));
638 void *Mem =
639 C.Allocate(Size + sizeof(Stmt *) + sizeof(OMPClause *) * NumClauses);
640 return new (Mem) OMPOrderedDirective(NumClauses);
641 }
642
643 OMPAtomicDirective *OMPAtomicDirective::Create(
644 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
645 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *X, Expr *V,
646 Expr *E, Expr *UE, bool IsXLHSInRHSPart, bool IsPostfixUpdate) {
647 unsigned Size =
648 llvm::alignTo(sizeof(OMPAtomicDirective), alignof(OMPClause *));
649 void *Mem = C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() +
650 5 * sizeof(Stmt *));
651 OMPAtomicDirective *Dir =
652 new (Mem) OMPAtomicDirective(StartLoc, EndLoc, Clauses.size());
653 Dir->setClauses(Clauses);
654 Dir->setAssociatedStmt(AssociatedStmt);
655 Dir->setX(X);
656 Dir->setV(V);
657 Dir->setExpr(E);
658 Dir->setUpdateExpr(UE);
659 Dir->IsXLHSInRHSPart = IsXLHSInRHSPart;
660 Dir->IsPostfixUpdate = IsPostfixUpdate;
661 return Dir;
662 }
663
664 OMPAtomicDirective *OMPAtomicDirective::CreateEmpty(const ASTContext &C,
665 unsigned NumClauses,
666 EmptyShell) {
667 unsigned Size =
668 llvm::alignTo(sizeof(OMPAtomicDirective), alignof(OMPClause *));
669 void *Mem =
670 C.Allocate(Size + sizeof(OMPClause *) * NumClauses + 5 * sizeof(Stmt *));
671 return new (Mem) OMPAtomicDirective(NumClauses);
672 }
673
674 OMPTargetDirective *OMPTargetDirective::Create(const ASTContext &C,
675 SourceLocation StartLoc,
676 SourceLocation EndLoc,
677 ArrayRef<OMPClause *> Clauses,
678 Stmt *AssociatedStmt) {
679 unsigned Size =
680 llvm::alignTo(sizeof(OMPTargetDirective), alignof(OMPClause *));
681 void *Mem =
682 C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *));
683 OMPTargetDirective *Dir =
684 new (Mem) OMPTargetDirective(StartLoc, EndLoc, Clauses.size());
685 Dir->setClauses(Clauses);
686 Dir->setAssociatedStmt(AssociatedStmt);
687 return Dir;
688 }
689
690 OMPTargetDirective *OMPTargetDirective::CreateEmpty(const ASTContext &C,
691 unsigned NumClauses,
692 EmptyShell) {
693 unsigned Size =
694 llvm::alignTo(sizeof(OMPTargetDirective), alignof(OMPClause *));
695 void *Mem =
696 C.Allocate(Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *));
697 return new (Mem) OMPTargetDirective(NumClauses);
698 }
699
700 OMPTargetParallelDirective *OMPTargetParallelDirective::Create(
701 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
702 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt) {
703 unsigned Size =
704 llvm::alignTo(sizeof(OMPTargetParallelDirective), alignof(OMPClause *));
705 void *Mem =
706 C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *));
707 OMPTargetParallelDirective *Dir =
708 new (Mem) OMPTargetParallelDirective(StartLoc, EndLoc, Clauses.size());
709 Dir->setClauses(Clauses);
710 Dir->setAssociatedStmt(AssociatedStmt);
711 return Dir;
712 }
713
714 OMPTargetParallelDirective *
715 OMPTargetParallelDirective::CreateEmpty(const ASTContext &C,
716 unsigned NumClauses, EmptyShell) {
717 unsigned Size =
718 llvm::alignTo(sizeof(OMPTargetParallelDirective), alignof(OMPClause *));
719 void *Mem =
720 C.Allocate(Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *));
721 return new (Mem) OMPTargetParallelDirective(NumClauses);
722 }
723
724 OMPTargetParallelForDirective *OMPTargetParallelForDirective::Create(
725 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
726 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
727 const HelperExprs &Exprs, bool HasCancel) {
728 unsigned Size = llvm::alignTo(sizeof(OMPTargetParallelForDirective),
729 alignof(OMPClause *));
730 void *Mem = C.Allocate(
731 Size + sizeof(OMPClause *) * Clauses.size() +
732 sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_target_parallel_for));
733 OMPTargetParallelForDirective *Dir = new (Mem) OMPTargetParallelForDirective(
734 StartLoc, EndLoc, CollapsedNum, Clauses.size());
735 Dir->setClauses(Clauses);
736 Dir->setAssociatedStmt(AssociatedStmt);
737 Dir->setIterationVariable(Exprs.IterationVarRef);
738 Dir->setLastIteration(Exprs.LastIteration);
739 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
740 Dir->setPreCond(Exprs.PreCond);
741 Dir->setCond(Exprs.Cond);
742 Dir->setInit(Exprs.Init);
743 Dir->setInc(Exprs.Inc);
744 Dir->setIsLastIterVariable(Exprs.IL);
745 Dir->setLowerBoundVariable(Exprs.LB);
746 Dir->setUpperBoundVariable(Exprs.UB);
747 Dir->setStrideVariable(Exprs.ST);
748 Dir->setEnsureUpperBound(Exprs.EUB);
749 Dir->setNextLowerBound(Exprs.NLB);
750 Dir->setNextUpperBound(Exprs.NUB);
751 Dir->setNumIterations(Exprs.NumIterations);
752 Dir->setCounters(Exprs.Counters);
753 Dir->setPrivateCounters(Exprs.PrivateCounters);
754 Dir->setInits(Exprs.Inits);
755 Dir->setUpdates(Exprs.Updates);
756 Dir->setFinals(Exprs.Finals);
757 Dir->setPreInits(Exprs.PreInits);
758 Dir->setHasCancel(HasCancel);
759 return Dir;
760 }
761
762 OMPTargetParallelForDirective *
763 OMPTargetParallelForDirective::CreateEmpty(const ASTContext &C,
764 unsigned NumClauses,
765 unsigned CollapsedNum, EmptyShell) {
766 unsigned Size = llvm::alignTo(sizeof(OMPTargetParallelForDirective),
767 alignof(OMPClause *));
768 void *Mem = C.Allocate(
769 Size + sizeof(OMPClause *) * NumClauses +
770 sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_target_parallel_for));
771 return new (Mem) OMPTargetParallelForDirective(CollapsedNum, NumClauses);
772 }
773
774 OMPTargetDataDirective *OMPTargetDataDirective::Create(
775 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
776 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt) {
777 void *Mem = C.Allocate(
778 llvm::alignTo(sizeof(OMPTargetDataDirective), alignof(OMPClause *)) +
779 sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *));
780 OMPTargetDataDirective *Dir =
781 new (Mem) OMPTargetDataDirective(StartLoc, EndLoc, Clauses.size());
782 Dir->setClauses(Clauses);
783 Dir->setAssociatedStmt(AssociatedStmt);
784 return Dir;
785 }
786
787 OMPTargetDataDirective *OMPTargetDataDirective::CreateEmpty(const ASTContext &C,
788 unsigned N,
789 EmptyShell) {
790 void *Mem = C.Allocate(
791 llvm::alignTo(sizeof(OMPTargetDataDirective), alignof(OMPClause *)) +
792 sizeof(OMPClause *) * N + sizeof(Stmt *));
793 return new (Mem) OMPTargetDataDirective(N);
794 }
795
796 OMPTargetEnterDataDirective *OMPTargetEnterDataDirective::Create(
797 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
798 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt) {
799 void *Mem = C.Allocate(
800 llvm::alignTo(sizeof(OMPTargetEnterDataDirective), alignof(OMPClause *)) +
801 sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *));
802 OMPTargetEnterDataDirective *Dir =
803 new (Mem) OMPTargetEnterDataDirective(StartLoc, EndLoc, Clauses.size());
804 Dir->setClauses(Clauses);
805 Dir->setAssociatedStmt(AssociatedStmt);
806 return Dir;
807 }
808
809 OMPTargetEnterDataDirective *
810 OMPTargetEnterDataDirective::CreateEmpty(const ASTContext &C, unsigned N,
811 EmptyShell) {
812 void *Mem = C.Allocate(
813 llvm::alignTo(sizeof(OMPTargetEnterDataDirective), alignof(OMPClause *)) +
814 sizeof(OMPClause *) * N + sizeof(Stmt *));
815 return new (Mem) OMPTargetEnterDataDirective(N);
816 }
817
818 OMPTargetExitDataDirective *OMPTargetExitDataDirective::Create(
819 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
820 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt) {
821 void *Mem = C.Allocate(
822 llvm::alignTo(sizeof(OMPTargetExitDataDirective), alignof(OMPClause *)) +
823 sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *));
824 OMPTargetExitDataDirective *Dir =
825 new (Mem) OMPTargetExitDataDirective(StartLoc, EndLoc, Clauses.size());
826 Dir->setClauses(Clauses);
827 Dir->setAssociatedStmt(AssociatedStmt);
828 return Dir;
829 }
830
831 OMPTargetExitDataDirective *
832 OMPTargetExitDataDirective::CreateEmpty(const ASTContext &C, unsigned N,
833 EmptyShell) {
834 void *Mem = C.Allocate(
835 llvm::alignTo(sizeof(OMPTargetExitDataDirective), alignof(OMPClause *)) +
836 sizeof(OMPClause *) * N + sizeof(Stmt *));
837 return new (Mem) OMPTargetExitDataDirective(N);
838 }
839
840 OMPTeamsDirective *OMPTeamsDirective::Create(const ASTContext &C,
841 SourceLocation StartLoc,
842 SourceLocation EndLoc,
843 ArrayRef<OMPClause *> Clauses,
844 Stmt *AssociatedStmt) {
845 unsigned Size =
846 llvm::alignTo(sizeof(OMPTeamsDirective), alignof(OMPClause *));
847 void *Mem =
848 C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *));
849 OMPTeamsDirective *Dir =
850 new (Mem) OMPTeamsDirective(StartLoc, EndLoc, Clauses.size());
851 Dir->setClauses(Clauses);
852 Dir->setAssociatedStmt(AssociatedStmt);
853 return Dir;
854 }
855
856 OMPTeamsDirective *OMPTeamsDirective::CreateEmpty(const ASTContext &C,
857 unsigned NumClauses,
858 EmptyShell) {
859 unsigned Size =
860 llvm::alignTo(sizeof(OMPTeamsDirective), alignof(OMPClause *));
861 void *Mem =
862 C.Allocate(Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *));
863 return new (Mem) OMPTeamsDirective(NumClauses);
864 }
865
866 OMPTaskLoopDirective *OMPTaskLoopDirective::Create(
867 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
868 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
869 const HelperExprs &Exprs) {
870 unsigned Size =
871 llvm::alignTo(sizeof(OMPTaskLoopDirective), alignof(OMPClause *));
872 void *Mem =
873 C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() +
874 sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_taskloop));
875 OMPTaskLoopDirective *Dir = new (Mem)
876 OMPTaskLoopDirective(StartLoc, EndLoc, CollapsedNum, Clauses.size());
877 Dir->setClauses(Clauses);
878 Dir->setAssociatedStmt(AssociatedStmt);
879 Dir->setIterationVariable(Exprs.IterationVarRef);
880 Dir->setLastIteration(Exprs.LastIteration);
881 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
882 Dir->setPreCond(Exprs.PreCond);
883 Dir->setCond(Exprs.Cond);
884 Dir->setInit(Exprs.Init);
885 Dir->setInc(Exprs.Inc);
886 Dir->setIsLastIterVariable(Exprs.IL);
887 Dir->setLowerBoundVariable(Exprs.LB);
888 Dir->setUpperBoundVariable(Exprs.UB);
889 Dir->setStrideVariable(Exprs.ST);
890 Dir->setEnsureUpperBound(Exprs.EUB);
891 Dir->setNextLowerBound(Exprs.NLB);
892 Dir->setNextUpperBound(Exprs.NUB);
893 Dir->setNumIterations(Exprs.NumIterations);
894 Dir->setCounters(Exprs.Counters);
895 Dir->setPrivateCounters(Exprs.PrivateCounters);
896 Dir->setInits(Exprs.Inits);
897 Dir->setUpdates(Exprs.Updates);
898 Dir->setFinals(Exprs.Finals);
899 Dir->setPreInits(Exprs.PreInits);
900 return Dir;
901 }
902
903 OMPTaskLoopDirective *OMPTaskLoopDirective::CreateEmpty(const ASTContext &C,
904 unsigned NumClauses,
905 unsigned CollapsedNum,
906 EmptyShell) {
907 unsigned Size =
908 llvm::alignTo(sizeof(OMPTaskLoopDirective), alignof(OMPClause *));
909 void *Mem =
910 C.Allocate(Size + sizeof(OMPClause *) * NumClauses +
911 sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_taskloop));
912 return new (Mem) OMPTaskLoopDirective(CollapsedNum, NumClauses);
913 }
914
915 OMPTaskLoopSimdDirective *OMPTaskLoopSimdDirective::Create(
916 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
917 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
918 const HelperExprs &Exprs) {
919 unsigned Size =
920 llvm::alignTo(sizeof(OMPTaskLoopSimdDirective), alignof(OMPClause *));
921 void *Mem = C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() +
922 sizeof(Stmt *) *
923 numLoopChildren(CollapsedNum, OMPD_taskloop_simd));
924 OMPTaskLoopSimdDirective *Dir = new (Mem)
925 OMPTaskLoopSimdDirective(StartLoc, EndLoc, CollapsedNum, Clauses.size());
926 Dir->setClauses(Clauses);
927 Dir->setAssociatedStmt(AssociatedStmt);
928 Dir->setIterationVariable(Exprs.IterationVarRef);
929 Dir->setLastIteration(Exprs.LastIteration);
930 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
931 Dir->setPreCond(Exprs.PreCond);
932 Dir->setCond(Exprs.Cond);
933 Dir->setInit(Exprs.Init);
934 Dir->setInc(Exprs.Inc);
935 Dir->setIsLastIterVariable(Exprs.IL);
936 Dir->setLowerBoundVariable(Exprs.LB);
937 Dir->setUpperBoundVariable(Exprs.UB);
938 Dir->setStrideVariable(Exprs.ST);
939 Dir->setEnsureUpperBound(Exprs.EUB);
940 Dir->setNextLowerBound(Exprs.NLB);
941 Dir->setNextUpperBound(Exprs.NUB);
942 Dir->setNumIterations(Exprs.NumIterations);
943 Dir->setCounters(Exprs.Counters);
944 Dir->setPrivateCounters(Exprs.PrivateCounters);
945 Dir->setInits(Exprs.Inits);
946 Dir->setUpdates(Exprs.Updates);
947 Dir->setFinals(Exprs.Finals);
948 Dir->setPreInits(Exprs.PreInits);
949 return Dir;
950 }
951
952 OMPTaskLoopSimdDirective *
953 OMPTaskLoopSimdDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses,
954 unsigned CollapsedNum, EmptyShell) {
955 unsigned Size =
956 llvm::alignTo(sizeof(OMPTaskLoopSimdDirective), alignof(OMPClause *));
957 void *Mem = C.Allocate(Size + sizeof(OMPClause *) * NumClauses +
958 sizeof(Stmt *) *
959 numLoopChildren(CollapsedNum, OMPD_taskloop_simd));
960 return new (Mem) OMPTaskLoopSimdDirective(CollapsedNum, NumClauses);
961 }
962
963 OMPDistributeDirective *OMPDistributeDirective::Create(
964 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
965 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
966 const HelperExprs &Exprs) {
967 unsigned Size =
968 llvm::alignTo(sizeof(OMPDistributeDirective), alignof(OMPClause *));
969 void *Mem = C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() +
970 sizeof(Stmt *) *
971 numLoopChildren(CollapsedNum, OMPD_distribute));
972 OMPDistributeDirective *Dir = new (Mem)
973 OMPDistributeDirective(StartLoc, EndLoc, CollapsedNum, Clauses.size());
974 Dir->setClauses(Clauses);
975 Dir->setAssociatedStmt(AssociatedStmt);
976 Dir->setIterationVariable(Exprs.IterationVarRef);
977 Dir->setLastIteration(Exprs.LastIteration);
978 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
979 Dir->setPreCond(Exprs.PreCond);
980 Dir->setCond(Exprs.Cond);
981 Dir->setInit(Exprs.Init);
982 Dir->setInc(Exprs.Inc);
983 Dir->setIsLastIterVariable(Exprs.IL);
984 Dir->setLowerBoundVariable(Exprs.LB);
985 Dir->setUpperBoundVariable(Exprs.UB);
986 Dir->setStrideVariable(Exprs.ST);
987 Dir->setEnsureUpperBound(Exprs.EUB);
988 Dir->setNextLowerBound(Exprs.NLB);
989 Dir->setNextUpperBound(Exprs.NUB);
990 Dir->setNumIterations(Exprs.NumIterations);
991 Dir->setCounters(Exprs.Counters);
992 Dir->setPrivateCounters(Exprs.PrivateCounters);
993 Dir->setInits(Exprs.Inits);
994 Dir->setUpdates(Exprs.Updates);
995 Dir->setFinals(Exprs.Finals);
996 Dir->setPreInits(Exprs.PreInits);
997 return Dir;
998 }
999
1000 OMPDistributeDirective *
1001 OMPDistributeDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses,
1002 unsigned CollapsedNum, EmptyShell) {
1003 unsigned Size =
1004 llvm::alignTo(sizeof(OMPDistributeDirective), alignof(OMPClause *));
1005 void *Mem = C.Allocate(Size + sizeof(OMPClause *) * NumClauses +
1006 sizeof(Stmt *) *
1007 numLoopChildren(CollapsedNum, OMPD_distribute));
1008 return new (Mem) OMPDistributeDirective(CollapsedNum, NumClauses);
1009 }
1010
1011 OMPTargetUpdateDirective *OMPTargetUpdateDirective::Create(
1012 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1013 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt) {
1014 unsigned Size =
1015 llvm::alignTo(sizeof(OMPTargetUpdateDirective), alignof(OMPClause *));
1016 void *Mem =
1017 C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *));
1018 OMPTargetUpdateDirective *Dir =
1019 new (Mem) OMPTargetUpdateDirective(StartLoc, EndLoc, Clauses.size());
1020 Dir->setClauses(Clauses);
1021 Dir->setAssociatedStmt(AssociatedStmt);
1022 return Dir;
1023 }
1024
1025 OMPTargetUpdateDirective *
1026 OMPTargetUpdateDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses,
1027 EmptyShell) {
1028 unsigned Size =
1029 llvm::alignTo(sizeof(OMPTargetUpdateDirective), alignof(OMPClause *));
1030 void *Mem =
1031 C.Allocate(Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *));
1032 return new (Mem) OMPTargetUpdateDirective(NumClauses);
1033 }
1034
1035 OMPDistributeParallelForDirective *OMPDistributeParallelForDirective::Create(
1036 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1037 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1038 const HelperExprs &Exprs, bool HasCancel) {
1039 unsigned Size = llvm::alignTo(sizeof(OMPDistributeParallelForDirective),
1040 alignof(OMPClause *));
1041 void *Mem = C.Allocate(
1042 Size + sizeof(OMPClause *) * Clauses.size() +
1043 sizeof(Stmt *) *
1044 numLoopChildren(CollapsedNum, OMPD_distribute_parallel_for));
1045 OMPDistributeParallelForDirective *Dir =
1046 new (Mem) OMPDistributeParallelForDirective(StartLoc, EndLoc,
1047 CollapsedNum, Clauses.size());
1048 Dir->setClauses(Clauses);
1049 Dir->setAssociatedStmt(AssociatedStmt);
1050 Dir->setIterationVariable(Exprs.IterationVarRef);
1051 Dir->setLastIteration(Exprs.LastIteration);
1052 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1053 Dir->setPreCond(Exprs.PreCond);
1054 Dir->setCond(Exprs.Cond);
1055 Dir->setInit(Exprs.Init);
1056 Dir->setInc(Exprs.Inc);
1057 Dir->setIsLastIterVariable(Exprs.IL);
1058 Dir->setLowerBoundVariable(Exprs.LB);
1059 Dir->setUpperBoundVariable(Exprs.UB);
1060 Dir->setStrideVariable(Exprs.ST);
1061 Dir->setEnsureUpperBound(Exprs.EUB);
1062 Dir->setNextLowerBound(Exprs.NLB);
1063 Dir->setNextUpperBound(Exprs.NUB);
1064 Dir->setNumIterations(Exprs.NumIterations);
1065 Dir->setPrevLowerBoundVariable(Exprs.PrevLB);
1066 Dir->setPrevUpperBoundVariable(Exprs.PrevUB);
1067 Dir->setDistInc(Exprs.DistInc);
1068 Dir->setPrevEnsureUpperBound(Exprs.PrevEUB);
1069 Dir->setCounters(Exprs.Counters);
1070 Dir->setPrivateCounters(Exprs.PrivateCounters);
1071 Dir->setInits(Exprs.Inits);
1072 Dir->setUpdates(Exprs.Updates);
1073 Dir->setFinals(Exprs.Finals);
1074 Dir->setPreInits(Exprs.PreInits);
1075 Dir->setCombinedLowerBoundVariable(Exprs.DistCombinedFields.LB);
1076 Dir->setCombinedUpperBoundVariable(Exprs.DistCombinedFields.UB);
1077 Dir->setCombinedEnsureUpperBound(Exprs.DistCombinedFields.EUB);
1078 Dir->setCombinedInit(Exprs.DistCombinedFields.Init);
1079 Dir->setCombinedCond(Exprs.DistCombinedFields.Cond);
1080 Dir->setCombinedNextLowerBound(Exprs.DistCombinedFields.NLB);
1081 Dir->setCombinedNextUpperBound(Exprs.DistCombinedFields.NUB);
1082 Dir->setCombinedDistCond(Exprs.DistCombinedFields.DistCond);
1083 Dir->setCombinedParForInDistCond(Exprs.DistCombinedFields.ParForInDistCond);
1084 Dir->HasCancel = HasCancel;
1085 return Dir;
1086 }
1087
1088 OMPDistributeParallelForDirective *
1089 OMPDistributeParallelForDirective::CreateEmpty(const ASTContext &C,
1090 unsigned NumClauses,
1091 unsigned CollapsedNum,
1092 EmptyShell) {
1093 unsigned Size = llvm::alignTo(sizeof(OMPDistributeParallelForDirective),
1094 alignof(OMPClause *));
1095 void *Mem = C.Allocate(
1096 Size + sizeof(OMPClause *) * NumClauses +
1097 sizeof(Stmt *) *
1098 numLoopChildren(CollapsedNum, OMPD_distribute_parallel_for));
1099 return new (Mem) OMPDistributeParallelForDirective(CollapsedNum, NumClauses);
1100 }
1101
1102 OMPDistributeParallelForSimdDirective *
1103 OMPDistributeParallelForSimdDirective::Create(
1104 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1105 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1106 const HelperExprs &Exprs) {
1107 unsigned Size = llvm::alignTo(sizeof(OMPDistributeParallelForSimdDirective),
1108 alignof(OMPClause *));
1109 void *Mem = C.Allocate(
1110 Size + sizeof(OMPClause *) * Clauses.size() +
1111 sizeof(Stmt *) *
1112 numLoopChildren(CollapsedNum, OMPD_distribute_parallel_for_simd));
1113 OMPDistributeParallelForSimdDirective *Dir = new (Mem)
1114 OMPDistributeParallelForSimdDirective(StartLoc, EndLoc, CollapsedNum,
1115 Clauses.size());
1116 Dir->setClauses(Clauses);
1117 Dir->setAssociatedStmt(AssociatedStmt);
1118 Dir->setIterationVariable(Exprs.IterationVarRef);
1119 Dir->setLastIteration(Exprs.LastIteration);
1120 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1121 Dir->setPreCond(Exprs.PreCond);
1122 Dir->setCond(Exprs.Cond);
1123 Dir->setInit(Exprs.Init);
1124 Dir->setInc(Exprs.Inc);
1125 Dir->setIsLastIterVariable(Exprs.IL);
1126 Dir->setLowerBoundVariable(Exprs.LB);
1127 Dir->setUpperBoundVariable(Exprs.UB);
1128 Dir->setStrideVariable(Exprs.ST);
1129 Dir->setEnsureUpperBound(Exprs.EUB);
1130 Dir->setNextLowerBound(Exprs.NLB);
1131 Dir->setNextUpperBound(Exprs.NUB);
1132 Dir->setNumIterations(Exprs.NumIterations);
1133 Dir->setPrevLowerBoundVariable(Exprs.PrevLB);
1134 Dir->setPrevUpperBoundVariable(Exprs.PrevUB);
1135 Dir->setDistInc(Exprs.DistInc);
1136 Dir->setPrevEnsureUpperBound(Exprs.PrevEUB);
1137 Dir->setCounters(Exprs.Counters);
1138 Dir->setPrivateCounters(Exprs.PrivateCounters);
1139 Dir->setInits(Exprs.Inits);
1140 Dir->setUpdates(Exprs.Updates);
1141 Dir->setFinals(Exprs.Finals);
1142 Dir->setPreInits(Exprs.PreInits);
1143 Dir->setCombinedLowerBoundVariable(Exprs.DistCombinedFields.LB);
1144 Dir->setCombinedUpperBoundVariable(Exprs.DistCombinedFields.UB);
1145 Dir->setCombinedEnsureUpperBound(Exprs.DistCombinedFields.EUB);
1146 Dir->setCombinedInit(Exprs.DistCombinedFields.Init);
1147 Dir->setCombinedCond(Exprs.DistCombinedFields.Cond);
1148 Dir->setCombinedNextLowerBound(Exprs.DistCombinedFields.NLB);
1149 Dir->setCombinedNextUpperBound(Exprs.DistCombinedFields.NUB);
1150 Dir->setCombinedDistCond(Exprs.DistCombinedFields.DistCond);
1151 Dir->setCombinedParForInDistCond(Exprs.DistCombinedFields.ParForInDistCond);
1152 return Dir;
1153 }
1154
1155 OMPDistributeParallelForSimdDirective *
1156 OMPDistributeParallelForSimdDirective::CreateEmpty(const ASTContext &C,
1157 unsigned NumClauses,
1158 unsigned CollapsedNum,
1159 EmptyShell) {
1160 unsigned Size = llvm::alignTo(sizeof(OMPDistributeParallelForSimdDirective),
1161 alignof(OMPClause *));
1162 void *Mem = C.Allocate(
1163 Size + sizeof(OMPClause *) * NumClauses +
1164 sizeof(Stmt *) *
1165 numLoopChildren(CollapsedNum, OMPD_distribute_parallel_for_simd));
1166 return new (Mem)
1167 OMPDistributeParallelForSimdDirective(CollapsedNum, NumClauses);
1168 }
1169
1170 OMPDistributeSimdDirective *OMPDistributeSimdDirective::Create(
1171 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1172 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1173 const HelperExprs &Exprs) {
1174 unsigned Size =
1175 llvm::alignTo(sizeof(OMPDistributeSimdDirective), alignof(OMPClause *));
1176 void *Mem = C.Allocate(
1177 Size + sizeof(OMPClause *) * Clauses.size() +
1178 sizeof(Stmt *) *
1179 numLoopChildren(CollapsedNum, OMPD_distribute_simd));
1180 OMPDistributeSimdDirective *Dir = new (Mem) OMPDistributeSimdDirective(
1181 StartLoc, EndLoc, CollapsedNum, Clauses.size());
1182 Dir->setClauses(Clauses);
1183 Dir->setAssociatedStmt(AssociatedStmt);
1184 Dir->setIterationVariable(Exprs.IterationVarRef);
1185 Dir->setLastIteration(Exprs.LastIteration);
1186 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1187 Dir->setPreCond(Exprs.PreCond);
1188 Dir->setCond(Exprs.Cond);
1189 Dir->setInit(Exprs.Init);
1190 Dir->setInc(Exprs.Inc);
1191 Dir->setIsLastIterVariable(Exprs.IL);
1192 Dir->setLowerBoundVariable(Exprs.LB);
1193 Dir->setUpperBoundVariable(Exprs.UB);
1194 Dir->setStrideVariable(Exprs.ST);
1195 Dir->setEnsureUpperBound(Exprs.EUB);
1196 Dir->setNextLowerBound(Exprs.NLB);
1197 Dir->setNextUpperBound(Exprs.NUB);
1198 Dir->setNumIterations(Exprs.NumIterations);
1199 Dir->setCounters(Exprs.Counters);
1200 Dir->setPrivateCounters(Exprs.PrivateCounters);
1201 Dir->setInits(Exprs.Inits);
1202 Dir->setUpdates(Exprs.Updates);
1203 Dir->setFinals(Exprs.Finals);
1204 Dir->setPreInits(Exprs.PreInits);
1205 return Dir;
1206 }
1207
1208 OMPDistributeSimdDirective *
1209 OMPDistributeSimdDirective::CreateEmpty(const ASTContext &C,
1210 unsigned NumClauses,
1211 unsigned CollapsedNum, EmptyShell) {
1212 unsigned Size =
1213 llvm::alignTo(sizeof(OMPDistributeSimdDirective), alignof(OMPClause *));
1214 void *Mem = C.Allocate(
1215 Size + sizeof(OMPClause *) * NumClauses +
1216 sizeof(Stmt *) *
1217 numLoopChildren(CollapsedNum, OMPD_distribute_simd));
1218 return new (Mem) OMPDistributeSimdDirective(CollapsedNum, NumClauses);
1219 }
1220
1221 OMPTargetParallelForSimdDirective *OMPTargetParallelForSimdDirective::Create(
1222 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1223 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1224 const HelperExprs &Exprs) {
1225 unsigned Size = llvm::alignTo(sizeof(OMPTargetParallelForSimdDirective),
1226 alignof(OMPClause *));
1227 void *Mem = C.Allocate(
1228 Size + sizeof(OMPClause *) * Clauses.size() +
1229 sizeof(Stmt *) *
1230 numLoopChildren(CollapsedNum, OMPD_target_parallel_for_simd));
1231 OMPTargetParallelForSimdDirective *Dir =
1232 new (Mem) OMPTargetParallelForSimdDirective(StartLoc, EndLoc,
1233 CollapsedNum, Clauses.size());
1234 Dir->setClauses(Clauses);
1235 Dir->setAssociatedStmt(AssociatedStmt);
1236 Dir->setIterationVariable(Exprs.IterationVarRef);
1237 Dir->setLastIteration(Exprs.LastIteration);
1238 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1239 Dir->setPreCond(Exprs.PreCond);
1240 Dir->setCond(Exprs.Cond);
1241 Dir->setInit(Exprs.Init);
1242 Dir->setInc(Exprs.Inc);
1243 Dir->setIsLastIterVariable(Exprs.IL);
1244 Dir->setLowerBoundVariable(Exprs.LB);
1245 Dir->setUpperBoundVariable(Exprs.UB);
1246 Dir->setStrideVariable(Exprs.ST);
1247 Dir->setEnsureUpperBound(Exprs.EUB);
1248 Dir->setNextLowerBound(Exprs.NLB);
1249 Dir->setNextUpperBound(Exprs.NUB);
1250 Dir->setNumIterations(Exprs.NumIterations);
1251 Dir->setCounters(Exprs.Counters);
1252 Dir->setPrivateCounters(Exprs.PrivateCounters);
1253 Dir->setInits(Exprs.Inits);
1254 Dir->setUpdates(Exprs.Updates);
1255 Dir->setFinals(Exprs.Finals);
1256 Dir->setPreInits(Exprs.PreInits);
1257 return Dir;
1258 }
1259
1260 OMPTargetParallelForSimdDirective *
1261 OMPTargetParallelForSimdDirective::CreateEmpty(const ASTContext &C,
1262 unsigned NumClauses,
1263 unsigned CollapsedNum,
1264 EmptyShell) {
1265 unsigned Size = llvm::alignTo(sizeof(OMPTargetParallelForSimdDirective),
1266 alignof(OMPClause *));
1267 void *Mem = C.Allocate(
1268 Size + sizeof(OMPClause *) * NumClauses +
1269 sizeof(Stmt *) *
1270 numLoopChildren(CollapsedNum, OMPD_target_parallel_for_simd));
1271 return new (Mem) OMPTargetParallelForSimdDirective(CollapsedNum, NumClauses);
1272 }
1273
1274 OMPTargetSimdDirective *
1275 OMPTargetSimdDirective::Create(const ASTContext &C, SourceLocation StartLoc,
1276 SourceLocation EndLoc, unsigned CollapsedNum,
1277 ArrayRef<OMPClause *> Clauses,
1278 Stmt *AssociatedStmt, const HelperExprs &Exprs) {
1279 unsigned Size =
1280 llvm::alignTo(sizeof(OMPTargetSimdDirective), alignof(OMPClause *));
1281 void *Mem = C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() +
1282 sizeof(Stmt *) *
1283 numLoopChildren(CollapsedNum, OMPD_target_simd));
1284 OMPTargetSimdDirective *Dir = new (Mem)
1285 OMPTargetSimdDirective(StartLoc, EndLoc, CollapsedNum, Clauses.size());
1286 Dir->setClauses(Clauses);
1287 Dir->setAssociatedStmt(AssociatedStmt);
1288 Dir->setIterationVariable(Exprs.IterationVarRef);
1289 Dir->setLastIteration(Exprs.LastIteration);
1290 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1291 Dir->setPreCond(Exprs.PreCond);
1292 Dir->setCond(Exprs.Cond);
1293 Dir->setInit(Exprs.Init);
1294 Dir->setInc(Exprs.Inc);
1295 Dir->setCounters(Exprs.Counters);
1296 Dir->setPrivateCounters(Exprs.PrivateCounters);
1297 Dir->setInits(Exprs.Inits);
1298 Dir->setUpdates(Exprs.Updates);
1299 Dir->setFinals(Exprs.Finals);
1300 Dir->setPreInits(Exprs.PreInits);
1301 return Dir;
1302 }
1303
1304 OMPTargetSimdDirective *
1305 OMPTargetSimdDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses,
1306 unsigned CollapsedNum, EmptyShell) {
1307 unsigned Size =
1308 llvm::alignTo(sizeof(OMPTargetSimdDirective), alignof(OMPClause *));
1309 void *Mem = C.Allocate(Size + sizeof(OMPClause *) * NumClauses +
1310 sizeof(Stmt *) *
1311 numLoopChildren(CollapsedNum, OMPD_target_simd));
1312 return new (Mem) OMPTargetSimdDirective(CollapsedNum, NumClauses);
1313 }
1314
1315 OMPTeamsDistributeDirective *OMPTeamsDistributeDirective::Create(
1316 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1317 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1318 const HelperExprs &Exprs) {
1319 unsigned Size =
1320 llvm::alignTo(sizeof(OMPTeamsDistributeDirective), alignof(OMPClause *));
1321 void *Mem = C.Allocate(
1322 Size + sizeof(OMPClause *) * Clauses.size() +
1323 sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_teams_distribute));
1324 OMPTeamsDistributeDirective *Dir = new (Mem) OMPTeamsDistributeDirective(
1325 StartLoc, EndLoc, CollapsedNum, Clauses.size());
1326 Dir->setClauses(Clauses);
1327 Dir->setAssociatedStmt(AssociatedStmt);
1328 Dir->setIterationVariable(Exprs.IterationVarRef);
1329 Dir->setLastIteration(Exprs.LastIteration);
1330 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1331 Dir->setPreCond(Exprs.PreCond);
1332 Dir->setCond(Exprs.Cond);
1333 Dir->setInit(Exprs.Init);
1334 Dir->setInc(Exprs.Inc);
1335 Dir->setIsLastIterVariable(Exprs.IL);
1336 Dir->setLowerBoundVariable(Exprs.LB);
1337 Dir->setUpperBoundVariable(Exprs.UB);
1338 Dir->setStrideVariable(Exprs.ST);
1339 Dir->setEnsureUpperBound(Exprs.EUB);
1340 Dir->setNextLowerBound(Exprs.NLB);
1341 Dir->setNextUpperBound(Exprs.NUB);
1342 Dir->setNumIterations(Exprs.NumIterations);
1343 Dir->setCounters(Exprs.Counters);
1344 Dir->setPrivateCounters(Exprs.PrivateCounters);
1345 Dir->setInits(Exprs.Inits);
1346 Dir->setUpdates(Exprs.Updates);
1347 Dir->setFinals(Exprs.Finals);
1348 Dir->setPreInits(Exprs.PreInits);
1349 return Dir;
1350 }
1351
1352 OMPTeamsDistributeDirective *
1353 OMPTeamsDistributeDirective::CreateEmpty(const ASTContext &C,
1354 unsigned NumClauses,
1355 unsigned CollapsedNum, EmptyShell) {
1356 unsigned Size =
1357 llvm::alignTo(sizeof(OMPTeamsDistributeDirective), alignof(OMPClause *));
1358 void *Mem = C.Allocate(
1359 Size + sizeof(OMPClause *) * NumClauses +
1360 sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_teams_distribute));
1361 return new (Mem) OMPTeamsDistributeDirective(CollapsedNum, NumClauses);
1362 }
1363
1364 OMPTeamsDistributeSimdDirective *OMPTeamsDistributeSimdDirective::Create(
1365 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1366 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1367 const HelperExprs &Exprs) {
1368 unsigned Size = llvm::alignTo(sizeof(OMPTeamsDistributeSimdDirective),
1369 alignof(OMPClause *));
1370 void *Mem =
1371 C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() +
1372 sizeof(Stmt *) *
1373 numLoopChildren(CollapsedNum, OMPD_teams_distribute_simd));
1374 OMPTeamsDistributeSimdDirective *Dir =
1375 new (Mem) OMPTeamsDistributeSimdDirective(StartLoc, EndLoc, CollapsedNum,
1376 Clauses.size());
1377 Dir->setClauses(Clauses);
1378 Dir->setAssociatedStmt(AssociatedStmt);
1379 Dir->setIterationVariable(Exprs.IterationVarRef);
1380 Dir->setLastIteration(Exprs.LastIteration);
1381 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1382 Dir->setPreCond(Exprs.PreCond);
1383 Dir->setCond(Exprs.Cond);
1384 Dir->setInit(Exprs.Init);
1385 Dir->setInc(Exprs.Inc);
1386 Dir->setIsLastIterVariable(Exprs.IL);
1387 Dir->setLowerBoundVariable(Exprs.LB);
1388 Dir->setUpperBoundVariable(Exprs.UB);
1389 Dir->setStrideVariable(Exprs.ST);
1390 Dir->setEnsureUpperBound(Exprs.EUB);
1391 Dir->setNextLowerBound(Exprs.NLB);
1392 Dir->setNextUpperBound(Exprs.NUB);
1393 Dir->setNumIterations(Exprs.NumIterations);
1394 Dir->setCounters(Exprs.Counters);
1395 Dir->setPrivateCounters(Exprs.PrivateCounters);
1396 Dir->setInits(Exprs.Inits);
1397 Dir->setUpdates(Exprs.Updates);
1398 Dir->setFinals(Exprs.Finals);
1399 Dir->setPreInits(Exprs.PreInits);
1400 return Dir;
1401 }
1402
1403 OMPTeamsDistributeSimdDirective *OMPTeamsDistributeSimdDirective::CreateEmpty(
1404 const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum,
1405 EmptyShell) {
1406 unsigned Size = llvm::alignTo(sizeof(OMPTeamsDistributeSimdDirective),
1407 alignof(OMPClause *));
1408 void *Mem =
1409 C.Allocate(Size + sizeof(OMPClause *) * NumClauses +
1410 sizeof(Stmt *) *
1411 numLoopChildren(CollapsedNum, OMPD_teams_distribute_simd));
1412 return new (Mem) OMPTeamsDistributeSimdDirective(CollapsedNum, NumClauses);
1413 }
1414
1415 OMPTeamsDistributeParallelForSimdDirective *
1416 OMPTeamsDistributeParallelForSimdDirective::Create(
1417 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1418 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1419 const HelperExprs &Exprs) {
1420 auto Size = llvm::alignTo(sizeof(OMPTeamsDistributeParallelForSimdDirective),
1421 alignof(OMPClause *));
1422 void *Mem =
1423 C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() +
1424 sizeof(Stmt *) *
1425 numLoopChildren(CollapsedNum,
1426 OMPD_teams_distribute_parallel_for_simd));
1427 OMPTeamsDistributeParallelForSimdDirective *Dir = new (Mem)
1428 OMPTeamsDistributeParallelForSimdDirective(StartLoc, EndLoc, CollapsedNum,
1429 Clauses.size());
1430 Dir->setClauses(Clauses);
1431 Dir->setAssociatedStmt(AssociatedStmt);
1432 Dir->setIterationVariable(Exprs.IterationVarRef);
1433 Dir->setLastIteration(Exprs.LastIteration);
1434 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1435 Dir->setPreCond(Exprs.PreCond);
1436 Dir->setCond(Exprs.Cond);
1437 Dir->setInit(Exprs.Init);
1438 Dir->setInc(Exprs.Inc);
1439 Dir->setIsLastIterVariable(Exprs.IL);
1440 Dir->setLowerBoundVariable(Exprs.LB);
1441 Dir->setUpperBoundVariable(Exprs.UB);
1442 Dir->setStrideVariable(Exprs.ST);
1443 Dir->setEnsureUpperBound(Exprs.EUB);
1444 Dir->setNextLowerBound(Exprs.NLB);
1445 Dir->setNextUpperBound(Exprs.NUB);
1446 Dir->setNumIterations(Exprs.NumIterations);
1447 Dir->setPrevLowerBoundVariable(Exprs.PrevLB);
1448 Dir->setPrevUpperBoundVariable(Exprs.PrevUB);
1449 Dir->setDistInc(Exprs.DistInc);
1450 Dir->setPrevEnsureUpperBound(Exprs.PrevEUB);
1451 Dir->setCounters(Exprs.Counters);
1452 Dir->setPrivateCounters(Exprs.PrivateCounters);
1453 Dir->setInits(Exprs.Inits);
1454 Dir->setUpdates(Exprs.Updates);
1455 Dir->setFinals(Exprs.Finals);
1456 Dir->setPreInits(Exprs.PreInits);
1457 Dir->setCombinedLowerBoundVariable(Exprs.DistCombinedFields.LB);
1458 Dir->setCombinedUpperBoundVariable(Exprs.DistCombinedFields.UB);
1459 Dir->setCombinedEnsureUpperBound(Exprs.DistCombinedFields.EUB);
1460 Dir->setCombinedInit(Exprs.DistCombinedFields.Init);
1461 Dir->setCombinedCond(Exprs.DistCombinedFields.Cond);
1462 Dir->setCombinedNextLowerBound(Exprs.DistCombinedFields.NLB);
1463 Dir->setCombinedNextUpperBound(Exprs.DistCombinedFields.NUB);
1464 Dir->setCombinedDistCond(Exprs.DistCombinedFields.DistCond);
1465 Dir->setCombinedParForInDistCond(Exprs.DistCombinedFields.ParForInDistCond);
1466 return Dir;
1467 }
1468
1469 OMPTeamsDistributeParallelForSimdDirective *
1470 OMPTeamsDistributeParallelForSimdDirective::CreateEmpty(const ASTContext &C,
1471 unsigned NumClauses,
1472 unsigned CollapsedNum,
1473 EmptyShell) {
1474 auto Size = llvm::alignTo(sizeof(OMPTeamsDistributeParallelForSimdDirective),
1475 alignof(OMPClause *));
1476 void *Mem =
1477 C.Allocate(Size + sizeof(OMPClause *) * NumClauses +
1478 sizeof(Stmt *) *
1479 numLoopChildren(CollapsedNum,
1480 OMPD_teams_distribute_parallel_for_simd));
1481 return new (Mem)
1482 OMPTeamsDistributeParallelForSimdDirective(CollapsedNum, NumClauses);
1483 }
1484
1485 OMPTeamsDistributeParallelForDirective *
1486 OMPTeamsDistributeParallelForDirective::Create(
1487 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1488 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1489 const HelperExprs &Exprs, bool HasCancel) {
1490 auto Size = llvm::alignTo(sizeof(OMPTeamsDistributeParallelForDirective),
1491 alignof(OMPClause *));
1492 void *Mem = C.Allocate(
1493 Size + sizeof(OMPClause *) * Clauses.size() +
1494 sizeof(Stmt *) *
1495 numLoopChildren(CollapsedNum, OMPD_teams_distribute_parallel_for));
1496 OMPTeamsDistributeParallelForDirective *Dir = new (Mem)
1497 OMPTeamsDistributeParallelForDirective(StartLoc, EndLoc, CollapsedNum,
1498 Clauses.size());
1499 Dir->setClauses(Clauses);
1500 Dir->setAssociatedStmt(AssociatedStmt);
1501 Dir->setIterationVariable(Exprs.IterationVarRef);
1502 Dir->setLastIteration(Exprs.LastIteration);
1503 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1504 Dir->setPreCond(Exprs.PreCond);
1505 Dir->setCond(Exprs.Cond);
1506 Dir->setInit(Exprs.Init);
1507 Dir->setInc(Exprs.Inc);
1508 Dir->setIsLastIterVariable(Exprs.IL);
1509 Dir->setLowerBoundVariable(Exprs.LB);
1510 Dir->setUpperBoundVariable(Exprs.UB);
1511 Dir->setStrideVariable(Exprs.ST);
1512 Dir->setEnsureUpperBound(Exprs.EUB);
1513 Dir->setNextLowerBound(Exprs.NLB);
1514 Dir->setNextUpperBound(Exprs.NUB);
1515 Dir->setNumIterations(Exprs.NumIterations);
1516 Dir->setPrevLowerBoundVariable(Exprs.PrevLB);
1517 Dir->setPrevUpperBoundVariable(Exprs.PrevUB);
1518 Dir->setDistInc(Exprs.DistInc);
1519 Dir->setPrevEnsureUpperBound(Exprs.PrevEUB);
1520 Dir->setCounters(Exprs.Counters);
1521 Dir->setPrivateCounters(Exprs.PrivateCounters);
1522 Dir->setInits(Exprs.Inits);
1523 Dir->setUpdates(Exprs.Updates);
1524 Dir->setFinals(Exprs.Finals);
1525 Dir->setPreInits(Exprs.PreInits);
1526 Dir->setCombinedLowerBoundVariable(Exprs.DistCombinedFields.LB);
1527 Dir->setCombinedUpperBoundVariable(Exprs.DistCombinedFields.UB);
1528 Dir->setCombinedEnsureUpperBound(Exprs.DistCombinedFields.EUB);
1529 Dir->setCombinedInit(Exprs.DistCombinedFields.Init);
1530 Dir->setCombinedCond(Exprs.DistCombinedFields.Cond);
1531 Dir->setCombinedNextLowerBound(Exprs.DistCombinedFields.NLB);
1532 Dir->setCombinedNextUpperBound(Exprs.DistCombinedFields.NUB);
1533 Dir->setCombinedDistCond(Exprs.DistCombinedFields.DistCond);
1534 Dir->setCombinedParForInDistCond(Exprs.DistCombinedFields.ParForInDistCond);
1535 Dir->HasCancel = HasCancel;
1536 return Dir;
1537 }
1538
1539 OMPTeamsDistributeParallelForDirective *
1540 OMPTeamsDistributeParallelForDirective::CreateEmpty(const ASTContext &C,
1541 unsigned NumClauses,
1542 unsigned CollapsedNum,
1543 EmptyShell) {
1544 auto Size = llvm::alignTo(sizeof(OMPTeamsDistributeParallelForDirective),
1545 alignof(OMPClause *));
1546 void *Mem = C.Allocate(
1547 Size + sizeof(OMPClause *) * NumClauses +
1548 sizeof(Stmt *) *
1549 numLoopChildren(CollapsedNum, OMPD_teams_distribute_parallel_for));
1550 return new (Mem)
1551 OMPTeamsDistributeParallelForDirective(CollapsedNum, NumClauses);
1552 }
1553
1554 OMPTargetTeamsDirective *OMPTargetTeamsDirective::Create(
1555 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1556 ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt) {
1557 auto Size =
1558 llvm::alignTo(sizeof(OMPTargetTeamsDirective), alignof(OMPClause *));
1559 void *Mem =
1560 C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *));
1561 OMPTargetTeamsDirective *Dir =
1562 new (Mem) OMPTargetTeamsDirective(StartLoc, EndLoc, Clauses.size());
1563 Dir->setClauses(Clauses);
1564 Dir->setAssociatedStmt(AssociatedStmt);
1565 return Dir;
1566 }
1567
1568 OMPTargetTeamsDirective *
1569 OMPTargetTeamsDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses,
1570 EmptyShell) {
1571 auto Size =
1572 llvm::alignTo(sizeof(OMPTargetTeamsDirective), alignof(OMPClause *));
1573 void *Mem =
1574 C.Allocate(Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *));
1575 return new (Mem) OMPTargetTeamsDirective(NumClauses);
1576 }
1577
1578 OMPTargetTeamsDistributeDirective *OMPTargetTeamsDistributeDirective::Create(
1579 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1580 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1581 const HelperExprs &Exprs) {
1582 auto Size = llvm::alignTo(sizeof(OMPTargetTeamsDistributeDirective),
1583 alignof(OMPClause *));
1584 void *Mem = C.Allocate(
1585 Size + sizeof(OMPClause *) * Clauses.size() +
1586 sizeof(Stmt *) *
1587 numLoopChildren(CollapsedNum, OMPD_target_teams_distribute));
1588 OMPTargetTeamsDistributeDirective *Dir =
1589 new (Mem) OMPTargetTeamsDistributeDirective(StartLoc, EndLoc, CollapsedNum,
1590 Clauses.size());
1591 Dir->setClauses(Clauses);
1592 Dir->setAssociatedStmt(AssociatedStmt);
1593 Dir->setIterationVariable(Exprs.IterationVarRef);
1594 Dir->setLastIteration(Exprs.LastIteration);
1595 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1596 Dir->setPreCond(Exprs.PreCond);
1597 Dir->setCond(Exprs.Cond);
1598 Dir->setInit(Exprs.Init);
1599 Dir->setInc(Exprs.Inc);
1600 Dir->setIsLastIterVariable(Exprs.IL);
1601 Dir->setLowerBoundVariable(Exprs.LB);
1602 Dir->setUpperBoundVariable(Exprs.UB);
1603 Dir->setStrideVariable(Exprs.ST);
1604 Dir->setEnsureUpperBound(Exprs.EUB);
1605 Dir->setNextLowerBound(Exprs.NLB);
1606 Dir->setNextUpperBound(Exprs.NUB);
1607 Dir->setNumIterations(Exprs.NumIterations);
1608 Dir->setCounters(Exprs.Counters);
1609 Dir->setPrivateCounters(Exprs.PrivateCounters);
1610 Dir->setInits(Exprs.Inits);
1611 Dir->setUpdates(Exprs.Updates);
1612 Dir->setFinals(Exprs.Finals);
1613 Dir->setPreInits(Exprs.PreInits);
1614 return Dir;
1615 }
1616
1617 OMPTargetTeamsDistributeDirective *
1618 OMPTargetTeamsDistributeDirective::CreateEmpty(const ASTContext &C,
1619 unsigned NumClauses,
1620 unsigned CollapsedNum,
1621 EmptyShell) {
1622 auto Size = llvm::alignTo(sizeof(OMPTargetTeamsDistributeDirective),
1623 alignof(OMPClause *));
1624 void *Mem = C.Allocate(
1625 Size + sizeof(OMPClause *) * NumClauses +
1626 sizeof(Stmt *) *
1627 numLoopChildren(CollapsedNum, OMPD_target_teams_distribute));
1628 return new (Mem) OMPTargetTeamsDistributeDirective(CollapsedNum, NumClauses);
1629 }
1630
1631 OMPTargetTeamsDistributeParallelForDirective *
1632 OMPTargetTeamsDistributeParallelForDirective::Create(
1633 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1634 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1635 const HelperExprs &Exprs, bool HasCancel) {
1636 auto Size =
1637 llvm::alignTo(sizeof(OMPTargetTeamsDistributeParallelForDirective),
1638 alignof(OMPClause *));
1639 void *Mem = C.Allocate(
1640 Size + sizeof(OMPClause *) * Clauses.size() +
1641 sizeof(Stmt *) *
1642 numLoopChildren(CollapsedNum,
1643 OMPD_target_teams_distribute_parallel_for));
1644 OMPTargetTeamsDistributeParallelForDirective *Dir =
1645 new (Mem) OMPTargetTeamsDistributeParallelForDirective(
1646 StartLoc, EndLoc, CollapsedNum, Clauses.size());
1647 Dir->setClauses(Clauses);
1648 Dir->setAssociatedStmt(AssociatedStmt);
1649 Dir->setIterationVariable(Exprs.IterationVarRef);
1650 Dir->setLastIteration(Exprs.LastIteration);
1651 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1652 Dir->setPreCond(Exprs.PreCond);
1653 Dir->setCond(Exprs.Cond);
1654 Dir->setInit(Exprs.Init);
1655 Dir->setInc(Exprs.Inc);
1656 Dir->setIsLastIterVariable(Exprs.IL);
1657 Dir->setLowerBoundVariable(Exprs.LB);
1658 Dir->setUpperBoundVariable(Exprs.UB);
1659 Dir->setStrideVariable(Exprs.ST);
1660 Dir->setEnsureUpperBound(Exprs.EUB);
1661 Dir->setNextLowerBound(Exprs.NLB);
1662 Dir->setNextUpperBound(Exprs.NUB);
1663 Dir->setNumIterations(Exprs.NumIterations);
1664 Dir->setPrevLowerBoundVariable(Exprs.PrevLB);
1665 Dir->setPrevUpperBoundVariable(Exprs.PrevUB);
1666 Dir->setDistInc(Exprs.DistInc);
1667 Dir->setPrevEnsureUpperBound(Exprs.PrevEUB);
1668 Dir->setCounters(Exprs.Counters);
1669 Dir->setPrivateCounters(Exprs.PrivateCounters);
1670 Dir->setInits(Exprs.Inits);
1671 Dir->setUpdates(Exprs.Updates);
1672 Dir->setFinals(Exprs.Finals);
1673 Dir->setPreInits(Exprs.PreInits);
1674 Dir->setCombinedLowerBoundVariable(Exprs.DistCombinedFields.LB);
1675 Dir->setCombinedUpperBoundVariable(Exprs.DistCombinedFields.UB);
1676 Dir->setCombinedEnsureUpperBound(Exprs.DistCombinedFields.EUB);
1677 Dir->setCombinedInit(Exprs.DistCombinedFields.Init);
1678 Dir->setCombinedCond(Exprs.DistCombinedFields.Cond);
1679 Dir->setCombinedNextLowerBound(Exprs.DistCombinedFields.NLB);
1680 Dir->setCombinedNextUpperBound(Exprs.DistCombinedFields.NUB);
1681 Dir->setCombinedDistCond(Exprs.DistCombinedFields.DistCond);
1682 Dir->setCombinedParForInDistCond(Exprs.DistCombinedFields.ParForInDistCond);
1683 Dir->HasCancel = HasCancel;
1684 return Dir;
1685 }
1686
1687 OMPTargetTeamsDistributeParallelForDirective *
1688 OMPTargetTeamsDistributeParallelForDirective::CreateEmpty(const ASTContext &C,
1689 unsigned NumClauses,
1690 unsigned CollapsedNum,
1691 EmptyShell) {
1692 auto Size =
1693 llvm::alignTo(sizeof(OMPTargetTeamsDistributeParallelForDirective),
1694 alignof(OMPClause *));
1695 void *Mem = C.Allocate(
1696 Size + sizeof(OMPClause *) * NumClauses +
1697 sizeof(Stmt *) *
1698 numLoopChildren(CollapsedNum,
1699 OMPD_target_teams_distribute_parallel_for));
1700 return new (Mem)
1701 OMPTargetTeamsDistributeParallelForDirective(CollapsedNum, NumClauses);
1702 }
1703
1704 OMPTargetTeamsDistributeParallelForSimdDirective *
1705 OMPTargetTeamsDistributeParallelForSimdDirective::Create(
1706 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1707 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1708 const HelperExprs &Exprs) {
1709 auto Size =
1710 llvm::alignTo(sizeof(OMPTargetTeamsDistributeParallelForSimdDirective),
1711 alignof(OMPClause *));
1712 void *Mem = C.Allocate(
1713 Size + sizeof(OMPClause *) * Clauses.size() +
1714 sizeof(Stmt *) *
1715 numLoopChildren(CollapsedNum,
1716 OMPD_target_teams_distribute_parallel_for_simd));
1717 OMPTargetTeamsDistributeParallelForSimdDirective *Dir =
1718 new (Mem) OMPTargetTeamsDistributeParallelForSimdDirective(
1719 StartLoc, EndLoc, CollapsedNum, Clauses.size());
1720 Dir->setClauses(Clauses);
1721 Dir->setAssociatedStmt(AssociatedStmt);
1722 Dir->setIterationVariable(Exprs.IterationVarRef);
1723 Dir->setLastIteration(Exprs.LastIteration);
1724 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1725 Dir->setPreCond(Exprs.PreCond);
1726 Dir->setCond(Exprs.Cond);
1727 Dir->setInit(Exprs.Init);
1728 Dir->setInc(Exprs.Inc);
1729 Dir->setIsLastIterVariable(Exprs.IL);
1730 Dir->setLowerBoundVariable(Exprs.LB);
1731 Dir->setUpperBoundVariable(Exprs.UB);
1732 Dir->setStrideVariable(Exprs.ST);
1733 Dir->setEnsureUpperBound(Exprs.EUB);
1734 Dir->setNextLowerBound(Exprs.NLB);
1735 Dir->setNextUpperBound(Exprs.NUB);
1736 Dir->setNumIterations(Exprs.NumIterations);
1737 Dir->setPrevLowerBoundVariable(Exprs.PrevLB);
1738 Dir->setPrevUpperBoundVariable(Exprs.PrevUB);
1739 Dir->setDistInc(Exprs.DistInc);
1740 Dir->setPrevEnsureUpperBound(Exprs.PrevEUB);
1741 Dir->setCounters(Exprs.Counters);
1742 Dir->setPrivateCounters(Exprs.PrivateCounters);
1743 Dir->setInits(Exprs.Inits);
1744 Dir->setUpdates(Exprs.Updates);
1745 Dir->setFinals(Exprs.Finals);
1746 Dir->setPreInits(Exprs.PreInits);
1747 Dir->setCombinedLowerBoundVariable(Exprs.DistCombinedFields.LB);
1748 Dir->setCombinedUpperBoundVariable(Exprs.DistCombinedFields.UB);
1749 Dir->setCombinedEnsureUpperBound(Exprs.DistCombinedFields.EUB);
1750 Dir->setCombinedInit(Exprs.DistCombinedFields.Init);
1751 Dir->setCombinedCond(Exprs.DistCombinedFields.Cond);
1752 Dir->setCombinedNextLowerBound(Exprs.DistCombinedFields.NLB);
1753 Dir->setCombinedNextUpperBound(Exprs.DistCombinedFields.NUB);
1754 Dir->setCombinedDistCond(Exprs.DistCombinedFields.DistCond);
1755 Dir->setCombinedParForInDistCond(Exprs.DistCombinedFields.ParForInDistCond);
1756 return Dir;
1757 }
1758
1759 OMPTargetTeamsDistributeParallelForSimdDirective *
1760 OMPTargetTeamsDistributeParallelForSimdDirective::CreateEmpty(
1761 const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum,
1762 EmptyShell) {
1763 auto Size =
1764 llvm::alignTo(sizeof(OMPTargetTeamsDistributeParallelForSimdDirective),
1765 alignof(OMPClause *));
1766 void *Mem = C.Allocate(
1767 Size + sizeof(OMPClause *) * NumClauses +
1768 sizeof(Stmt *) *
1769 numLoopChildren(CollapsedNum,
1770 OMPD_target_teams_distribute_parallel_for_simd));
1771 return new (Mem) OMPTargetTeamsDistributeParallelForSimdDirective(
1772 CollapsedNum, NumClauses);
1773 }
1774
1775 OMPTargetTeamsDistributeSimdDirective *
1776 OMPTargetTeamsDistributeSimdDirective::Create(
1777 const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
1778 unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt,
1779 const HelperExprs &Exprs) {
1780 auto Size = llvm::alignTo(sizeof(OMPTargetTeamsDistributeSimdDirective),
1781 alignof(OMPClause *));
1782 void *Mem = C.Allocate(
1783 Size + sizeof(OMPClause *) * Clauses.size() +
1784 sizeof(Stmt *) *
1785 numLoopChildren(CollapsedNum, OMPD_target_teams_distribute_simd));
1786 OMPTargetTeamsDistributeSimdDirective *Dir = new (Mem)
1787 OMPTargetTeamsDistributeSimdDirective(StartLoc, EndLoc, CollapsedNum,
1788 Clauses.size());
1789 Dir->setClauses(Clauses);
1790 Dir->setAssociatedStmt(AssociatedStmt);
1791 Dir->setIterationVariable(Exprs.IterationVarRef);
1792 Dir->setLastIteration(Exprs.LastIteration);
1793 Dir->setCalcLastIteration(Exprs.CalcLastIteration);
1794 Dir->setPreCond(Exprs.PreCond);
1795 Dir->setCond(Exprs.Cond);
1796 Dir->setInit(Exprs.Init);
1797 Dir->setInc(Exprs.Inc);
1798 Dir->setIsLastIterVariable(Exprs.IL);
1799 Dir->setLowerBoundVariable(Exprs.LB);
1800 Dir->setUpperBoundVariable(Exprs.UB);
1801 Dir->setStrideVariable(Exprs.ST);
1802 Dir->setEnsureUpperBound(Exprs.EUB);
1803 Dir->setNextLowerBound(Exprs.NLB);
1804 Dir->setNextUpperBound(Exprs.NUB);
1805 Dir->setNumIterations(Exprs.NumIterations);
1806 Dir->setCounters(Exprs.Counters);
1807 Dir->setPrivateCounters(Exprs.PrivateCounters);
1808 Dir->setInits(Exprs.Inits);
1809 Dir->setUpdates(Exprs.Updates);
1810 Dir->setFinals(Exprs.Finals);
1811 Dir->setPreInits(Exprs.PreInits);
1812 return Dir;
1813 }
1814
1815 OMPTargetTeamsDistributeSimdDirective *
1816 OMPTargetTeamsDistributeSimdDirective::CreateEmpty(const ASTContext &C,
1817 unsigned NumClauses,
1818 unsigned CollapsedNum,
1819 EmptyShell) {
1820 auto Size = llvm::alignTo(sizeof(OMPTargetTeamsDistributeSimdDirective),
1821 alignof(OMPClause *));
1822 void *Mem = C.Allocate(
1823 Size + sizeof(OMPClause *) * NumClauses +
1824 sizeof(Stmt *) *
1825 numLoopChildren(CollapsedNum, OMPD_target_teams_distribute_simd));
1826 return new (Mem)
1827 OMPTargetTeamsDistributeSimdDirective(CollapsedNum, NumClauses);
1828 }
clang::OMPLoopDirective::setPreInits
void setPreInits(Stmt *PreInits)
Definition: StmtOpenMP.h:496
clang::OMPLoopDirective::setCombinedParForInDistCond
void setCombinedParForInDistCond(Expr *CombParForInDistCond)
Definition: StmtOpenMP.h:615
clang::OMPLoopDirective::HelperExprs::NLB
Expr * NLB
Update of LowerBound for statically scheduled &#39;omp for&#39; loops.
Definition: StmtOpenMP.h:692
ASTContext.h
Defines the clang::ASTContext interface.
clang::OMPDistributeSimdDirective
This represents &#39;#pragma omp distribute simd&#39; composite directive.
Definition: StmtOpenMP.h:3248
clang::OMPLoopDirective::HelperExprs::Finals
SmallVector< Expr *, 4 > Finals
Final loop counter values for GodeGen.
Definition: StmtOpenMP.h:720
clang::OMPMasterDirective
This represents &#39;#pragma omp master&#39; directive.
Definition: StmtOpenMP.h:1431
clang::OMPLoopDirective::DistCombinedHelperExprs::NUB
Expr * NUB
Update of UpperBound for statically scheduled omp loops for outer loop in combined constructs (e...
Definition: StmtOpenMP.h:652
clang::OMPLoopDirective::HelperExprs::Updates
SmallVector< Expr *, 4 > Updates
Expressions for loop counters update for CodeGen.
Definition: StmtOpenMP.h:718
clang::OMPTaskDirective
This represents &#39;#pragma omp task&#39; directive.
Definition: StmtOpenMP.h:1771
clang::OMPLoopDirective::setEnsureUpperBound
void setEnsureUpperBound(Expr *EUB)
Definition: StmtOpenMP.h:527
clang::OMPMasterDirective::CreateEmpty
static OMPMasterDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:303
clang::OMPDistributeParallelForDirective::Create
static OMPDistributeParallelForDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause *> Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel)
Creates directive with a list of Clauses.
Definition: StmtOpenMP.cpp:1035
clang::OMPAtomicDirective::Create
static OMPAtomicDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *X, Expr *V, Expr *E, Expr *UE, bool IsXLHSInRHSPart, bool IsPostfixUpdate)
Creates directive with a list of Clauses and &#39;x&#39;, &#39;v&#39; and &#39;expr&#39; parts of the atomic construct (see S...
Definition: StmtOpenMP.cpp:643
clang::OMPLoopDirective::setCombinedCond
void setCombinedCond(Expr *CombCond)
Definition: StmtOpenMP.h:595
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:840
clang::OMPLoopDirective::setCombinedLowerBoundVariable
void setCombinedLowerBoundVariable(Expr *CombLB)
Definition: StmtOpenMP.h:575
clang::OMPTaskwaitDirective::CreateEmpty
static OMPTaskwaitDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:519
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:715
clang::OMPSectionDirective::setHasCancel
void setHasCancel(bool Has)
Set cancel state.
Definition: StmtOpenMP.h:1358
clang::Stmt
Stmt - This represents one statement.
Definition: Stmt.h:66
clang::OMPTaskgroupDirective::CreateEmpty
static OMPTaskgroupDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:540
clang::OMPLoopDirective::setLastIteration
void setLastIteration(Expr *LI)
Definition: StmtOpenMP.h:482
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:525
clang::OMPLoopDirective::setPrivateCounters
void setPrivateCounters(ArrayRef< Expr *> A)
Definition: StmtOpenMP.cpp:32
clang::OMPTargetTeamsDistributeParallelForDirective::Create
static OMPTargetTeamsDistributeParallelForDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause *> Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel)
Creates directive with a list of Clauses.
Definition: StmtOpenMP.cpp:1632
clang::OMPForSimdDirective
This represents &#39;#pragma omp for simd&#39; directive.
Definition: StmtOpenMP.h:1181
clang::OMPLoopDirective::HelperExprs::EUB
Expr * EUB
EnsureUpperBound – expression UB = min(UB, NumIterations).
Definition: StmtOpenMP.h:690
clang::OMPLoopDirective::HelperExprs::DistInc
Expr * DistInc
DistInc - increment expression for distribute loop when found combined with a further loop level (e...
Definition: StmtOpenMP.h:704
clang::OMPTeamsDistributeParallelForDirective
This represents &#39;#pragma omp teams distribute parallel for&#39; composite directive.
Definition: StmtOpenMP.h:3659
clang::OMPSectionDirective::Create
static OMPSectionDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AssociatedStmt, bool HasCancel)
Creates directive.
Definition: StmtOpenMP.cpp:246
clang::OMPLoopDirective::setPrevEnsureUpperBound
void setPrevEnsureUpperBound(Expr *PrevEUB)
Definition: StmtOpenMP.h:570
clang::OMPLoopDirective::setUpperBoundVariable
void setUpperBoundVariable(Expr *UB)
Definition: StmtOpenMP.h:513
clang::OMPLoopDirective::setNumIterations
void setNumIterations(Expr *NI)
Definition: StmtOpenMP.h:548
clang::OMPTargetTeamsDistributeDirective
This represents &#39;#pragma omp target teams distribute&#39; combined directive.
Definition: StmtOpenMP.h:3796
clang::OMPLoopDirective::setNextLowerBound
void setNextLowerBound(Expr *NLB)
Definition: StmtOpenMP.h:534
clang::OMPParallelForDirective
This represents &#39;#pragma omp parallel for&#39; directive.
Definition: StmtOpenMP.h:1552
clang::OMPTargetTeamsDistributeParallelForDirective
This represents &#39;#pragma omp target teams distribute parallel for&#39; combined directive.
Definition: StmtOpenMP.h:3864
clang::OMPTeamsDistributeParallelForDirective::Create
static OMPTeamsDistributeParallelForDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause *> Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel)
Creates directive with a list of Clauses.
Definition: StmtOpenMP.cpp:1486
clang::OMPLoopDirective::setIsLastIterVariable
void setIsLastIterVariable(Expr *IL)
Definition: StmtOpenMP.h:499
clang::OMPLoopDirective::HelperExprs::PrevLB
Expr * PrevLB
PreviousLowerBound - local variable passed to runtime in the enclosing schedule or null if that does ...
Definition: StmtOpenMP.h:697
clang::OMPTargetExitDataDirective
This represents &#39;#pragma omp target exit data&#39; directive.
Definition: StmtOpenMP.h:2463
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:1816
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:1315
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:72
clang::OMPLoopDirective::setCombinedDistCond
void setCombinedDistCond(Expr *CombDistCond)
Definition: StmtOpenMP.h:610
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:1416
clang::OMPLoopDirective::setInit
void setInit(Expr *Init)
Definition: StmtOpenMP.h:494
clang::OMPLoopDirective::HelperExprs::LastIteration
Expr * LastIteration
Loop last iteration number.
Definition: StmtOpenMP.h:668
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:832
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:1221
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:1618
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:690
clang::OMPParallelDirective
This represents &#39;#pragma omp parallel&#39; directive.
Definition: StmtOpenMP.h:276
clang::ASTContext
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition: ASTContext.h:155
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:953
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:796
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:763
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:1011
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:608
clang::OMPTargetSimdDirective
This represents &#39;#pragma omp target simd&#39; directive.
Definition: StmtOpenMP.h:3384
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:459
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:963
clang::OMPBarrierDirective
This represents &#39;#pragma omp barrier&#39; directive.
Definition: StmtOpenMP.h:1883
clang::OMPCriticalDirective
This represents &#39;#pragma omp critical&#39; directive.
Definition: StmtOpenMP.h:1478
clang::OMPCriticalDirective::CreateEmpty
static OMPCriticalDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:325
clang::OMPLoopDirective::setCond
void setCond(Expr *Cond)
Definition: StmtOpenMP.h:491
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:903
clang::OMPDistributeParallelForDirective
This represents &#39;#pragma omp distribute parallel for&#39; composite directive.
Definition: StmtOpenMP.h:3099
clang::OMPTeamsDistributeParallelForSimdDirective
This represents &#39;#pragma omp teams distribute parallel for simd&#39; composite directive.
Definition: StmtOpenMP.h:3588
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:1209
clang::OMPLoopDirective::DistCombinedHelperExprs::LB
Expr * LB
DistributeLowerBound - used when composing &#39;omp distribute&#39; with &#39;omp for&#39; in a same construct...
Definition: StmtOpenMP.h:633
clang::OMPLoopDirective::DistCombinedHelperExprs::EUB
Expr * EUB
DistributeEnsureUpperBound - used when composing &#39;omp distribute&#39; with &#39;omp for&#39; in a same construct...
Definition: StmtOpenMP.h:639
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:1364
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:1688
clang::OMPCancellationPointDirective
This represents &#39;#pragma omp cancellation point&#39; directive.
Definition: StmtOpenMP.h:2718
clang::OMPLoopDirective::setCombinedInit
void setCombinedInit(Expr *CombInit)
Definition: StmtOpenMP.h:590
clang::getFinals
MutableArrayRef< Expr * > getFinals()
Sets the list of final update expressions for linear variables.
Definition: OpenMPClause.h:2689
clang::OMPTeamsDirective
This represents &#39;#pragma omp teams&#39; directive.
Definition: StmtOpenMP.h:2661
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:595
clang::OMPLoopDirective::HelperExprs::CalcLastIteration
Expr * CalcLastIteration
Calculation of last iteration.
Definition: StmtOpenMP.h:672
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:1578
clang::OMPTeamsDistributeSimdDirective
This represents &#39;#pragma omp teams distribute simd&#39; combined directive.
Definition: StmtOpenMP.h:3518
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:1261
clang::OMPTaskyieldDirective::CreateEmpty
static OMPTaskyieldDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:491
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:384
llvm::ArrayRef
Definition: LLVM.h:32
clang::OMPLoopDirective::HelperExprs::NUB
Expr * NUB
Update of UpperBound for statically scheduled &#39;omp for&#39; loops.
Definition: StmtOpenMP.h:694
clang::OMPLoopDirective::HelperExprs::Cond
Expr * Cond
Loop condition.
Definition: StmtOpenMP.h:676
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:1170
clang::OMPTargetParallelForDirective::Create
static OMPTargetParallelForDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause *> Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel)
Creates directive with a list of Clauses.
Definition: StmtOpenMP.cpp:724
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:787
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:1403
clang::OMPTargetParallelDirective::Create
static OMPTargetParallelDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause *> Clauses, Stmt *AssociatedStmt)
Creates directive with a list of Clauses.
Definition: StmtOpenMP.cpp:700
clang::OMPLoopDirective::HelperExprs::PreCond
Expr * PreCond
Loop pre-condition.
Definition: StmtOpenMP.h:674
clang::OMPTargetParallelForSimdDirective
This represents &#39;#pragma omp target parallel for simd&#39; directive.
Definition: StmtOpenMP.h:3316
clang::OMPLoopDirective::HelperExprs
The expressions built for the OpenMP loop CodeGen for the whole collapsed loop nest.
Definition: StmtOpenMP.h:664
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:1305
clang::OMPTaskgroupDirective
This represents &#39;#pragma omp taskgroup&#39; directive.
Definition: StmtOpenMP.h:1971
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:282
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:310
clang::OMPLoopDirective::DistCombinedHelperExprs::DistCond
Expr * DistCond
Distribute Loop condition used when composing &#39;omp distribute&#39; with &#39;omp for&#39; in a same construct whe...
Definition: StmtOpenMP.h:655
clang::OMPLoopDirective::HelperExprs::IterationVarRef
Expr * IterationVarRef
Loop iteration variable.
Definition: StmtOpenMP.h:666
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:1103
clang::OMPLoopDirective::DistCombinedHelperExprs::Init
Expr * Init
Distribute loop iteration variable init used when composing &#39;omp distribute&#39; with &#39;omp for&#39; in a same...
Definition: StmtOpenMP.h:643
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:856
clang::OMPDistributeDirective
This represents &#39;#pragma omp distribute&#39; directive.
Definition: StmtOpenMP.h:2972
clang::OMPLoopDirective::setInits
void setInits(ArrayRef< Expr *> A)
Definition: StmtOpenMP.cpp:39
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:111
clang::Expr
This represents one expression.
Definition: Expr.h:106
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:1705
clang::getUpdates
MutableArrayRef< Expr * > getUpdates()
Sets the list of update expressions for linear variables.
Definition: OpenMPClause.h:2681
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:1156
clang::OMPMasterDirective::Create
static OMPMasterDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AssociatedStmt)
Creates directive.
Definition: StmtOpenMP.cpp:292
clang::OMPTargetTeamsDistributeParallelForSimdDirective
This represents &#39;#pragma omp target teams distribute parallel for simd&#39; combined directive.
Definition: StmtOpenMP.h:3948
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:1275
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:674
clang::OMPTargetTeamsDistributeSimdDirective
This represents &#39;#pragma omp target teams distribute simd&#39; combined directive.
Definition: StmtOpenMP.h:4021
clang::OMPExecutableDirective::getNumClauses
unsigned getNumClauses() const
Get number of clauses.
Definition: StmtOpenMP.h:184
clang::OMPLoopDirective::HelperExprs::PrevUB
Expr * PrevUB
PreviousUpperBound - local variable passed to runtime in the enclosing schedule or null if that does ...
Definition: StmtOpenMP.h:700
clang::OMPOrderedDirective::Create
static OMPOrderedDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause *> Clauses, Stmt *AssociatedStmt)
Creates directive.
Definition: StmtOpenMP.cpp:617
clang::OMPForDirective
This represents &#39;#pragma omp for&#39; directive.
Definition: StmtOpenMP.h:1104
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:810
clang::OMPTargetTeamsDirective
This represents &#39;#pragma omp target teams&#39; directive.
Definition: StmtOpenMP.h:3737
clang::OMPExecutableDirective::setAssociatedStmt
void setAssociatedStmt(Stmt *S)
Set the associated statement for the directive.
Definition: StmtOpenMP.h:85
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:1001
clang::OMPLoopDirective::DistCombinedHelperExprs::ParForInDistCond
Expr * ParForInDistCond
&#39;omp parallel for&#39; loop condition used when composed with &#39;omp distribute&#39; in the same construct and ...
Definition: StmtOpenMP.h:659
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:422
clang::OMPCancelDirective
This represents &#39;#pragma omp cancel&#39; directive.
Definition: StmtOpenMP.h:2776
clang::OMPLoopDirective::setDistInc
void setDistInc(Expr *DistInc)
Definition: StmtOpenMP.h:565
clang::OMPLoopDirective::DistCombinedHelperExprs::NLB
Expr * NLB
Update of LowerBound for statically scheduled omp loops for outer loop in combined constructs (e...
Definition: StmtOpenMP.h:649
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:1089
clang::OMPExecutableDirective::setClauses
void setClauses(ArrayRef< OMPClause *> Clauses)
Sets the list of variables for this clause.
Definition: StmtOpenMP.cpp:20
clang::OMPFlushDirective
This represents &#39;#pragma omp flush&#39; directive.
Definition: StmtOpenMP.h:2044
clang::OMPParallelForSimdDirective
This represents &#39;#pragma omp parallel for simd&#39; directive.
Definition: StmtOpenMP.h:1632
clang::OMPLoopDirective::HelperExprs::NumIterations
Expr * NumIterations
Loop number of iterations.
Definition: StmtOpenMP.h:670
clang::OMPForDirective::Create
static OMPForDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause *> Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel)
Creates directive with a list of Clauses.
Definition: StmtOpenMP.cpp:123
clang::OMPLoopDirective::HelperExprs::ST
Expr * ST
Stride - local variable passed to runtime.
Definition: StmtOpenMP.h:688
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:374
clang::OMPTargetEnterDataDirective
This represents &#39;#pragma omp target enter data&#39; directive.
Definition: StmtOpenMP.h:2404
clang::OMPLoopDirective::setUpdates
void setUpdates(ArrayRef< Expr *> A)
Definition: StmtOpenMP.cpp:45
clang::OMPLoopDirective::HelperExprs::PrivateCounters
SmallVector< Expr *, 4 > PrivateCounters
PrivateCounters Loop counters.
Definition: StmtOpenMP.h:714
clang::OMPLoopDirective::setLowerBoundVariable
void setLowerBoundVariable(Expr *LB)
Definition: StmtOpenMP.h:506
clang::OMPSectionDirective::CreateEmpty
static OMPSectionDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:259
clang::OMPLoopDirective::HelperExprs::Counters
SmallVector< Expr *, 4 > Counters
Counters Loop counters.
Definition: StmtOpenMP.h:712
clang::OMPSingleDirective
This represents &#39;#pragma omp single&#39; directive.
Definition: StmtOpenMP.h:1376
clang::SourceLocation
Encodes a location in the source.
Definition: SourceLocation.h:88
clang::OMPLoopDirective::setPrevLowerBoundVariable
void setPrevLowerBoundVariable(Expr *PrevLB)
Definition: StmtOpenMP.h:555
clang::OMPLoopDirective::setIterationVariable
void setIterationVariable(Expr *IV)
Definition: StmtOpenMP.h:479
clang::getInits
MutableArrayRef< Expr * > getInits()
Definition: OpenMPClause.h:2673
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:473
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:1026
clang::OMPLoopDirective::setCombinedNextLowerBound
void setCombinedNextLowerBound(Expr *CombNLB)
Definition: StmtOpenMP.h:600
clang::OMPParallelForDirective::Create
static OMPParallelForDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause *> Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel)
Creates directive with a list of Clauses.
Definition: StmtOpenMP.cpp:335
clang::OpenMPDirectiveKind
OpenMPDirectiveKind
OpenMP directives.
Definition: OpenMPKinds.h:23
clang::OMPParallelDirective::Create
static OMPParallelDirective * 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:57
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:818
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:664
clang::OMPTaskwaitDirective
This represents &#39;#pragma omp taskwait&#39; directive.
Definition: StmtOpenMP.h:1927
clang::OMPLoopDirective::HelperExprs::PrevEUB
Expr * PrevEUB
PrevEUB - expression similar to EUB but to be used when loop scheduling uses PrevLB and PrevUB (e...
Definition: StmtOpenMP.h:710
clang::OMPClause
This is a basic class for representing single OpenMP clause.
Definition: OpenMPClause.h:51
clang::OMPOrderedDirective::CreateEmpty
static OMPOrderedDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:633
clang::OMPTargetDirective
This represents &#39;#pragma omp target&#39; directive.
Definition: StmtOpenMP.h:2288
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:1540
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:1353
clang::OMPLoopDirective::HelperExprs::DistCombinedFields
DistCombinedHelperExprs DistCombinedFields
Expressions used when combining OpenMP loop pragmas.
Definition: StmtOpenMP.h:725
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:172
clang::OMPOrderedDirective
This represents &#39;#pragma omp ordered&#39; directive.
Definition: StmtOpenMP.h:2099
clang::OMPLoopDirective::HelperExprs::LB
Expr * LB
LowerBound - local variable passed to runtime.
Definition: StmtOpenMP.h:684
clang::OMPTargetUpdateDirective
This represents &#39;#pragma omp target update&#39; directive.
Definition: StmtOpenMP.h:3040
clang::OMPLoopDirective::HelperExprs::Init
Expr * Init
Loop iteration variable init.
Definition: StmtOpenMP.h:678
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:266
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:976
clang::ASTContext::Allocate
void * Allocate(size_t Size, unsigned Align=8) const
Definition: ASTContext.h:669
clang::OMPLoopDirective::setPrevUpperBoundVariable
void setPrevUpperBoundVariable(Expr *PrevUB)
Definition: StmtOpenMP.h:560
clang::OMPLoopDirective::setCombinedEnsureUpperBound
void setCombinedEnsureUpperBound(Expr *CombEUB)
Definition: StmtOpenMP.h:585
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:160
clang::OMPLoopDirective::setCounters
void setCounters(ArrayRef< Expr *> A)
Definition: StmtOpenMP.cpp:26
clang
Dataflow Directional Tag Classes.
Definition: CFGReachabilityAnalysis.h:22
clang::OMPLoopDirective::HelperExprs::Inits
SmallVector< Expr *, 4 > Inits
Expressions for loop counters inits for CodeGen.
Definition: StmtOpenMP.h:716
clang::OMPLoopDirective::setCombinedUpperBoundVariable
void setCombinedUpperBoundVariable(Expr *CombUB)
Definition: StmtOpenMP.h:580
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:1569
clang::OMPSectionDirective
This represents &#39;#pragma omp section&#39; directive.
Definition: StmtOpenMP.h:1314
clang::OMPTeamsDistributeDirective
This represents &#39;#pragma omp teams distribute&#39; directive.
Definition: StmtOpenMP.h:3450
clang::OMPParallelSectionsDirective::Create
static OMPParallelSectionsDirective * 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:433
clang::OMPSimdDirective
This represents &#39;#pragma omp simd&#39; directive.
Definition: StmtOpenMP.h:1039
clang::DeclarationNameInfo
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnd...
Definition: DeclarationName.h:691
clang::OMPAtomicDirective
This represents &#39;#pragma omp atomic&#39; directive.
Definition: StmtOpenMP.h:2154
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:209
clang::OMPBarrierDirective::CreateEmpty
static OMPBarrierDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:505
StmtOpenMP.h
This file defines OpenMP AST classes for executable directives and clauses.
clang::OMPSectionsDirective::Create
static OMPSectionsDirective * 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:221
clang::OMPLoopDirective::HelperExprs::Inc
Expr * Inc
Loop increment.
Definition: StmtOpenMP.h:680
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:1554
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:1760
clang::OMPTaskLoopDirective::Create
static OMPTaskLoopDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef< OMPClause *> Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs)
Creates directive with a list of Clauses.
Definition: StmtOpenMP.cpp:866
clang::OMPLoopDirective::DistCombinedHelperExprs::UB
Expr * UB
DistributeUpperBound - used when composing &#39;omp distribute&#39; with &#39;omp for&#39; in a same construct...
Definition: StmtOpenMP.h:636
X
X
Add a minimal nested name specifier fixit hint to allow lookup of a tag name from an outer enclosing ...
Definition: SemaDecl.cpp:13954
clang::OMPTaskyieldDirective::Create
static OMPTaskyieldDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc)
Creates directive.
Definition: StmtOpenMP.cpp:482
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:774
clang::OMPLoopDirective::HelperExprs::UB
Expr * UB
UpperBound - local variable passed to runtime.
Definition: StmtOpenMP.h:686
clang::OMPTargetParallelDirective
This represents &#39;#pragma omp target parallel&#39; directive.
Definition: StmtOpenMP.h:2521
clang::OMPLoopDirective::setStrideVariable
void setStrideVariable(Expr *ST)
Definition: StmtOpenMP.h:520
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:449
clang::OMPBarrierDirective::Create
static OMPBarrierDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc)
Creates directive.
Definition: StmtOpenMP.cpp:497
clang::AttrSyntax::C
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:83
clang::OMPTaskLoopSimdDirective
This represents &#39;#pragma omp taskloop simd&#39; directive.
Definition: StmtOpenMP.h:2906
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:236
clang::OMPLoopDirective::setPreCond
void setPreCond(Expr *PC)
Definition: StmtOpenMP.h:488
clang::OMPCancelDirective::CreateEmpty
static OMPCancelDirective * CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:585
clang::OMPTaskwaitDirective::Create
static OMPTaskwaitDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc)
Creates directive.
Definition: StmtOpenMP.cpp:511
clang::OMPSectionsDirective
This represents &#39;#pragma omp sections&#39; directive.
Definition: StmtOpenMP.h:1246
clang::OMPLoopDirective::DistCombinedHelperExprs::Cond
Expr * Cond
Distribute Loop condition used when composing &#39;omp distribute&#39; with &#39;omp for&#39; in a same construct...
Definition: StmtOpenMP.h:646
clang::OMPLoopDirective::HelperExprs::PreInits
Stmt * PreInits
Init statement for all captured expressions.
Definition: StmtOpenMP.h:722
clang::OMPTargetDataDirective
This represents &#39;#pragma omp target data&#39; directive.
Definition: StmtOpenMP.h:2346
clang::OMPLoopDirective::setNextUpperBound
void setNextUpperBound(Expr *NUB)
Definition: StmtOpenMP.h:541
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:1776
clang::OMPLoopDirective::setInc
void setInc(Expr *Inc)
Definition: StmtOpenMP.h:495
clang::OMPCancelDirective::Create
static OMPCancelDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause *> Clauses, OpenMPDirectiveKind CancelRegion)
Creates directive.
Definition: StmtOpenMP.cpp:571
clang::OMPLoopDirective::HelperExprs::IL
Expr * IL
IsLastIteration - local flag variable passed to runtime.
Definition: StmtOpenMP.h:682
clang::OMPTaskyieldDirective
This represents &#39;#pragma omp taskyield&#39; directive.
Definition: StmtOpenMP.h:1839
clang::OMPDistributeParallelForSimdDirective
This represents &#39;#pragma omp distribute parallel for simd&#39; composite directive.
Definition: StmtOpenMP.h:3179
clang::OMPCancellationPointDirective::Create
static OMPCancellationPointDirective * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, OpenMPDirectiveKind CancelRegion)
Creates directive.
Definition: StmtOpenMP.cpp:550
clang::OMPParallelSectionsDirective
This represents &#39;#pragma omp parallel sections&#39; directive.
Definition: StmtOpenMP.h:1700
clang::OMPLoopDirective::setCalcLastIteration
void setCalcLastIteration(Expr *CLI)
Definition: StmtOpenMP.h:485
clang::OMPLoopDirective::setCombinedNextUpperBound
void setCombinedNextUpperBound(Expr *CombNUB)
Definition: StmtOpenMP.h:605
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:915
clang::OMPLoopDirective::setFinals
void setFinals(ArrayRef< Expr *> A)
Definition: StmtOpenMP.cpp:51
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:1470
clang::OMPTargetParallelForDirective
This represents &#39;#pragma omp target parallel for&#39; directive.
Definition: StmtOpenMP.h:2581
clang::OMPCancellationPointDirective::CreateEmpty
static OMPCancellationPointDirective * CreateEmpty(const ASTContext &C, EmptyShell)
Creates an empty directive.
Definition: StmtOpenMP.cpp:563
clang::OMPTaskLoopDirective
This represents &#39;#pragma omp taskloop&#39; directive.
Definition: StmtOpenMP.h:2841