1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | |
14 | #ifndef LLVM_CLANG_AST_STMTOPENMP_H |
15 | #define LLVM_CLANG_AST_STMTOPENMP_H |
16 | |
17 | #include "clang/AST/Expr.h" |
18 | #include "clang/AST/OpenMPClause.h" |
19 | #include "clang/AST/Stmt.h" |
20 | #include "clang/Basic/OpenMPKinds.h" |
21 | #include "clang/Basic/SourceLocation.h" |
22 | |
23 | namespace clang { |
24 | |
25 | |
26 | |
27 | |
28 | |
29 | |
30 | |
31 | |
32 | class OMPExecutableDirective : public Stmt { |
33 | friend class ASTStmtReader; |
34 | |
35 | OpenMPDirectiveKind Kind; |
36 | |
37 | SourceLocation StartLoc; |
38 | |
39 | SourceLocation EndLoc; |
40 | |
41 | const unsigned NumClauses; |
42 | |
43 | const unsigned NumChildren; |
44 | |
45 | |
46 | |
47 | |
48 | const unsigned ClausesOffset; |
49 | |
50 | |
51 | MutableArrayRef<OMPClause *> getClauses() { |
52 | OMPClause **ClauseStorage = reinterpret_cast<OMPClause **>( |
53 | reinterpret_cast<char *>(this) + ClausesOffset); |
54 | return MutableArrayRef<OMPClause *>(ClauseStorage, NumClauses); |
55 | } |
56 | |
57 | protected: |
58 | |
59 | |
60 | |
61 | |
62 | |
63 | |
64 | |
65 | template <typename T> |
66 | OMPExecutableDirective(const T *, StmtClass SC, OpenMPDirectiveKind K, |
67 | SourceLocation StartLoc, SourceLocation EndLoc, |
68 | unsigned NumClauses, unsigned NumChildren) |
69 | : Stmt(SC), Kind(K), StartLoc(std::move(StartLoc)), |
70 | EndLoc(std::move(EndLoc)), NumClauses(NumClauses), |
71 | NumChildren(NumChildren), |
72 | ClausesOffset(llvm::alignTo(sizeof(T), alignof(OMPClause *))) {} |
73 | |
74 | |
75 | |
76 | |
77 | |
78 | void setClauses(ArrayRef<OMPClause *> Clauses); |
79 | |
80 | |
81 | |
82 | |
83 | |
84 | void setAssociatedStmt(Stmt *S) { |
85 | (0) . __assert_fail ("hasAssociatedStmt() && \"no associated statement.\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 85, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(hasAssociatedStmt() && "no associated statement."); |
86 | *child_begin() = S; |
87 | } |
88 | |
89 | public: |
90 | |
91 | |
92 | |
93 | |
94 | template <typename SpecificClause> |
95 | class specific_clause_iterator |
96 | : public llvm::iterator_adaptor_base< |
97 | specific_clause_iterator<SpecificClause>, |
98 | ArrayRef<OMPClause *>::const_iterator, std::forward_iterator_tag, |
99 | const SpecificClause *, ptrdiff_t, const SpecificClause *, |
100 | const SpecificClause *> { |
101 | ArrayRef<OMPClause *>::const_iterator End; |
102 | |
103 | void SkipToNextClause() { |
104 | while (this->I != End && !isa<SpecificClause>(*this->I)) |
105 | ++this->I; |
106 | } |
107 | |
108 | public: |
109 | explicit specific_clause_iterator(ArrayRef<OMPClause *> Clauses) |
110 | : specific_clause_iterator::iterator_adaptor_base(Clauses.begin()), |
111 | End(Clauses.end()) { |
112 | SkipToNextClause(); |
113 | } |
114 | |
115 | const SpecificClause *operator*() const { |
116 | return cast<SpecificClause>(*this->I); |
117 | } |
118 | const SpecificClause *operator->() const { return **this; } |
119 | |
120 | specific_clause_iterator &operator++() { |
121 | ++this->I; |
122 | SkipToNextClause(); |
123 | return *this; |
124 | } |
125 | }; |
126 | |
127 | template <typename SpecificClause> |
128 | static llvm::iterator_range<specific_clause_iterator<SpecificClause>> |
129 | getClausesOfKind(ArrayRef<OMPClause *> Clauses) { |
130 | return {specific_clause_iterator<SpecificClause>(Clauses), |
131 | specific_clause_iterator<SpecificClause>( |
132 | llvm::makeArrayRef(Clauses.end(), 0))}; |
133 | } |
134 | |
135 | template <typename SpecificClause> |
136 | llvm::iterator_range<specific_clause_iterator<SpecificClause>> |
137 | getClausesOfKind() const { |
138 | return getClausesOfKind<SpecificClause>(clauses()); |
139 | } |
140 | |
141 | |
142 | |
143 | |
144 | |
145 | |
146 | template <typename SpecificClause> |
147 | const SpecificClause *getSingleClause() const { |
148 | auto Clauses = getClausesOfKind<SpecificClause>(); |
149 | |
150 | if (Clauses.begin() != Clauses.end()) { |
151 | (0) . __assert_fail ("std..next(Clauses.begin()) == Clauses.end() && \"There are at least 2 clauses of the specified kind\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 152, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(std::next(Clauses.begin()) == Clauses.end() && |
152 | (0) . __assert_fail ("std..next(Clauses.begin()) == Clauses.end() && \"There are at least 2 clauses of the specified kind\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 152, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "There are at least 2 clauses of the specified kind"); |
153 | return *Clauses.begin(); |
154 | } |
155 | return nullptr; |
156 | } |
157 | |
158 | |
159 | |
160 | template <typename SpecificClause> |
161 | bool hasClausesOfKind() const { |
162 | auto Clauses = getClausesOfKind<SpecificClause>(); |
163 | return Clauses.begin() != Clauses.end(); |
164 | } |
165 | |
166 | |
167 | SourceLocation getBeginLoc() const { return StartLoc; } |
168 | |
169 | SourceLocation getEndLoc() const { return EndLoc; } |
170 | |
171 | |
172 | |
173 | |
174 | |
175 | void setLocStart(SourceLocation Loc) { StartLoc = Loc; } |
176 | |
177 | |
178 | |
179 | |
180 | void setLocEnd(SourceLocation Loc) { EndLoc = Loc; } |
181 | |
182 | |
183 | unsigned getNumClauses() const { return NumClauses; } |
184 | |
185 | |
186 | |
187 | |
188 | |
189 | OMPClause *getClause(unsigned i) const { return clauses()[i]; } |
190 | |
191 | |
192 | bool hasAssociatedStmt() const { return NumChildren > 0; } |
193 | |
194 | |
195 | const Stmt *getAssociatedStmt() const { |
196 | (0) . __assert_fail ("hasAssociatedStmt() && \"no associated statement.\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 196, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(hasAssociatedStmt() && "no associated statement."); |
197 | return *child_begin(); |
198 | } |
199 | Stmt *getAssociatedStmt() { |
200 | (0) . __assert_fail ("hasAssociatedStmt() && \"no associated statement.\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 200, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(hasAssociatedStmt() && "no associated statement."); |
201 | return *child_begin(); |
202 | } |
203 | |
204 | |
205 | |
206 | |
207 | |
208 | const CapturedStmt *getCapturedStmt(OpenMPDirectiveKind RegionKind) const { |
209 | SmallVector<OpenMPDirectiveKind, 4> CaptureRegions; |
210 | getOpenMPCaptureRegions(CaptureRegions, getDirectiveKind()); |
211 | (0) . __assert_fail ("std..any_of( CaptureRegions.begin(), CaptureRegions.end(), [=](const OpenMPDirectiveKind K) { return K == RegionKind; }) && \"RegionKind not found in OpenMP CaptureRegions.\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 214, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(std::any_of( |
212 | (0) . __assert_fail ("std..any_of( CaptureRegions.begin(), CaptureRegions.end(), [=](const OpenMPDirectiveKind K) { return K == RegionKind; }) && \"RegionKind not found in OpenMP CaptureRegions.\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 214, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> CaptureRegions.begin(), CaptureRegions.end(), |
213 | (0) . __assert_fail ("std..any_of( CaptureRegions.begin(), CaptureRegions.end(), [=](const OpenMPDirectiveKind K) { return K == RegionKind; }) && \"RegionKind not found in OpenMP CaptureRegions.\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 214, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> [=](const OpenMPDirectiveKind K) { return K == RegionKind; }) && |
214 | (0) . __assert_fail ("std..any_of( CaptureRegions.begin(), CaptureRegions.end(), [=](const OpenMPDirectiveKind K) { return K == RegionKind; }) && \"RegionKind not found in OpenMP CaptureRegions.\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 214, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "RegionKind not found in OpenMP CaptureRegions."); |
215 | auto *CS = cast<CapturedStmt>(getAssociatedStmt()); |
216 | for (auto ThisCaptureRegion : CaptureRegions) { |
217 | if (ThisCaptureRegion == RegionKind) |
218 | return CS; |
219 | CS = cast<CapturedStmt>(CS->getCapturedStmt()); |
220 | } |
221 | llvm_unreachable("Incorrect RegionKind specified for directive."); |
222 | } |
223 | |
224 | |
225 | CapturedStmt *getInnermostCapturedStmt() { |
226 | (0) . __assert_fail ("hasAssociatedStmt() && getAssociatedStmt() && \"Must have associated statement.\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 227, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(hasAssociatedStmt() && getAssociatedStmt() && |
227 | (0) . __assert_fail ("hasAssociatedStmt() && getAssociatedStmt() && \"Must have associated statement.\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 227, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "Must have associated statement."); |
228 | SmallVector<OpenMPDirectiveKind, 4> CaptureRegions; |
229 | getOpenMPCaptureRegions(CaptureRegions, getDirectiveKind()); |
230 | (0) . __assert_fail ("!CaptureRegions.empty() && \"At least one captured statement must be provided.\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 231, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(!CaptureRegions.empty() && |
231 | (0) . __assert_fail ("!CaptureRegions.empty() && \"At least one captured statement must be provided.\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 231, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "At least one captured statement must be provided."); |
232 | auto *CS = cast<CapturedStmt>(getAssociatedStmt()); |
233 | for (unsigned Level = CaptureRegions.size(); Level > 1; --Level) |
234 | CS = cast<CapturedStmt>(CS->getCapturedStmt()); |
235 | return CS; |
236 | } |
237 | |
238 | const CapturedStmt *getInnermostCapturedStmt() const { |
239 | return const_cast<OMPExecutableDirective *>(this) |
240 | ->getInnermostCapturedStmt(); |
241 | } |
242 | |
243 | OpenMPDirectiveKind getDirectiveKind() const { return Kind; } |
244 | |
245 | static bool classof(const Stmt *S) { |
246 | return S->getStmtClass() >= firstOMPExecutableDirectiveConstant && |
247 | S->getStmtClass() <= lastOMPExecutableDirectiveConstant; |
248 | } |
249 | |
250 | child_range children() { |
251 | if (!hasAssociatedStmt()) |
252 | return child_range(child_iterator(), child_iterator()); |
253 | Stmt **ChildStorage = reinterpret_cast<Stmt **>(getClauses().end()); |
254 | |
255 | |
256 | return child_range(ChildStorage, ChildStorage + 1); |
257 | } |
258 | |
259 | ArrayRef<OMPClause *> clauses() { return getClauses(); } |
260 | |
261 | ArrayRef<OMPClause *> clauses() const { |
262 | return const_cast<OMPExecutableDirective *>(this)->getClauses(); |
263 | } |
264 | |
265 | |
266 | |
267 | |
268 | |
269 | bool isStandaloneDirective() const; |
270 | |
271 | |
272 | |
273 | |
274 | const Stmt *getStructuredBlock() const; |
275 | |
276 | Stmt *getStructuredBlock() { |
277 | return const_cast<Stmt *>( |
278 | const_cast<const OMPExecutableDirective *>(this)->getStructuredBlock()); |
279 | } |
280 | }; |
281 | |
282 | |
283 | |
284 | |
285 | |
286 | |
287 | |
288 | |
289 | |
290 | |
291 | class OMPParallelDirective : public OMPExecutableDirective { |
292 | friend class ASTStmtReader; |
293 | |
294 | bool HasCancel; |
295 | |
296 | |
297 | |
298 | |
299 | |
300 | |
301 | OMPParallelDirective(SourceLocation StartLoc, SourceLocation EndLoc, |
302 | unsigned NumClauses) |
303 | : OMPExecutableDirective(this, OMPParallelDirectiveClass, OMPD_parallel, |
304 | StartLoc, EndLoc, NumClauses, 1), |
305 | HasCancel(false) {} |
306 | |
307 | |
308 | |
309 | |
310 | |
311 | explicit OMPParallelDirective(unsigned NumClauses) |
312 | : OMPExecutableDirective(this, OMPParallelDirectiveClass, OMPD_parallel, |
313 | SourceLocation(), SourceLocation(), NumClauses, |
314 | 1), |
315 | HasCancel(false) {} |
316 | |
317 | |
318 | void setHasCancel(bool Has) { HasCancel = Has; } |
319 | |
320 | public: |
321 | |
322 | |
323 | |
324 | |
325 | |
326 | |
327 | |
328 | |
329 | |
330 | static OMPParallelDirective * |
331 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
332 | ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, bool HasCancel); |
333 | |
334 | |
335 | |
336 | |
337 | |
338 | |
339 | static OMPParallelDirective *CreateEmpty(const ASTContext &C, |
340 | unsigned NumClauses, EmptyShell); |
341 | |
342 | |
343 | bool hasCancel() const { return HasCancel; } |
344 | |
345 | static bool classof(const Stmt *T) { |
346 | return T->getStmtClass() == OMPParallelDirectiveClass; |
347 | } |
348 | }; |
349 | |
350 | |
351 | |
352 | |
353 | class OMPLoopDirective : public OMPExecutableDirective { |
354 | friend class ASTStmtReader; |
355 | |
356 | unsigned CollapsedNum; |
357 | |
358 | |
359 | |
360 | |
361 | |
362 | |
363 | |
364 | |
365 | |
366 | |
367 | |
368 | |
369 | |
370 | |
371 | |
372 | |
373 | |
374 | enum { |
375 | AssociatedStmtOffset = 0, |
376 | IterationVariableOffset = 1, |
377 | LastIterationOffset = 2, |
378 | CalcLastIterationOffset = 3, |
379 | PreConditionOffset = 4, |
380 | CondOffset = 5, |
381 | InitOffset = 6, |
382 | IncOffset = 7, |
383 | PreInitsOffset = 8, |
384 | |
385 | |
386 | |
387 | DefaultEnd = 9, |
388 | |
389 | IsLastIterVariableOffset = 9, |
390 | LowerBoundVariableOffset = 10, |
391 | UpperBoundVariableOffset = 11, |
392 | StrideVariableOffset = 12, |
393 | EnsureUpperBoundOffset = 13, |
394 | NextLowerBoundOffset = 14, |
395 | NextUpperBoundOffset = 15, |
396 | NumIterationsOffset = 16, |
397 | |
398 | WorksharingEnd = 17, |
399 | PrevLowerBoundVariableOffset = 17, |
400 | PrevUpperBoundVariableOffset = 18, |
401 | DistIncOffset = 19, |
402 | PrevEnsureUpperBoundOffset = 20, |
403 | CombinedLowerBoundVariableOffset = 21, |
404 | CombinedUpperBoundVariableOffset = 22, |
405 | CombinedEnsureUpperBoundOffset = 23, |
406 | CombinedInitOffset = 24, |
407 | CombinedConditionOffset = 25, |
408 | CombinedNextLowerBoundOffset = 26, |
409 | CombinedNextUpperBoundOffset = 27, |
410 | CombinedDistConditionOffset = 28, |
411 | CombinedParForInDistConditionOffset = 29, |
412 | |
413 | |
414 | CombinedDistributeEnd = 30, |
415 | }; |
416 | |
417 | |
418 | MutableArrayRef<Expr *> getCounters() { |
419 | Expr **Storage = reinterpret_cast<Expr **>( |
420 | &(*(std::next(child_begin(), getArraysOffset(getDirectiveKind()))))); |
421 | return MutableArrayRef<Expr *>(Storage, CollapsedNum); |
422 | } |
423 | |
424 | |
425 | MutableArrayRef<Expr *> getPrivateCounters() { |
426 | Expr **Storage = reinterpret_cast<Expr **>(&*std::next( |
427 | child_begin(), getArraysOffset(getDirectiveKind()) + CollapsedNum)); |
428 | return MutableArrayRef<Expr *>(Storage, CollapsedNum); |
429 | } |
430 | |
431 | |
432 | MutableArrayRef<Expr *> getInits() { |
433 | Expr **Storage = reinterpret_cast<Expr **>( |
434 | &*std::next(child_begin(), |
435 | getArraysOffset(getDirectiveKind()) + 2 * CollapsedNum)); |
436 | return MutableArrayRef<Expr *>(Storage, CollapsedNum); |
437 | } |
438 | |
439 | |
440 | MutableArrayRef<Expr *> getUpdates() { |
441 | Expr **Storage = reinterpret_cast<Expr **>( |
442 | &*std::next(child_begin(), |
443 | getArraysOffset(getDirectiveKind()) + 3 * CollapsedNum)); |
444 | return MutableArrayRef<Expr *>(Storage, CollapsedNum); |
445 | } |
446 | |
447 | |
448 | MutableArrayRef<Expr *> getFinals() { |
449 | Expr **Storage = reinterpret_cast<Expr **>( |
450 | &*std::next(child_begin(), |
451 | getArraysOffset(getDirectiveKind()) + 4 * CollapsedNum)); |
452 | return MutableArrayRef<Expr *>(Storage, CollapsedNum); |
453 | } |
454 | |
455 | protected: |
456 | |
457 | |
458 | |
459 | |
460 | |
461 | |
462 | |
463 | |
464 | |
465 | |
466 | template <typename T> |
467 | OMPLoopDirective(const T *That, StmtClass SC, OpenMPDirectiveKind Kind, |
468 | SourceLocation StartLoc, SourceLocation EndLoc, |
469 | unsigned CollapsedNum, unsigned NumClauses, |
470 | unsigned NumSpecialChildren = 0) |
471 | : OMPExecutableDirective(That, SC, Kind, StartLoc, EndLoc, NumClauses, |
472 | numLoopChildren(CollapsedNum, Kind) + |
473 | NumSpecialChildren), |
474 | CollapsedNum(CollapsedNum) {} |
475 | |
476 | |
477 | static unsigned getArraysOffset(OpenMPDirectiveKind Kind) { |
478 | if (isOpenMPLoopBoundSharingDirective(Kind)) |
479 | return CombinedDistributeEnd; |
480 | if (isOpenMPWorksharingDirective(Kind) || isOpenMPTaskLoopDirective(Kind) || |
481 | isOpenMPDistributeDirective(Kind)) |
482 | return WorksharingEnd; |
483 | return DefaultEnd; |
484 | } |
485 | |
486 | |
487 | static unsigned numLoopChildren(unsigned CollapsedNum, |
488 | OpenMPDirectiveKind Kind) { |
489 | return getArraysOffset(Kind) + 5 * CollapsedNum; |
490 | |
491 | |
492 | } |
493 | |
494 | void setIterationVariable(Expr *IV) { |
495 | *std::next(child_begin(), IterationVariableOffset) = IV; |
496 | } |
497 | void setLastIteration(Expr *LI) { |
498 | *std::next(child_begin(), LastIterationOffset) = LI; |
499 | } |
500 | void setCalcLastIteration(Expr *CLI) { |
501 | *std::next(child_begin(), CalcLastIterationOffset) = CLI; |
502 | } |
503 | void setPreCond(Expr *PC) { |
504 | *std::next(child_begin(), PreConditionOffset) = PC; |
505 | } |
506 | void setCond(Expr *Cond) { |
507 | *std::next(child_begin(), CondOffset) = Cond; |
508 | } |
509 | void setInit(Expr *Init) { *std::next(child_begin(), InitOffset) = Init; } |
510 | void setInc(Expr *Inc) { *std::next(child_begin(), IncOffset) = Inc; } |
511 | void setPreInits(Stmt *PreInits) { |
512 | *std::next(child_begin(), PreInitsOffset) = PreInits; |
513 | } |
514 | void setIsLastIterVariable(Expr *IL) { |
515 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 518, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert((isOpenMPWorksharingDirective(getDirectiveKind()) || |
516 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 518, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> isOpenMPTaskLoopDirective(getDirectiveKind()) || |
517 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 518, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> isOpenMPDistributeDirective(getDirectiveKind())) && |
518 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 518, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected worksharing loop directive"); |
519 | *std::next(child_begin(), IsLastIterVariableOffset) = IL; |
520 | } |
521 | void setLowerBoundVariable(Expr *LB) { |
522 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 525, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert((isOpenMPWorksharingDirective(getDirectiveKind()) || |
523 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 525, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> isOpenMPTaskLoopDirective(getDirectiveKind()) || |
524 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 525, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> isOpenMPDistributeDirective(getDirectiveKind())) && |
525 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 525, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected worksharing loop directive"); |
526 | *std::next(child_begin(), LowerBoundVariableOffset) = LB; |
527 | } |
528 | void setUpperBoundVariable(Expr *UB) { |
529 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 532, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert((isOpenMPWorksharingDirective(getDirectiveKind()) || |
530 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 532, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> isOpenMPTaskLoopDirective(getDirectiveKind()) || |
531 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 532, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> isOpenMPDistributeDirective(getDirectiveKind())) && |
532 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 532, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected worksharing loop directive"); |
533 | *std::next(child_begin(), UpperBoundVariableOffset) = UB; |
534 | } |
535 | void setStrideVariable(Expr *ST) { |
536 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 539, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert((isOpenMPWorksharingDirective(getDirectiveKind()) || |
537 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 539, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> isOpenMPTaskLoopDirective(getDirectiveKind()) || |
538 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 539, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> isOpenMPDistributeDirective(getDirectiveKind())) && |
539 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 539, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected worksharing loop directive"); |
540 | *std::next(child_begin(), StrideVariableOffset) = ST; |
541 | } |
542 | void setEnsureUpperBound(Expr *EUB) { |
543 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 546, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert((isOpenMPWorksharingDirective(getDirectiveKind()) || |
544 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 546, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> isOpenMPTaskLoopDirective(getDirectiveKind()) || |
545 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 546, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> isOpenMPDistributeDirective(getDirectiveKind())) && |
546 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 546, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected worksharing loop directive"); |
547 | *std::next(child_begin(), EnsureUpperBoundOffset) = EUB; |
548 | } |
549 | void setNextLowerBound(Expr *NLB) { |
550 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 553, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert((isOpenMPWorksharingDirective(getDirectiveKind()) || |
551 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 553, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> isOpenMPTaskLoopDirective(getDirectiveKind()) || |
552 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 553, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> isOpenMPDistributeDirective(getDirectiveKind())) && |
553 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 553, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected worksharing loop directive"); |
554 | *std::next(child_begin(), NextLowerBoundOffset) = NLB; |
555 | } |
556 | void setNextUpperBound(Expr *NUB) { |
557 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 560, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert((isOpenMPWorksharingDirective(getDirectiveKind()) || |
558 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 560, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> isOpenMPTaskLoopDirective(getDirectiveKind()) || |
559 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 560, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> isOpenMPDistributeDirective(getDirectiveKind())) && |
560 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 560, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected worksharing loop directive"); |
561 | *std::next(child_begin(), NextUpperBoundOffset) = NUB; |
562 | } |
563 | void setNumIterations(Expr *NI) { |
564 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 567, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert((isOpenMPWorksharingDirective(getDirectiveKind()) || |
565 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 567, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> isOpenMPTaskLoopDirective(getDirectiveKind()) || |
566 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 567, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> isOpenMPDistributeDirective(getDirectiveKind())) && |
567 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 567, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected worksharing loop directive"); |
568 | *std::next(child_begin(), NumIterationsOffset) = NI; |
569 | } |
570 | void setPrevLowerBoundVariable(Expr *PrevLB) { |
571 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 572, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && |
572 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 572, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected loop bound sharing directive"); |
573 | *std::next(child_begin(), PrevLowerBoundVariableOffset) = PrevLB; |
574 | } |
575 | void setPrevUpperBoundVariable(Expr *PrevUB) { |
576 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 577, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && |
577 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 577, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected loop bound sharing directive"); |
578 | *std::next(child_begin(), PrevUpperBoundVariableOffset) = PrevUB; |
579 | } |
580 | void setDistInc(Expr *DistInc) { |
581 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 582, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && |
582 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 582, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected loop bound sharing directive"); |
583 | *std::next(child_begin(), DistIncOffset) = DistInc; |
584 | } |
585 | void setPrevEnsureUpperBound(Expr *PrevEUB) { |
586 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 587, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && |
587 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 587, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected loop bound sharing directive"); |
588 | *std::next(child_begin(), PrevEnsureUpperBoundOffset) = PrevEUB; |
589 | } |
590 | void setCombinedLowerBoundVariable(Expr *CombLB) { |
591 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 592, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && |
592 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 592, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected loop bound sharing directive"); |
593 | *std::next(child_begin(), CombinedLowerBoundVariableOffset) = CombLB; |
594 | } |
595 | void setCombinedUpperBoundVariable(Expr *CombUB) { |
596 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 597, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && |
597 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 597, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected loop bound sharing directive"); |
598 | *std::next(child_begin(), CombinedUpperBoundVariableOffset) = CombUB; |
599 | } |
600 | void setCombinedEnsureUpperBound(Expr *CombEUB) { |
601 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 602, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && |
602 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 602, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected loop bound sharing directive"); |
603 | *std::next(child_begin(), CombinedEnsureUpperBoundOffset) = CombEUB; |
604 | } |
605 | void setCombinedInit(Expr *CombInit) { |
606 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 607, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && |
607 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 607, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected loop bound sharing directive"); |
608 | *std::next(child_begin(), CombinedInitOffset) = CombInit; |
609 | } |
610 | void setCombinedCond(Expr *CombCond) { |
611 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 612, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && |
612 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 612, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected loop bound sharing directive"); |
613 | *std::next(child_begin(), CombinedConditionOffset) = CombCond; |
614 | } |
615 | void setCombinedNextLowerBound(Expr *CombNLB) { |
616 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 617, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && |
617 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 617, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected loop bound sharing directive"); |
618 | *std::next(child_begin(), CombinedNextLowerBoundOffset) = CombNLB; |
619 | } |
620 | void setCombinedNextUpperBound(Expr *CombNUB) { |
621 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 622, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && |
622 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 622, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected loop bound sharing directive"); |
623 | *std::next(child_begin(), CombinedNextUpperBoundOffset) = CombNUB; |
624 | } |
625 | void setCombinedDistCond(Expr *CombDistCond) { |
626 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound distribute sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 627, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && |
627 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound distribute sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 627, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected loop bound distribute sharing directive"); |
628 | *std::next(child_begin(), CombinedDistConditionOffset) = CombDistCond; |
629 | } |
630 | void setCombinedParForInDistCond(Expr *CombParForInDistCond) { |
631 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound distribute sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 632, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && |
632 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound distribute sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 632, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected loop bound distribute sharing directive"); |
633 | *std::next(child_begin(), |
634 | CombinedParForInDistConditionOffset) = CombParForInDistCond; |
635 | } |
636 | void setCounters(ArrayRef<Expr *> A); |
637 | void setPrivateCounters(ArrayRef<Expr *> A); |
638 | void setInits(ArrayRef<Expr *> A); |
639 | void setUpdates(ArrayRef<Expr *> A); |
640 | void setFinals(ArrayRef<Expr *> A); |
641 | |
642 | public: |
643 | |
644 | |
645 | struct DistCombinedHelperExprs { |
646 | |
647 | |
648 | Expr *LB; |
649 | |
650 | |
651 | Expr *UB; |
652 | |
653 | |
654 | Expr *EUB; |
655 | |
656 | |
657 | |
658 | Expr *Init; |
659 | |
660 | |
661 | Expr *Cond; |
662 | |
663 | |
664 | Expr *NLB; |
665 | |
666 | |
667 | Expr *NUB; |
668 | |
669 | |
670 | Expr *DistCond; |
671 | |
672 | |
673 | |
674 | Expr *ParForInDistCond; |
675 | }; |
676 | |
677 | |
678 | |
679 | struct HelperExprs { |
680 | |
681 | Expr *IterationVarRef; |
682 | |
683 | Expr *LastIteration; |
684 | |
685 | Expr *NumIterations; |
686 | |
687 | Expr *CalcLastIteration; |
688 | |
689 | Expr *PreCond; |
690 | |
691 | Expr *Cond; |
692 | |
693 | Expr *Init; |
694 | |
695 | Expr *Inc; |
696 | |
697 | Expr *IL; |
698 | |
699 | Expr *LB; |
700 | |
701 | Expr *UB; |
702 | |
703 | Expr *ST; |
704 | |
705 | Expr *EUB; |
706 | |
707 | Expr *NLB; |
708 | |
709 | Expr *NUB; |
710 | |
711 | |
712 | Expr *PrevLB; |
713 | |
714 | |
715 | Expr *PrevUB; |
716 | |
717 | |
718 | |
719 | Expr *DistInc; |
720 | |
721 | |
722 | |
723 | |
724 | |
725 | Expr *PrevEUB; |
726 | |
727 | SmallVector<Expr *, 4> Counters; |
728 | |
729 | SmallVector<Expr *, 4> PrivateCounters; |
730 | |
731 | SmallVector<Expr *, 4> Inits; |
732 | |
733 | SmallVector<Expr *, 4> Updates; |
734 | |
735 | SmallVector<Expr *, 4> Finals; |
736 | |
737 | Stmt *PreInits; |
738 | |
739 | |
740 | DistCombinedHelperExprs DistCombinedFields; |
741 | |
742 | |
743 | |
744 | bool builtAll() { |
745 | return IterationVarRef != nullptr && LastIteration != nullptr && |
746 | NumIterations != nullptr && PreCond != nullptr && |
747 | Cond != nullptr && Init != nullptr && Inc != nullptr; |
748 | } |
749 | |
750 | |
751 | |
752 | void clear(unsigned Size) { |
753 | IterationVarRef = nullptr; |
754 | LastIteration = nullptr; |
755 | CalcLastIteration = nullptr; |
756 | PreCond = nullptr; |
757 | Cond = nullptr; |
758 | Init = nullptr; |
759 | Inc = nullptr; |
760 | IL = nullptr; |
761 | LB = nullptr; |
762 | UB = nullptr; |
763 | ST = nullptr; |
764 | EUB = nullptr; |
765 | NLB = nullptr; |
766 | NUB = nullptr; |
767 | NumIterations = nullptr; |
768 | PrevLB = nullptr; |
769 | PrevUB = nullptr; |
770 | DistInc = nullptr; |
771 | PrevEUB = nullptr; |
772 | Counters.resize(Size); |
773 | PrivateCounters.resize(Size); |
774 | Inits.resize(Size); |
775 | Updates.resize(Size); |
776 | Finals.resize(Size); |
777 | for (unsigned i = 0; i < Size; ++i) { |
778 | Counters[i] = nullptr; |
779 | PrivateCounters[i] = nullptr; |
780 | Inits[i] = nullptr; |
781 | Updates[i] = nullptr; |
782 | Finals[i] = nullptr; |
783 | } |
784 | PreInits = nullptr; |
785 | DistCombinedFields.LB = nullptr; |
786 | DistCombinedFields.UB = nullptr; |
787 | DistCombinedFields.EUB = nullptr; |
788 | DistCombinedFields.Init = nullptr; |
789 | DistCombinedFields.Cond = nullptr; |
790 | DistCombinedFields.NLB = nullptr; |
791 | DistCombinedFields.NUB = nullptr; |
792 | DistCombinedFields.DistCond = nullptr; |
793 | DistCombinedFields.ParForInDistCond = nullptr; |
794 | } |
795 | }; |
796 | |
797 | |
798 | unsigned getCollapsedNumber() const { return CollapsedNum; } |
799 | |
800 | Expr *getIterationVariable() const { |
801 | return const_cast<Expr *>(reinterpret_cast<const Expr *>( |
802 | *std::next(child_begin(), IterationVariableOffset))); |
803 | } |
804 | Expr *getLastIteration() const { |
805 | return const_cast<Expr *>(reinterpret_cast<const Expr *>( |
806 | *std::next(child_begin(), LastIterationOffset))); |
807 | } |
808 | Expr *getCalcLastIteration() const { |
809 | return const_cast<Expr *>(reinterpret_cast<const Expr *>( |
810 | *std::next(child_begin(), CalcLastIterationOffset))); |
811 | } |
812 | Expr *getPreCond() const { |
813 | return const_cast<Expr *>(reinterpret_cast<const Expr *>( |
814 | *std::next(child_begin(), PreConditionOffset))); |
815 | } |
816 | Expr *getCond() const { |
817 | return const_cast<Expr *>( |
818 | reinterpret_cast<const Expr *>(*std::next(child_begin(), CondOffset))); |
819 | } |
820 | Expr *getInit() const { |
821 | return const_cast<Expr *>( |
822 | reinterpret_cast<const Expr *>(*std::next(child_begin(), InitOffset))); |
823 | } |
824 | Expr *getInc() const { |
825 | return const_cast<Expr *>( |
826 | reinterpret_cast<const Expr *>(*std::next(child_begin(), IncOffset))); |
827 | } |
828 | const Stmt *getPreInits() const { |
829 | return *std::next(child_begin(), PreInitsOffset); |
830 | } |
831 | Stmt *getPreInits() { return *std::next(child_begin(), PreInitsOffset); } |
832 | Expr *getIsLastIterVariable() const { |
833 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 836, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert((isOpenMPWorksharingDirective(getDirectiveKind()) || |
834 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 836, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> isOpenMPTaskLoopDirective(getDirectiveKind()) || |
835 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 836, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> isOpenMPDistributeDirective(getDirectiveKind())) && |
836 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 836, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected worksharing loop directive"); |
837 | return const_cast<Expr *>(reinterpret_cast<const Expr *>( |
838 | *std::next(child_begin(), IsLastIterVariableOffset))); |
839 | } |
840 | Expr *getLowerBoundVariable() const { |
841 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 844, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert((isOpenMPWorksharingDirective(getDirectiveKind()) || |
842 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 844, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> isOpenMPTaskLoopDirective(getDirectiveKind()) || |
843 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 844, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> isOpenMPDistributeDirective(getDirectiveKind())) && |
844 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 844, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected worksharing loop directive"); |
845 | return const_cast<Expr *>(reinterpret_cast<const Expr *>( |
846 | *std::next(child_begin(), LowerBoundVariableOffset))); |
847 | } |
848 | Expr *getUpperBoundVariable() const { |
849 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 852, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert((isOpenMPWorksharingDirective(getDirectiveKind()) || |
850 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 852, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> isOpenMPTaskLoopDirective(getDirectiveKind()) || |
851 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 852, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> isOpenMPDistributeDirective(getDirectiveKind())) && |
852 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 852, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected worksharing loop directive"); |
853 | return const_cast<Expr *>(reinterpret_cast<const Expr *>( |
854 | *std::next(child_begin(), UpperBoundVariableOffset))); |
855 | } |
856 | Expr *getStrideVariable() const { |
857 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 860, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert((isOpenMPWorksharingDirective(getDirectiveKind()) || |
858 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 860, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> isOpenMPTaskLoopDirective(getDirectiveKind()) || |
859 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 860, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> isOpenMPDistributeDirective(getDirectiveKind())) && |
860 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 860, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected worksharing loop directive"); |
861 | return const_cast<Expr *>(reinterpret_cast<const Expr *>( |
862 | *std::next(child_begin(), StrideVariableOffset))); |
863 | } |
864 | Expr *getEnsureUpperBound() const { |
865 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 868, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert((isOpenMPWorksharingDirective(getDirectiveKind()) || |
866 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 868, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> isOpenMPTaskLoopDirective(getDirectiveKind()) || |
867 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 868, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> isOpenMPDistributeDirective(getDirectiveKind())) && |
868 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 868, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected worksharing loop directive"); |
869 | return const_cast<Expr *>(reinterpret_cast<const Expr *>( |
870 | *std::next(child_begin(), EnsureUpperBoundOffset))); |
871 | } |
872 | Expr *getNextLowerBound() const { |
873 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 876, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert((isOpenMPWorksharingDirective(getDirectiveKind()) || |
874 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 876, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> isOpenMPTaskLoopDirective(getDirectiveKind()) || |
875 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 876, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> isOpenMPDistributeDirective(getDirectiveKind())) && |
876 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 876, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected worksharing loop directive"); |
877 | return const_cast<Expr *>(reinterpret_cast<const Expr *>( |
878 | *std::next(child_begin(), NextLowerBoundOffset))); |
879 | } |
880 | Expr *getNextUpperBound() const { |
881 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 884, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert((isOpenMPWorksharingDirective(getDirectiveKind()) || |
882 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 884, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> isOpenMPTaskLoopDirective(getDirectiveKind()) || |
883 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 884, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> isOpenMPDistributeDirective(getDirectiveKind())) && |
884 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 884, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected worksharing loop directive"); |
885 | return const_cast<Expr *>(reinterpret_cast<const Expr *>( |
886 | *std::next(child_begin(), NextUpperBoundOffset))); |
887 | } |
888 | Expr *getNumIterations() const { |
889 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 892, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert((isOpenMPWorksharingDirective(getDirectiveKind()) || |
890 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 892, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> isOpenMPTaskLoopDirective(getDirectiveKind()) || |
891 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 892, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> isOpenMPDistributeDirective(getDirectiveKind())) && |
892 | (0) . __assert_fail ("(isOpenMPWorksharingDirective(getDirectiveKind()) || isOpenMPTaskLoopDirective(getDirectiveKind()) || isOpenMPDistributeDirective(getDirectiveKind())) && \"expected worksharing loop directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 892, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected worksharing loop directive"); |
893 | return const_cast<Expr *>(reinterpret_cast<const Expr *>( |
894 | *std::next(child_begin(), NumIterationsOffset))); |
895 | } |
896 | Expr *getPrevLowerBoundVariable() const { |
897 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 898, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && |
898 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 898, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected loop bound sharing directive"); |
899 | return const_cast<Expr *>(reinterpret_cast<const Expr *>( |
900 | *std::next(child_begin(), PrevLowerBoundVariableOffset))); |
901 | } |
902 | Expr *getPrevUpperBoundVariable() const { |
903 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 904, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && |
904 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 904, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected loop bound sharing directive"); |
905 | return const_cast<Expr *>(reinterpret_cast<const Expr *>( |
906 | *std::next(child_begin(), PrevUpperBoundVariableOffset))); |
907 | } |
908 | Expr *getDistInc() const { |
909 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 910, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && |
910 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 910, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected loop bound sharing directive"); |
911 | return const_cast<Expr *>(reinterpret_cast<const Expr *>( |
912 | *std::next(child_begin(), DistIncOffset))); |
913 | } |
914 | Expr *getPrevEnsureUpperBound() const { |
915 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 916, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && |
916 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 916, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected loop bound sharing directive"); |
917 | return const_cast<Expr *>(reinterpret_cast<const Expr *>( |
918 | *std::next(child_begin(), PrevEnsureUpperBoundOffset))); |
919 | } |
920 | Expr *getCombinedLowerBoundVariable() const { |
921 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 922, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && |
922 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 922, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected loop bound sharing directive"); |
923 | return const_cast<Expr *>(reinterpret_cast<const Expr *>( |
924 | *std::next(child_begin(), CombinedLowerBoundVariableOffset))); |
925 | } |
926 | Expr *getCombinedUpperBoundVariable() const { |
927 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 928, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && |
928 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 928, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected loop bound sharing directive"); |
929 | return const_cast<Expr *>(reinterpret_cast<const Expr *>( |
930 | *std::next(child_begin(), CombinedUpperBoundVariableOffset))); |
931 | } |
932 | Expr *getCombinedEnsureUpperBound() const { |
933 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 934, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && |
934 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 934, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected loop bound sharing directive"); |
935 | return const_cast<Expr *>(reinterpret_cast<const Expr *>( |
936 | *std::next(child_begin(), CombinedEnsureUpperBoundOffset))); |
937 | } |
938 | Expr *getCombinedInit() const { |
939 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 940, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && |
940 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 940, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected loop bound sharing directive"); |
941 | return const_cast<Expr *>(reinterpret_cast<const Expr *>( |
942 | *std::next(child_begin(), CombinedInitOffset))); |
943 | } |
944 | Expr *getCombinedCond() const { |
945 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 946, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && |
946 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 946, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected loop bound sharing directive"); |
947 | return const_cast<Expr *>(reinterpret_cast<const Expr *>( |
948 | *std::next(child_begin(), CombinedConditionOffset))); |
949 | } |
950 | Expr *getCombinedNextLowerBound() const { |
951 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 952, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && |
952 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 952, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected loop bound sharing directive"); |
953 | return const_cast<Expr *>(reinterpret_cast<const Expr *>( |
954 | *std::next(child_begin(), CombinedNextLowerBoundOffset))); |
955 | } |
956 | Expr *getCombinedNextUpperBound() const { |
957 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 958, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && |
958 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 958, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected loop bound sharing directive"); |
959 | return const_cast<Expr *>(reinterpret_cast<const Expr *>( |
960 | *std::next(child_begin(), CombinedNextUpperBoundOffset))); |
961 | } |
962 | Expr *getCombinedDistCond() const { |
963 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound distribute sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 964, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && |
964 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound distribute sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 964, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected loop bound distribute sharing directive"); |
965 | return const_cast<Expr *>(reinterpret_cast<const Expr *>( |
966 | *std::next(child_begin(), CombinedDistConditionOffset))); |
967 | } |
968 | Expr *getCombinedParForInDistCond() const { |
969 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound distribute sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 970, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true">assert(isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && |
970 | (0) . __assert_fail ("isOpenMPLoopBoundSharingDirective(getDirectiveKind()) && \"expected loop bound distribute sharing directive\"", "/home/seafit/code_projects/clang_source/clang/include/clang/AST/StmtOpenMP.h", 970, __PRETTY_FUNCTION__))" file_link="../../../../include/assert.h.html#88" macro="true"> "expected loop bound distribute sharing directive"); |
971 | return const_cast<Expr *>(reinterpret_cast<const Expr *>( |
972 | *std::next(child_begin(), CombinedParForInDistConditionOffset))); |
973 | } |
974 | const Stmt *getBody() const { |
975 | |
976 | const Stmt *Body = |
977 | getInnermostCapturedStmt()->getCapturedStmt()->IgnoreContainers(); |
978 | Body = cast<ForStmt>(Body)->getBody(); |
979 | for (unsigned Cnt = 1; Cnt < CollapsedNum; ++Cnt) { |
980 | Body = Body->IgnoreContainers(); |
981 | Body = cast<ForStmt>(Body)->getBody(); |
982 | } |
983 | return Body; |
984 | } |
985 | |
986 | ArrayRef<Expr *> counters() { return getCounters(); } |
987 | |
988 | ArrayRef<Expr *> counters() const { |
989 | return const_cast<OMPLoopDirective *>(this)->getCounters(); |
990 | } |
991 | |
992 | ArrayRef<Expr *> private_counters() { return getPrivateCounters(); } |
993 | |
994 | ArrayRef<Expr *> private_counters() const { |
995 | return const_cast<OMPLoopDirective *>(this)->getPrivateCounters(); |
996 | } |
997 | |
998 | ArrayRef<Expr *> inits() { return getInits(); } |
999 | |
1000 | ArrayRef<Expr *> inits() const { |
1001 | return const_cast<OMPLoopDirective *>(this)->getInits(); |
1002 | } |
1003 | |
1004 | ArrayRef<Expr *> updates() { return getUpdates(); } |
1005 | |
1006 | ArrayRef<Expr *> updates() const { |
1007 | return const_cast<OMPLoopDirective *>(this)->getUpdates(); |
1008 | } |
1009 | |
1010 | ArrayRef<Expr *> finals() { return getFinals(); } |
1011 | |
1012 | ArrayRef<Expr *> finals() const { |
1013 | return const_cast<OMPLoopDirective *>(this)->getFinals(); |
1014 | } |
1015 | |
1016 | static bool classof(const Stmt *T) { |
1017 | return T->getStmtClass() == OMPSimdDirectiveClass || |
1018 | T->getStmtClass() == OMPForDirectiveClass || |
1019 | T->getStmtClass() == OMPForSimdDirectiveClass || |
1020 | T->getStmtClass() == OMPParallelForDirectiveClass || |
1021 | T->getStmtClass() == OMPParallelForSimdDirectiveClass || |
1022 | T->getStmtClass() == OMPTaskLoopDirectiveClass || |
1023 | T->getStmtClass() == OMPTaskLoopSimdDirectiveClass || |
1024 | T->getStmtClass() == OMPDistributeDirectiveClass || |
1025 | T->getStmtClass() == OMPTargetParallelForDirectiveClass || |
1026 | T->getStmtClass() == OMPDistributeParallelForDirectiveClass || |
1027 | T->getStmtClass() == OMPDistributeParallelForSimdDirectiveClass || |
1028 | T->getStmtClass() == OMPDistributeSimdDirectiveClass || |
1029 | T->getStmtClass() == OMPTargetParallelForSimdDirectiveClass || |
1030 | T->getStmtClass() == OMPTargetSimdDirectiveClass || |
1031 | T->getStmtClass() == OMPTeamsDistributeDirectiveClass || |
1032 | T->getStmtClass() == OMPTeamsDistributeSimdDirectiveClass || |
1033 | T->getStmtClass() == |
1034 | OMPTeamsDistributeParallelForSimdDirectiveClass || |
1035 | T->getStmtClass() == OMPTeamsDistributeParallelForDirectiveClass || |
1036 | T->getStmtClass() == |
1037 | OMPTargetTeamsDistributeParallelForDirectiveClass || |
1038 | T->getStmtClass() == |
1039 | OMPTargetTeamsDistributeParallelForSimdDirectiveClass || |
1040 | T->getStmtClass() == OMPTargetTeamsDistributeDirectiveClass || |
1041 | T->getStmtClass() == OMPTargetTeamsDistributeSimdDirectiveClass; |
1042 | } |
1043 | }; |
1044 | |
1045 | |
1046 | |
1047 | |
1048 | |
1049 | |
1050 | |
1051 | |
1052 | |
1053 | |
1054 | class OMPSimdDirective : public OMPLoopDirective { |
1055 | friend class ASTStmtReader; |
1056 | |
1057 | |
1058 | |
1059 | |
1060 | |
1061 | |
1062 | |
1063 | OMPSimdDirective(SourceLocation StartLoc, SourceLocation EndLoc, |
1064 | unsigned CollapsedNum, unsigned NumClauses) |
1065 | : OMPLoopDirective(this, OMPSimdDirectiveClass, OMPD_simd, StartLoc, |
1066 | EndLoc, CollapsedNum, NumClauses) {} |
1067 | |
1068 | |
1069 | |
1070 | |
1071 | |
1072 | |
1073 | explicit OMPSimdDirective(unsigned CollapsedNum, unsigned NumClauses) |
1074 | : OMPLoopDirective(this, OMPSimdDirectiveClass, OMPD_simd, |
1075 | SourceLocation(), SourceLocation(), CollapsedNum, |
1076 | NumClauses) {} |
1077 | |
1078 | public: |
1079 | |
1080 | |
1081 | |
1082 | |
1083 | |
1084 | |
1085 | |
1086 | |
1087 | |
1088 | |
1089 | static OMPSimdDirective *Create(const ASTContext &C, SourceLocation StartLoc, |
1090 | SourceLocation EndLoc, unsigned CollapsedNum, |
1091 | ArrayRef<OMPClause *> Clauses, |
1092 | Stmt *AssociatedStmt, |
1093 | const HelperExprs &Exprs); |
1094 | |
1095 | |
1096 | |
1097 | |
1098 | |
1099 | |
1100 | |
1101 | |
1102 | static OMPSimdDirective *CreateEmpty(const ASTContext &C, unsigned NumClauses, |
1103 | unsigned CollapsedNum, EmptyShell); |
1104 | |
1105 | static bool classof(const Stmt *T) { |
1106 | return T->getStmtClass() == OMPSimdDirectiveClass; |
1107 | } |
1108 | }; |
1109 | |
1110 | |
1111 | |
1112 | |
1113 | |
1114 | |
1115 | |
1116 | |
1117 | |
1118 | |
1119 | class OMPForDirective : public OMPLoopDirective { |
1120 | friend class ASTStmtReader; |
1121 | |
1122 | |
1123 | bool HasCancel; |
1124 | |
1125 | |
1126 | |
1127 | |
1128 | |
1129 | |
1130 | |
1131 | |
1132 | OMPForDirective(SourceLocation StartLoc, SourceLocation EndLoc, |
1133 | unsigned CollapsedNum, unsigned NumClauses) |
1134 | : OMPLoopDirective(this, OMPForDirectiveClass, OMPD_for, StartLoc, EndLoc, |
1135 | CollapsedNum, NumClauses), |
1136 | HasCancel(false) {} |
1137 | |
1138 | |
1139 | |
1140 | |
1141 | |
1142 | |
1143 | explicit OMPForDirective(unsigned CollapsedNum, unsigned NumClauses) |
1144 | : OMPLoopDirective(this, OMPForDirectiveClass, OMPD_for, SourceLocation(), |
1145 | SourceLocation(), CollapsedNum, NumClauses), |
1146 | HasCancel(false) {} |
1147 | |
1148 | |
1149 | void setHasCancel(bool Has) { HasCancel = Has; } |
1150 | |
1151 | public: |
1152 | |
1153 | |
1154 | |
1155 | |
1156 | |
1157 | |
1158 | |
1159 | |
1160 | |
1161 | |
1162 | |
1163 | static OMPForDirective *Create(const ASTContext &C, SourceLocation StartLoc, |
1164 | SourceLocation EndLoc, unsigned CollapsedNum, |
1165 | ArrayRef<OMPClause *> Clauses, |
1166 | Stmt *AssociatedStmt, const HelperExprs &Exprs, |
1167 | bool HasCancel); |
1168 | |
1169 | |
1170 | |
1171 | |
1172 | |
1173 | |
1174 | |
1175 | |
1176 | static OMPForDirective *CreateEmpty(const ASTContext &C, unsigned NumClauses, |
1177 | unsigned CollapsedNum, EmptyShell); |
1178 | |
1179 | |
1180 | bool hasCancel() const { return HasCancel; } |
1181 | |
1182 | static bool classof(const Stmt *T) { |
1183 | return T->getStmtClass() == OMPForDirectiveClass; |
1184 | } |
1185 | }; |
1186 | |
1187 | |
1188 | |
1189 | |
1190 | |
1191 | |
1192 | |
1193 | |
1194 | |
1195 | |
1196 | class OMPForSimdDirective : public OMPLoopDirective { |
1197 | friend class ASTStmtReader; |
1198 | |
1199 | |
1200 | |
1201 | |
1202 | |
1203 | |
1204 | |
1205 | OMPForSimdDirective(SourceLocation StartLoc, SourceLocation EndLoc, |
1206 | unsigned CollapsedNum, unsigned NumClauses) |
1207 | : OMPLoopDirective(this, OMPForSimdDirectiveClass, OMPD_for_simd, |
1208 | StartLoc, EndLoc, CollapsedNum, NumClauses) {} |
1209 | |
1210 | |
1211 | |
1212 | |
1213 | |
1214 | |
1215 | explicit OMPForSimdDirective(unsigned CollapsedNum, unsigned NumClauses) |
1216 | : OMPLoopDirective(this, OMPForSimdDirectiveClass, OMPD_for_simd, |
1217 | SourceLocation(), SourceLocation(), CollapsedNum, |
1218 | NumClauses) {} |
1219 | |
1220 | public: |
1221 | |
1222 | |
1223 | |
1224 | |
1225 | |
1226 | |
1227 | |
1228 | |
1229 | |
1230 | |
1231 | static OMPForSimdDirective * |
1232 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
1233 | unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, |
1234 | Stmt *AssociatedStmt, const HelperExprs &Exprs); |
1235 | |
1236 | |
1237 | |
1238 | |
1239 | |
1240 | |
1241 | |
1242 | |
1243 | static OMPForSimdDirective *CreateEmpty(const ASTContext &C, |
1244 | unsigned NumClauses, |
1245 | unsigned CollapsedNum, EmptyShell); |
1246 | |
1247 | static bool classof(const Stmt *T) { |
1248 | return T->getStmtClass() == OMPForSimdDirectiveClass; |
1249 | } |
1250 | }; |
1251 | |
1252 | |
1253 | |
1254 | |
1255 | |
1256 | |
1257 | |
1258 | |
1259 | |
1260 | |
1261 | class OMPSectionsDirective : public OMPExecutableDirective { |
1262 | friend class ASTStmtReader; |
1263 | |
1264 | |
1265 | bool HasCancel; |
1266 | |
1267 | |
1268 | |
1269 | |
1270 | |
1271 | |
1272 | |
1273 | OMPSectionsDirective(SourceLocation StartLoc, SourceLocation EndLoc, |
1274 | unsigned NumClauses) |
1275 | : OMPExecutableDirective(this, OMPSectionsDirectiveClass, OMPD_sections, |
1276 | StartLoc, EndLoc, NumClauses, 1), |
1277 | HasCancel(false) {} |
1278 | |
1279 | |
1280 | |
1281 | |
1282 | |
1283 | explicit OMPSectionsDirective(unsigned NumClauses) |
1284 | : OMPExecutableDirective(this, OMPSectionsDirectiveClass, OMPD_sections, |
1285 | SourceLocation(), SourceLocation(), NumClauses, |
1286 | 1), |
1287 | HasCancel(false) {} |
1288 | |
1289 | |
1290 | void setHasCancel(bool Has) { HasCancel = Has; } |
1291 | |
1292 | public: |
1293 | |
1294 | |
1295 | |
1296 | |
1297 | |
1298 | |
1299 | |
1300 | |
1301 | |
1302 | static OMPSectionsDirective * |
1303 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
1304 | ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, bool HasCancel); |
1305 | |
1306 | |
1307 | |
1308 | |
1309 | |
1310 | |
1311 | |
1312 | static OMPSectionsDirective *CreateEmpty(const ASTContext &C, |
1313 | unsigned NumClauses, EmptyShell); |
1314 | |
1315 | |
1316 | bool hasCancel() const { return HasCancel; } |
1317 | |
1318 | static bool classof(const Stmt *T) { |
1319 | return T->getStmtClass() == OMPSectionsDirectiveClass; |
1320 | } |
1321 | }; |
1322 | |
1323 | |
1324 | |
1325 | |
1326 | |
1327 | |
1328 | |
1329 | class OMPSectionDirective : public OMPExecutableDirective { |
1330 | friend class ASTStmtReader; |
1331 | |
1332 | |
1333 | bool HasCancel; |
1334 | |
1335 | |
1336 | |
1337 | |
1338 | |
1339 | |
1340 | OMPSectionDirective(SourceLocation StartLoc, SourceLocation EndLoc) |
1341 | : OMPExecutableDirective(this, OMPSectionDirectiveClass, OMPD_section, |
1342 | StartLoc, EndLoc, 0, 1), |
1343 | HasCancel(false) {} |
1344 | |
1345 | |
1346 | |
1347 | explicit OMPSectionDirective() |
1348 | : OMPExecutableDirective(this, OMPSectionDirectiveClass, OMPD_section, |
1349 | SourceLocation(), SourceLocation(), 0, 1), |
1350 | HasCancel(false) {} |
1351 | |
1352 | public: |
1353 | |
1354 | |
1355 | |
1356 | |
1357 | |
1358 | |
1359 | |
1360 | |
1361 | static OMPSectionDirective *Create(const ASTContext &C, |
1362 | SourceLocation StartLoc, |
1363 | SourceLocation EndLoc, |
1364 | Stmt *AssociatedStmt, bool HasCancel); |
1365 | |
1366 | |
1367 | |
1368 | |
1369 | |
1370 | static OMPSectionDirective *CreateEmpty(const ASTContext &C, EmptyShell); |
1371 | |
1372 | |
1373 | void setHasCancel(bool Has) { HasCancel = Has; } |
1374 | |
1375 | |
1376 | bool hasCancel() const { return HasCancel; } |
1377 | |
1378 | static bool classof(const Stmt *T) { |
1379 | return T->getStmtClass() == OMPSectionDirectiveClass; |
1380 | } |
1381 | }; |
1382 | |
1383 | |
1384 | |
1385 | |
1386 | |
1387 | |
1388 | |
1389 | |
1390 | |
1391 | class OMPSingleDirective : public OMPExecutableDirective { |
1392 | friend class ASTStmtReader; |
1393 | |
1394 | |
1395 | |
1396 | |
1397 | |
1398 | |
1399 | OMPSingleDirective(SourceLocation StartLoc, SourceLocation EndLoc, |
1400 | unsigned NumClauses) |
1401 | : OMPExecutableDirective(this, OMPSingleDirectiveClass, OMPD_single, |
1402 | StartLoc, EndLoc, NumClauses, 1) {} |
1403 | |
1404 | |
1405 | |
1406 | |
1407 | |
1408 | explicit OMPSingleDirective(unsigned NumClauses) |
1409 | : OMPExecutableDirective(this, OMPSingleDirectiveClass, OMPD_single, |
1410 | SourceLocation(), SourceLocation(), NumClauses, |
1411 | 1) {} |
1412 | |
1413 | public: |
1414 | |
1415 | |
1416 | |
1417 | |
1418 | |
1419 | |
1420 | |
1421 | |
1422 | static OMPSingleDirective * |
1423 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
1424 | ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt); |
1425 | |
1426 | |
1427 | |
1428 | |
1429 | |
1430 | |
1431 | |
1432 | static OMPSingleDirective *CreateEmpty(const ASTContext &C, |
1433 | unsigned NumClauses, EmptyShell); |
1434 | |
1435 | static bool classof(const Stmt *T) { |
1436 | return T->getStmtClass() == OMPSingleDirectiveClass; |
1437 | } |
1438 | }; |
1439 | |
1440 | |
1441 | |
1442 | |
1443 | |
1444 | |
1445 | |
1446 | class OMPMasterDirective : public OMPExecutableDirective { |
1447 | friend class ASTStmtReader; |
1448 | |
1449 | |
1450 | |
1451 | |
1452 | |
1453 | OMPMasterDirective(SourceLocation StartLoc, SourceLocation EndLoc) |
1454 | : OMPExecutableDirective(this, OMPMasterDirectiveClass, OMPD_master, |
1455 | StartLoc, EndLoc, 0, 1) {} |
1456 | |
1457 | |
1458 | |
1459 | explicit OMPMasterDirective() |
1460 | : OMPExecutableDirective(this, OMPMasterDirectiveClass, OMPD_master, |
1461 | SourceLocation(), SourceLocation(), 0, 1) {} |
1462 | |
1463 | public: |
1464 | |
1465 | |
1466 | |
1467 | |
1468 | |
1469 | |
1470 | |
1471 | static OMPMasterDirective *Create(const ASTContext &C, |
1472 | SourceLocation StartLoc, |
1473 | SourceLocation EndLoc, |
1474 | Stmt *AssociatedStmt); |
1475 | |
1476 | |
1477 | |
1478 | |
1479 | |
1480 | static OMPMasterDirective *CreateEmpty(const ASTContext &C, EmptyShell); |
1481 | |
1482 | static bool classof(const Stmt *T) { |
1483 | return T->getStmtClass() == OMPMasterDirectiveClass; |
1484 | } |
1485 | }; |
1486 | |
1487 | |
1488 | |
1489 | |
1490 | |
1491 | |
1492 | |
1493 | class OMPCriticalDirective : public OMPExecutableDirective { |
1494 | friend class ASTStmtReader; |
1495 | |
1496 | DeclarationNameInfo DirName; |
1497 | |
1498 | |
1499 | |
1500 | |
1501 | |
1502 | |
1503 | |
1504 | OMPCriticalDirective(const DeclarationNameInfo &Name, SourceLocation StartLoc, |
1505 | SourceLocation EndLoc, unsigned NumClauses) |
1506 | : OMPExecutableDirective(this, OMPCriticalDirectiveClass, OMPD_critical, |
1507 | StartLoc, EndLoc, NumClauses, 1), |
1508 | DirName(Name) {} |
1509 | |
1510 | |
1511 | |
1512 | |
1513 | |
1514 | explicit OMPCriticalDirective(unsigned NumClauses) |
1515 | : OMPExecutableDirective(this, OMPCriticalDirectiveClass, OMPD_critical, |
1516 | SourceLocation(), SourceLocation(), NumClauses, |
1517 | 1), |
1518 | DirName() {} |
1519 | |
1520 | |
1521 | |
1522 | |
1523 | |
1524 | void setDirectiveName(const DeclarationNameInfo &Name) { DirName = Name; } |
1525 | |
1526 | public: |
1527 | |
1528 | |
1529 | |
1530 | |
1531 | |
1532 | |
1533 | |
1534 | |
1535 | |
1536 | static OMPCriticalDirective * |
1537 | Create(const ASTContext &C, const DeclarationNameInfo &Name, |
1538 | SourceLocation StartLoc, SourceLocation EndLoc, |
1539 | ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt); |
1540 | |
1541 | |
1542 | |
1543 | |
1544 | |
1545 | |
1546 | static OMPCriticalDirective *CreateEmpty(const ASTContext &C, |
1547 | unsigned NumClauses, EmptyShell); |
1548 | |
1549 | |
1550 | |
1551 | DeclarationNameInfo getDirectiveName() const { return DirName; } |
1552 | |
1553 | static bool classof(const Stmt *T) { |
1554 | return T->getStmtClass() == OMPCriticalDirectiveClass; |
1555 | } |
1556 | }; |
1557 | |
1558 | |
1559 | |
1560 | |
1561 | |
1562 | |
1563 | |
1564 | |
1565 | |
1566 | |
1567 | class OMPParallelForDirective : public OMPLoopDirective { |
1568 | friend class ASTStmtReader; |
1569 | |
1570 | |
1571 | bool HasCancel; |
1572 | |
1573 | |
1574 | |
1575 | |
1576 | |
1577 | |
1578 | |
1579 | |
1580 | OMPParallelForDirective(SourceLocation StartLoc, SourceLocation EndLoc, |
1581 | unsigned CollapsedNum, unsigned NumClauses) |
1582 | : OMPLoopDirective(this, OMPParallelForDirectiveClass, OMPD_parallel_for, |
1583 | StartLoc, EndLoc, CollapsedNum, NumClauses), |
1584 | HasCancel(false) {} |
1585 | |
1586 | |
1587 | |
1588 | |
1589 | |
1590 | |
1591 | explicit OMPParallelForDirective(unsigned CollapsedNum, unsigned NumClauses) |
1592 | : OMPLoopDirective(this, OMPParallelForDirectiveClass, OMPD_parallel_for, |
1593 | SourceLocation(), SourceLocation(), CollapsedNum, |
1594 | NumClauses), |
1595 | HasCancel(false) {} |
1596 | |
1597 | |
1598 | void setHasCancel(bool Has) { HasCancel = Has; } |
1599 | |
1600 | public: |
1601 | |
1602 | |
1603 | |
1604 | |
1605 | |
1606 | |
1607 | |
1608 | |
1609 | |
1610 | |
1611 | |
1612 | static OMPParallelForDirective * |
1613 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
1614 | unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, |
1615 | Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel); |
1616 | |
1617 | |
1618 | |
1619 | |
1620 | |
1621 | |
1622 | |
1623 | |
1624 | static OMPParallelForDirective *CreateEmpty(const ASTContext &C, |
1625 | unsigned NumClauses, |
1626 | unsigned CollapsedNum, |
1627 | EmptyShell); |
1628 | |
1629 | |
1630 | bool hasCancel() const { return HasCancel; } |
1631 | |
1632 | static bool classof(const Stmt *T) { |
1633 | return T->getStmtClass() == OMPParallelForDirectiveClass; |
1634 | } |
1635 | }; |
1636 | |
1637 | |
1638 | |
1639 | |
1640 | |
1641 | |
1642 | |
1643 | |
1644 | |
1645 | |
1646 | |
1647 | class OMPParallelForSimdDirective : public OMPLoopDirective { |
1648 | friend class ASTStmtReader; |
1649 | |
1650 | |
1651 | |
1652 | |
1653 | |
1654 | |
1655 | |
1656 | OMPParallelForSimdDirective(SourceLocation StartLoc, SourceLocation EndLoc, |
1657 | unsigned CollapsedNum, unsigned NumClauses) |
1658 | : OMPLoopDirective(this, OMPParallelForSimdDirectiveClass, |
1659 | OMPD_parallel_for_simd, StartLoc, EndLoc, CollapsedNum, |
1660 | NumClauses) {} |
1661 | |
1662 | |
1663 | |
1664 | |
1665 | |
1666 | |
1667 | explicit OMPParallelForSimdDirective(unsigned CollapsedNum, |
1668 | unsigned NumClauses) |
1669 | : OMPLoopDirective(this, OMPParallelForSimdDirectiveClass, |
1670 | OMPD_parallel_for_simd, SourceLocation(), |
1671 | SourceLocation(), CollapsedNum, NumClauses) {} |
1672 | |
1673 | public: |
1674 | |
1675 | |
1676 | |
1677 | |
1678 | |
1679 | |
1680 | |
1681 | |
1682 | |
1683 | |
1684 | static OMPParallelForSimdDirective * |
1685 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
1686 | unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, |
1687 | Stmt *AssociatedStmt, const HelperExprs &Exprs); |
1688 | |
1689 | |
1690 | |
1691 | |
1692 | |
1693 | |
1694 | |
1695 | |
1696 | static OMPParallelForSimdDirective *CreateEmpty(const ASTContext &C, |
1697 | unsigned NumClauses, |
1698 | unsigned CollapsedNum, |
1699 | EmptyShell); |
1700 | |
1701 | static bool classof(const Stmt *T) { |
1702 | return T->getStmtClass() == OMPParallelForSimdDirectiveClass; |
1703 | } |
1704 | }; |
1705 | |
1706 | |
1707 | |
1708 | |
1709 | |
1710 | |
1711 | |
1712 | |
1713 | |
1714 | |
1715 | class OMPParallelSectionsDirective : public OMPExecutableDirective { |
1716 | friend class ASTStmtReader; |
1717 | |
1718 | |
1719 | bool HasCancel; |
1720 | |
1721 | |
1722 | |
1723 | |
1724 | |
1725 | |
1726 | |
1727 | OMPParallelSectionsDirective(SourceLocation StartLoc, SourceLocation EndLoc, |
1728 | unsigned NumClauses) |
1729 | : OMPExecutableDirective(this, OMPParallelSectionsDirectiveClass, |
1730 | OMPD_parallel_sections, StartLoc, EndLoc, |
1731 | NumClauses, 1), |
1732 | HasCancel(false) {} |
1733 | |
1734 | |
1735 | |
1736 | |
1737 | |
1738 | explicit OMPParallelSectionsDirective(unsigned NumClauses) |
1739 | : OMPExecutableDirective(this, OMPParallelSectionsDirectiveClass, |
1740 | OMPD_parallel_sections, SourceLocation(), |
1741 | SourceLocation(), NumClauses, 1), |
1742 | HasCancel(false) {} |
1743 | |
1744 | |
1745 | void setHasCancel(bool Has) { HasCancel = Has; } |
1746 | |
1747 | public: |
1748 | |
1749 | |
1750 | |
1751 | |
1752 | |
1753 | |
1754 | |
1755 | |
1756 | |
1757 | static OMPParallelSectionsDirective * |
1758 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
1759 | ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, bool HasCancel); |
1760 | |
1761 | |
1762 | |
1763 | |
1764 | |
1765 | |
1766 | |
1767 | static OMPParallelSectionsDirective * |
1768 | CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell); |
1769 | |
1770 | |
1771 | bool hasCancel() const { return HasCancel; } |
1772 | |
1773 | static bool classof(const Stmt *T) { |
1774 | return T->getStmtClass() == OMPParallelSectionsDirectiveClass; |
1775 | } |
1776 | }; |
1777 | |
1778 | |
1779 | |
1780 | |
1781 | |
1782 | |
1783 | |
1784 | |
1785 | |
1786 | class OMPTaskDirective : public OMPExecutableDirective { |
1787 | friend class ASTStmtReader; |
1788 | |
1789 | bool HasCancel; |
1790 | |
1791 | |
1792 | |
1793 | |
1794 | |
1795 | |
1796 | |
1797 | OMPTaskDirective(SourceLocation StartLoc, SourceLocation EndLoc, |
1798 | unsigned NumClauses) |
1799 | : OMPExecutableDirective(this, OMPTaskDirectiveClass, OMPD_task, StartLoc, |
1800 | EndLoc, NumClauses, 1), |
1801 | HasCancel(false) {} |
1802 | |
1803 | |
1804 | |
1805 | |
1806 | |
1807 | explicit OMPTaskDirective(unsigned NumClauses) |
1808 | : OMPExecutableDirective(this, OMPTaskDirectiveClass, OMPD_task, |
1809 | SourceLocation(), SourceLocation(), NumClauses, |
1810 | 1), |
1811 | HasCancel(false) {} |
1812 | |
1813 | |
1814 | void setHasCancel(bool Has) { HasCancel = Has; } |
1815 | |
1816 | public: |
1817 | |
1818 | |
1819 | |
1820 | |
1821 | |
1822 | |
1823 | |
1824 | |
1825 | |
1826 | static OMPTaskDirective *Create(const ASTContext &C, SourceLocation StartLoc, |
1827 | SourceLocation EndLoc, |
1828 | ArrayRef<OMPClause *> Clauses, |
1829 | Stmt *AssociatedStmt, bool HasCancel); |
1830 | |
1831 | |
1832 | |
1833 | |
1834 | |
1835 | |
1836 | |
1837 | static OMPTaskDirective *CreateEmpty(const ASTContext &C, unsigned NumClauses, |
1838 | EmptyShell); |
1839 | |
1840 | |
1841 | bool hasCancel() const { return HasCancel; } |
1842 | |
1843 | static bool classof(const Stmt *T) { |
1844 | return T->getStmtClass() == OMPTaskDirectiveClass; |
1845 | } |
1846 | }; |
1847 | |
1848 | |
1849 | |
1850 | |
1851 | |
1852 | |
1853 | |
1854 | class OMPTaskyieldDirective : public OMPExecutableDirective { |
1855 | friend class ASTStmtReader; |
1856 | |
1857 | |
1858 | |
1859 | |
1860 | |
1861 | OMPTaskyieldDirective(SourceLocation StartLoc, SourceLocation EndLoc) |
1862 | : OMPExecutableDirective(this, OMPTaskyieldDirectiveClass, OMPD_taskyield, |
1863 | StartLoc, EndLoc, 0, 0) {} |
1864 | |
1865 | |
1866 | |
1867 | explicit OMPTaskyieldDirective() |
1868 | : OMPExecutableDirective(this, OMPTaskyieldDirectiveClass, OMPD_taskyield, |
1869 | SourceLocation(), SourceLocation(), 0, 0) {} |
1870 | |
1871 | public: |
1872 | |
1873 | |
1874 | |
1875 | |
1876 | |
1877 | |
1878 | static OMPTaskyieldDirective * |
1879 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc); |
1880 | |
1881 | |
1882 | |
1883 | |
1884 | |
1885 | static OMPTaskyieldDirective *CreateEmpty(const ASTContext &C, EmptyShell); |
1886 | |
1887 | static bool classof(const Stmt *T) { |
1888 | return T->getStmtClass() == OMPTaskyieldDirectiveClass; |
1889 | } |
1890 | }; |
1891 | |
1892 | |
1893 | |
1894 | |
1895 | |
1896 | |
1897 | |
1898 | class OMPBarrierDirective : public OMPExecutableDirective { |
1899 | friend class ASTStmtReader; |
1900 | |
1901 | |
1902 | |
1903 | |
1904 | |
1905 | OMPBarrierDirective(SourceLocation StartLoc, SourceLocation EndLoc) |
1906 | : OMPExecutableDirective(this, OMPBarrierDirectiveClass, OMPD_barrier, |
1907 | StartLoc, EndLoc, 0, 0) {} |
1908 | |
1909 | |
1910 | |
1911 | explicit OMPBarrierDirective() |
1912 | : OMPExecutableDirective(this, OMPBarrierDirectiveClass, OMPD_barrier, |
1913 | SourceLocation(), SourceLocation(), 0, 0) {} |
1914 | |
1915 | public: |
1916 | |
1917 | |
1918 | |
1919 | |
1920 | |
1921 | |
1922 | static OMPBarrierDirective * |
1923 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc); |
1924 | |
1925 | |
1926 | |
1927 | |
1928 | |
1929 | static OMPBarrierDirective *CreateEmpty(const ASTContext &C, EmptyShell); |
1930 | |
1931 | static bool classof(const Stmt *T) { |
1932 | return T->getStmtClass() == OMPBarrierDirectiveClass; |
1933 | } |
1934 | }; |
1935 | |
1936 | |
1937 | |
1938 | |
1939 | |
1940 | |
1941 | |
1942 | class OMPTaskwaitDirective : public OMPExecutableDirective { |
1943 | friend class ASTStmtReader; |
1944 | |
1945 | |
1946 | |
1947 | |
1948 | |
1949 | OMPTaskwaitDirective(SourceLocation StartLoc, SourceLocation EndLoc) |
1950 | : OMPExecutableDirective(this, OMPTaskwaitDirectiveClass, OMPD_taskwait, |
1951 | StartLoc, EndLoc, 0, 0) {} |
1952 | |
1953 | |
1954 | |
1955 | explicit OMPTaskwaitDirective() |
1956 | : OMPExecutableDirective(this, OMPTaskwaitDirectiveClass, OMPD_taskwait, |
1957 | SourceLocation(), SourceLocation(), 0, 0) {} |
1958 | |
1959 | public: |
1960 | |
1961 | |
1962 | |
1963 | |
1964 | |
1965 | |
1966 | static OMPTaskwaitDirective * |
1967 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc); |
1968 | |
1969 | |
1970 | |
1971 | |
1972 | |
1973 | static OMPTaskwaitDirective *CreateEmpty(const ASTContext &C, EmptyShell); |
1974 | |
1975 | static bool classof(const Stmt *T) { |
1976 | return T->getStmtClass() == OMPTaskwaitDirectiveClass; |
1977 | } |
1978 | }; |
1979 | |
1980 | |
1981 | |
1982 | |
1983 | |
1984 | |
1985 | |
1986 | class OMPTaskgroupDirective : public OMPExecutableDirective { |
1987 | friend class ASTStmtReader; |
1988 | |
1989 | |
1990 | |
1991 | |
1992 | |
1993 | |
1994 | OMPTaskgroupDirective(SourceLocation StartLoc, SourceLocation EndLoc, |
1995 | unsigned NumClauses) |
1996 | : OMPExecutableDirective(this, OMPTaskgroupDirectiveClass, OMPD_taskgroup, |
1997 | StartLoc, EndLoc, NumClauses, 2) {} |
1998 | |
1999 | |
2000 | |
2001 | |
2002 | explicit OMPTaskgroupDirective(unsigned NumClauses) |
2003 | : OMPExecutableDirective(this, OMPTaskgroupDirectiveClass, OMPD_taskgroup, |
2004 | SourceLocation(), SourceLocation(), NumClauses, |
2005 | 2) {} |
2006 | |
2007 | |
2008 | void setReductionRef(Expr *RR) { |
2009 | *std::next(child_begin(), 1) = RR; |
2010 | } |
2011 | |
2012 | public: |
2013 | |
2014 | |
2015 | |
2016 | |
2017 | |
2018 | |
2019 | |
2020 | |
2021 | |
2022 | static OMPTaskgroupDirective * |
2023 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
2024 | ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, |
2025 | Expr *ReductionRef); |
2026 | |
2027 | |
2028 | |
2029 | |
2030 | |
2031 | |
2032 | static OMPTaskgroupDirective *CreateEmpty(const ASTContext &C, |
2033 | unsigned NumClauses, EmptyShell); |
2034 | |
2035 | |
2036 | |
2037 | const Expr *getReductionRef() const { |
2038 | return static_cast<const Expr *>(*std::next(child_begin(), 1)); |
2039 | } |
2040 | Expr *getReductionRef() { |
2041 | return static_cast<Expr *>(*std::next(child_begin(), 1)); |
2042 | } |
2043 | |
2044 | static bool classof(const Stmt *T) { |
2045 | return T->getStmtClass() == OMPTaskgroupDirectiveClass; |
2046 | } |
2047 | }; |
2048 | |
2049 | |
2050 | |
2051 | |
2052 | |
2053 | |
2054 | |
2055 | |
2056 | |
2057 | |
2058 | |
2059 | class OMPFlushDirective : public OMPExecutableDirective { |
2060 | friend class ASTStmtReader; |
2061 | |
2062 | |
2063 | |
2064 | |
2065 | |
2066 | |
2067 | OMPFlushDirective(SourceLocation StartLoc, SourceLocation EndLoc, |
2068 | unsigned NumClauses) |
2069 | : OMPExecutableDirective(this, OMPFlushDirectiveClass, OMPD_flush, |
2070 | StartLoc, EndLoc, NumClauses, 0) {} |
2071 | |
2072 | |
2073 | |
2074 | |
2075 | |
2076 | explicit OMPFlushDirective(unsigned NumClauses) |
2077 | : OMPExecutableDirective(this, OMPFlushDirectiveClass, OMPD_flush, |
2078 | SourceLocation(), SourceLocation(), NumClauses, |
2079 | 0) {} |
2080 | |
2081 | public: |
2082 | |
2083 | |
2084 | |
2085 | |
2086 | |
2087 | |
2088 | |
2089 | |
2090 | static OMPFlushDirective *Create(const ASTContext &C, SourceLocation StartLoc, |
2091 | SourceLocation EndLoc, |
2092 | ArrayRef<OMPClause *> Clauses); |
2093 | |
2094 | |
2095 | |
2096 | |
2097 | |
2098 | |
2099 | |
2100 | static OMPFlushDirective *CreateEmpty(const ASTContext &C, |
2101 | unsigned NumClauses, EmptyShell); |
2102 | |
2103 | static bool classof(const Stmt *T) { |
2104 | return T->getStmtClass() == OMPFlushDirectiveClass; |
2105 | } |
2106 | }; |
2107 | |
2108 | |
2109 | |
2110 | |
2111 | |
2112 | |
2113 | |
2114 | class OMPOrderedDirective : public OMPExecutableDirective { |
2115 | friend class ASTStmtReader; |
2116 | |
2117 | |
2118 | |
2119 | |
2120 | |
2121 | |
2122 | OMPOrderedDirective(SourceLocation StartLoc, SourceLocation EndLoc, |
2123 | unsigned NumClauses) |
2124 | : OMPExecutableDirective(this, OMPOrderedDirectiveClass, OMPD_ordered, |
2125 | StartLoc, EndLoc, NumClauses, 1) {} |
2126 | |
2127 | |
2128 | |
2129 | |
2130 | |
2131 | explicit OMPOrderedDirective(unsigned NumClauses) |
2132 | : OMPExecutableDirective(this, OMPOrderedDirectiveClass, OMPD_ordered, |
2133 | SourceLocation(), SourceLocation(), NumClauses, |
2134 | 1) {} |
2135 | |
2136 | public: |
2137 | |
2138 | |
2139 | |
2140 | |
2141 | |
2142 | |
2143 | |
2144 | |
2145 | static OMPOrderedDirective * |
2146 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
2147 | ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt); |
2148 | |
2149 | |
2150 | |
2151 | |
2152 | |
2153 | |
2154 | static OMPOrderedDirective *CreateEmpty(const ASTContext &C, |
2155 | unsigned NumClauses, EmptyShell); |
2156 | |
2157 | static bool classof(const Stmt *T) { |
2158 | return T->getStmtClass() == OMPOrderedDirectiveClass; |
2159 | } |
2160 | }; |
2161 | |
2162 | |
2163 | |
2164 | |
2165 | |
2166 | |
2167 | |
2168 | |
2169 | class OMPAtomicDirective : public OMPExecutableDirective { |
2170 | friend class ASTStmtReader; |
2171 | |
2172 | |
2173 | |
2174 | |
2175 | |
2176 | |
2177 | |
2178 | |
2179 | |
2180 | bool IsXLHSInRHSPart; |
2181 | |
2182 | |
2183 | |
2184 | |
2185 | |
2186 | |
2187 | |
2188 | |
2189 | bool IsPostfixUpdate; |
2190 | |
2191 | |
2192 | |
2193 | |
2194 | |
2195 | |
2196 | |
2197 | OMPAtomicDirective(SourceLocation StartLoc, SourceLocation EndLoc, |
2198 | unsigned NumClauses) |
2199 | : OMPExecutableDirective(this, OMPAtomicDirectiveClass, OMPD_atomic, |
2200 | StartLoc, EndLoc, NumClauses, 5), |
2201 | IsXLHSInRHSPart(false), IsPostfixUpdate(false) {} |
2202 | |
2203 | |
2204 | |
2205 | |
2206 | |
2207 | explicit OMPAtomicDirective(unsigned NumClauses) |
2208 | : OMPExecutableDirective(this, OMPAtomicDirectiveClass, OMPD_atomic, |
2209 | SourceLocation(), SourceLocation(), NumClauses, |
2210 | 5), |
2211 | IsXLHSInRHSPart(false), IsPostfixUpdate(false) {} |
2212 | |
2213 | |
2214 | void setX(Expr *X) { *std::next(child_begin()) = X; } |
2215 | |
2216 | |
2217 | |
2218 | void setUpdateExpr(Expr *UE) { *std::next(child_begin(), 2) = UE; } |
2219 | |
2220 | void setV(Expr *V) { *std::next(child_begin(), 3) = V; } |
2221 | |
2222 | void setExpr(Expr *E) { *std::next(child_begin(), 4) = E; } |
2223 | |
2224 | public: |
2225 | |
2226 | |
2227 | |
2228 | |
2229 | |
2230 | |
2231 | |
2232 | |
2233 | |
2234 | |
2235 | |
2236 | |
2237 | |
2238 | |
2239 | |
2240 | |
2241 | |
2242 | |
2243 | |
2244 | static OMPAtomicDirective * |
2245 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
2246 | ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *X, Expr *V, |
2247 | Expr *E, Expr *UE, bool IsXLHSInRHSPart, bool IsPostfixUpdate); |
2248 | |
2249 | |
2250 | |
2251 | |
2252 | |
2253 | |
2254 | |
2255 | static OMPAtomicDirective *CreateEmpty(const ASTContext &C, |
2256 | unsigned NumClauses, EmptyShell); |
2257 | |
2258 | |
2259 | Expr *getX() { return cast_or_null<Expr>(*std::next(child_begin())); } |
2260 | const Expr *getX() const { |
2261 | return cast_or_null<Expr>(*std::next(child_begin())); |
2262 | } |
2263 | |
2264 | |
2265 | |
2266 | Expr *getUpdateExpr() { |
2267 | return cast_or_null<Expr>(*std::next(child_begin(), 2)); |
2268 | } |
2269 | const Expr *getUpdateExpr() const { |
2270 | return cast_or_null<Expr>(*std::next(child_begin(), 2)); |
2271 | } |
2272 | |
2273 | |
2274 | |
2275 | bool isXLHSInRHSPart() const { return IsXLHSInRHSPart; } |
2276 | |
2277 | |
2278 | bool isPostfixUpdate() const { return IsPostfixUpdate; } |
2279 | |
2280 | Expr *getV() { return cast_or_null<Expr>(*std::next(child_begin(), 3)); } |
2281 | const Expr *getV() const { |
2282 | return cast_or_null<Expr>(*std::next(child_begin(), 3)); |
2283 | } |
2284 | |
2285 | Expr *getExpr() { return cast_or_null<Expr>(*std::next(child_begin(), 4)); } |
2286 | const Expr *getExpr() const { |
2287 | return cast_or_null<Expr>(*std::next(child_begin(), 4)); |
2288 | } |
2289 | |
2290 | static bool classof(const Stmt *T) { |
2291 | return T->getStmtClass() == OMPAtomicDirectiveClass; |
2292 | } |
2293 | }; |
2294 | |
2295 | |
2296 | |
2297 | |
2298 | |
2299 | |
2300 | |
2301 | |
2302 | |
2303 | class OMPTargetDirective : public OMPExecutableDirective { |
2304 | friend class ASTStmtReader; |
2305 | |
2306 | |
2307 | |
2308 | |
2309 | |
2310 | |
2311 | OMPTargetDirective(SourceLocation StartLoc, SourceLocation EndLoc, |
2312 | unsigned NumClauses) |
2313 | : OMPExecutableDirective(this, OMPTargetDirectiveClass, OMPD_target, |
2314 | StartLoc, EndLoc, NumClauses, 1) {} |
2315 | |
2316 | |
2317 | |
2318 | |
2319 | |
2320 | explicit OMPTargetDirective(unsigned NumClauses) |
2321 | : OMPExecutableDirective(this, OMPTargetDirectiveClass, OMPD_target, |
2322 | SourceLocation(), SourceLocation(), NumClauses, |
2323 | 1) {} |
2324 | |
2325 | public: |
2326 | |
2327 | |
2328 | |
2329 | |
2330 | |
2331 | |
2332 | |
2333 | |
2334 | static OMPTargetDirective * |
2335 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
2336 | ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt); |
2337 | |
2338 | |
2339 | |
2340 | |
2341 | |
2342 | |
2343 | |
2344 | static OMPTargetDirective *CreateEmpty(const ASTContext &C, |
2345 | unsigned NumClauses, EmptyShell); |
2346 | |
2347 | static bool classof(const Stmt *T) { |
2348 | return T->getStmtClass() == OMPTargetDirectiveClass; |
2349 | } |
2350 | }; |
2351 | |
2352 | |
2353 | |
2354 | |
2355 | |
2356 | |
2357 | |
2358 | |
2359 | |
2360 | |
2361 | class OMPTargetDataDirective : public OMPExecutableDirective { |
2362 | friend class ASTStmtReader; |
2363 | |
2364 | |
2365 | |
2366 | |
2367 | |
2368 | |
2369 | OMPTargetDataDirective(SourceLocation StartLoc, SourceLocation EndLoc, |
2370 | unsigned NumClauses) |
2371 | : OMPExecutableDirective(this, OMPTargetDataDirectiveClass, |
2372 | OMPD_target_data, StartLoc, EndLoc, NumClauses, |
2373 | 1) {} |
2374 | |
2375 | |
2376 | |
2377 | |
2378 | |
2379 | explicit OMPTargetDataDirective(unsigned NumClauses) |
2380 | : OMPExecutableDirective(this, OMPTargetDataDirectiveClass, |
2381 | OMPD_target_data, SourceLocation(), |
2382 | SourceLocation(), NumClauses, 1) {} |
2383 | |
2384 | public: |
2385 | |
2386 | |
2387 | |
2388 | |
2389 | |
2390 | |
2391 | |
2392 | |
2393 | static OMPTargetDataDirective * |
2394 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
2395 | ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt); |
2396 | |
2397 | |
2398 | |
2399 | |
2400 | |
2401 | |
2402 | static OMPTargetDataDirective *CreateEmpty(const ASTContext &C, unsigned N, |
2403 | EmptyShell); |
2404 | |
2405 | static bool classof(const Stmt *T) { |
2406 | return T->getStmtClass() == OMPTargetDataDirectiveClass; |
2407 | } |
2408 | }; |
2409 | |
2410 | |
2411 | |
2412 | |
2413 | |
2414 | |
2415 | |
2416 | |
2417 | |
2418 | |
2419 | class OMPTargetEnterDataDirective : public OMPExecutableDirective { |
2420 | friend class ASTStmtReader; |
2421 | |
2422 | |
2423 | |
2424 | |
2425 | |
2426 | |
2427 | OMPTargetEnterDataDirective(SourceLocation StartLoc, SourceLocation EndLoc, |
2428 | unsigned NumClauses) |
2429 | : OMPExecutableDirective(this, OMPTargetEnterDataDirectiveClass, |
2430 | OMPD_target_enter_data, StartLoc, EndLoc, |
2431 | NumClauses, ) {} |
2432 | |
2433 | |
2434 | |
2435 | |
2436 | |
2437 | explicit OMPTargetEnterDataDirective(unsigned NumClauses) |
2438 | : OMPExecutableDirective(this, OMPTargetEnterDataDirectiveClass, |
2439 | OMPD_target_enter_data, SourceLocation(), |
2440 | SourceLocation(), NumClauses, |
2441 | ) {} |
2442 | |
2443 | public: |
2444 | |
2445 | |
2446 | |
2447 | |
2448 | |
2449 | |
2450 | |
2451 | |
2452 | static OMPTargetEnterDataDirective * |
2453 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
2454 | ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt); |
2455 | |
2456 | |
2457 | |
2458 | |
2459 | |
2460 | |
2461 | static OMPTargetEnterDataDirective *CreateEmpty(const ASTContext &C, |
2462 | unsigned N, EmptyShell); |
2463 | |
2464 | static bool classof(const Stmt *T) { |
2465 | return T->getStmtClass() == OMPTargetEnterDataDirectiveClass; |
2466 | } |
2467 | }; |
2468 | |
2469 | |
2470 | |
2471 | |
2472 | |
2473 | |
2474 | |
2475 | |
2476 | |
2477 | |
2478 | class OMPTargetExitDataDirective : public OMPExecutableDirective { |
2479 | friend class ASTStmtReader; |
2480 | |
2481 | |
2482 | |
2483 | |
2484 | |
2485 | |
2486 | OMPTargetExitDataDirective(SourceLocation StartLoc, SourceLocation EndLoc, |
2487 | unsigned NumClauses) |
2488 | : OMPExecutableDirective(this, OMPTargetExitDataDirectiveClass, |
2489 | OMPD_target_exit_data, StartLoc, EndLoc, |
2490 | NumClauses, ) {} |
2491 | |
2492 | |
2493 | |
2494 | |
2495 | |
2496 | explicit OMPTargetExitDataDirective(unsigned NumClauses) |
2497 | : OMPExecutableDirective(this, OMPTargetExitDataDirectiveClass, |
2498 | OMPD_target_exit_data, SourceLocation(), |
2499 | SourceLocation(), NumClauses, |
2500 | ) {} |
2501 | |
2502 | public: |
2503 | |
2504 | |
2505 | |
2506 | |
2507 | |
2508 | |
2509 | |
2510 | |
2511 | static OMPTargetExitDataDirective * |
2512 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
2513 | ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt); |
2514 | |
2515 | |
2516 | |
2517 | |
2518 | |
2519 | |
2520 | static OMPTargetExitDataDirective *CreateEmpty(const ASTContext &C, |
2521 | unsigned N, EmptyShell); |
2522 | |
2523 | static bool classof(const Stmt *T) { |
2524 | return T->getStmtClass() == OMPTargetExitDataDirectiveClass; |
2525 | } |
2526 | }; |
2527 | |
2528 | |
2529 | |
2530 | |
2531 | |
2532 | |
2533 | |
2534 | |
2535 | |
2536 | class OMPTargetParallelDirective : public OMPExecutableDirective { |
2537 | friend class ASTStmtReader; |
2538 | |
2539 | |
2540 | |
2541 | |
2542 | |
2543 | |
2544 | OMPTargetParallelDirective(SourceLocation StartLoc, SourceLocation EndLoc, |
2545 | unsigned NumClauses) |
2546 | : OMPExecutableDirective(this, OMPTargetParallelDirectiveClass, |
2547 | OMPD_target_parallel, StartLoc, EndLoc, |
2548 | NumClauses, ) {} |
2549 | |
2550 | |
2551 | |
2552 | |
2553 | |
2554 | explicit OMPTargetParallelDirective(unsigned NumClauses) |
2555 | : OMPExecutableDirective(this, OMPTargetParallelDirectiveClass, |
2556 | OMPD_target_parallel, SourceLocation(), |
2557 | SourceLocation(), NumClauses, |
2558 | ) {} |
2559 | |
2560 | public: |
2561 | |
2562 | |
2563 | |
2564 | |
2565 | |
2566 | |
2567 | |
2568 | |
2569 | static OMPTargetParallelDirective * |
2570 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
2571 | ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt); |
2572 | |
2573 | |
2574 | |
2575 | |
2576 | |
2577 | |
2578 | |
2579 | static OMPTargetParallelDirective * |
2580 | CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell); |
2581 | |
2582 | static bool classof(const Stmt *T) { |
2583 | return T->getStmtClass() == OMPTargetParallelDirectiveClass; |
2584 | } |
2585 | }; |
2586 | |
2587 | |
2588 | |
2589 | |
2590 | |
2591 | |
2592 | |
2593 | |
2594 | |
2595 | |
2596 | class OMPTargetParallelForDirective : public OMPLoopDirective { |
2597 | friend class ASTStmtReader; |
2598 | |
2599 | |
2600 | bool HasCancel; |
2601 | |
2602 | |
2603 | |
2604 | |
2605 | |
2606 | |
2607 | |
2608 | |
2609 | OMPTargetParallelForDirective(SourceLocation StartLoc, SourceLocation EndLoc, |
2610 | unsigned CollapsedNum, unsigned NumClauses) |
2611 | : OMPLoopDirective(this, OMPTargetParallelForDirectiveClass, |
2612 | OMPD_target_parallel_for, StartLoc, EndLoc, |
2613 | CollapsedNum, NumClauses), |
2614 | HasCancel(false) {} |
2615 | |
2616 | |
2617 | |
2618 | |
2619 | |
2620 | |
2621 | explicit OMPTargetParallelForDirective(unsigned CollapsedNum, |
2622 | unsigned NumClauses) |
2623 | : OMPLoopDirective(this, OMPTargetParallelForDirectiveClass, |
2624 | OMPD_target_parallel_for, SourceLocation(), |
2625 | SourceLocation(), CollapsedNum, NumClauses), |
2626 | HasCancel(false) {} |
2627 | |
2628 | |
2629 | void setHasCancel(bool Has) { HasCancel = Has; } |
2630 | |
2631 | public: |
2632 | |
2633 | |
2634 | |
2635 | |
2636 | |
2637 | |
2638 | |
2639 | |
2640 | |
2641 | |
2642 | |
2643 | static OMPTargetParallelForDirective * |
2644 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
2645 | unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, |
2646 | Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel); |
2647 | |
2648 | |
2649 | |
2650 | |
2651 | |
2652 | |
2653 | |
2654 | |
2655 | static OMPTargetParallelForDirective *CreateEmpty(const ASTContext &C, |
2656 | unsigned NumClauses, |
2657 | unsigned CollapsedNum, |
2658 | EmptyShell); |
2659 | |
2660 | |
2661 | bool hasCancel() const { return HasCancel; } |
2662 | |
2663 | static bool classof(const Stmt *T) { |
2664 | return T->getStmtClass() == OMPTargetParallelForDirectiveClass; |
2665 | } |
2666 | }; |
2667 | |
2668 | |
2669 | |
2670 | |
2671 | |
2672 | |
2673 | |
2674 | |
2675 | |
2676 | class OMPTeamsDirective : public OMPExecutableDirective { |
2677 | friend class ASTStmtReader; |
2678 | |
2679 | |
2680 | |
2681 | |
2682 | |
2683 | |
2684 | OMPTeamsDirective(SourceLocation StartLoc, SourceLocation EndLoc, |
2685 | unsigned NumClauses) |
2686 | : OMPExecutableDirective(this, OMPTeamsDirectiveClass, OMPD_teams, |
2687 | StartLoc, EndLoc, NumClauses, 1) {} |
2688 | |
2689 | |
2690 | |
2691 | |
2692 | |
2693 | explicit OMPTeamsDirective(unsigned NumClauses) |
2694 | : OMPExecutableDirective(this, OMPTeamsDirectiveClass, OMPD_teams, |
2695 | SourceLocation(), SourceLocation(), NumClauses, |
2696 | 1) {} |
2697 | |
2698 | public: |
2699 | |
2700 | |
2701 | |
2702 | |
2703 | |
2704 | |
2705 | |
2706 | |
2707 | static OMPTeamsDirective *Create(const ASTContext &C, SourceLocation StartLoc, |
2708 | SourceLocation EndLoc, |
2709 | ArrayRef<OMPClause *> Clauses, |
2710 | Stmt *AssociatedStmt); |
2711 | |
2712 | |
2713 | |
2714 | |
2715 | |
2716 | |
2717 | |
2718 | static OMPTeamsDirective *CreateEmpty(const ASTContext &C, |
2719 | unsigned NumClauses, EmptyShell); |
2720 | |
2721 | static bool classof(const Stmt *T) { |
2722 | return T->getStmtClass() == OMPTeamsDirectiveClass; |
2723 | } |
2724 | }; |
2725 | |
2726 | |
2727 | |
2728 | |
2729 | |
2730 | |
2731 | |
2732 | |
2733 | class OMPCancellationPointDirective : public OMPExecutableDirective { |
2734 | friend class ASTStmtReader; |
2735 | OpenMPDirectiveKind CancelRegion; |
2736 | |
2737 | |
2738 | |
2739 | |
2740 | |
2741 | OMPCancellationPointDirective(SourceLocation StartLoc, SourceLocation EndLoc) |
2742 | : OMPExecutableDirective(this, OMPCancellationPointDirectiveClass, |
2743 | OMPD_cancellation_point, StartLoc, EndLoc, 0, 0), |
2744 | CancelRegion(OMPD_unknown) {} |
2745 | |
2746 | |
2747 | |
2748 | explicit OMPCancellationPointDirective() |
2749 | : OMPExecutableDirective(this, OMPCancellationPointDirectiveClass, |
2750 | OMPD_cancellation_point, SourceLocation(), |
2751 | SourceLocation(), 0, 0), |
2752 | CancelRegion(OMPD_unknown) {} |
2753 | |
2754 | |
2755 | |
2756 | void setCancelRegion(OpenMPDirectiveKind CR) { CancelRegion = CR; } |
2757 | |
2758 | public: |
2759 | |
2760 | |
2761 | |
2762 | |
2763 | |
2764 | |
2765 | static OMPCancellationPointDirective * |
2766 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
2767 | OpenMPDirectiveKind CancelRegion); |
2768 | |
2769 | |
2770 | |
2771 | |
2772 | |
2773 | static OMPCancellationPointDirective *CreateEmpty(const ASTContext &C, |
2774 | EmptyShell); |
2775 | |
2776 | |
2777 | OpenMPDirectiveKind getCancelRegion() const { return CancelRegion; } |
2778 | |
2779 | static bool classof(const Stmt *T) { |
2780 | return T->getStmtClass() == OMPCancellationPointDirectiveClass; |
2781 | } |
2782 | }; |
2783 | |
2784 | |
2785 | |
2786 | |
2787 | |
2788 | |
2789 | |
2790 | |
2791 | class OMPCancelDirective : public OMPExecutableDirective { |
2792 | friend class ASTStmtReader; |
2793 | OpenMPDirectiveKind CancelRegion; |
2794 | |
2795 | |
2796 | |
2797 | |
2798 | |
2799 | |
2800 | OMPCancelDirective(SourceLocation StartLoc, SourceLocation EndLoc, |
2801 | unsigned NumClauses) |
2802 | : OMPExecutableDirective(this, OMPCancelDirectiveClass, OMPD_cancel, |
2803 | StartLoc, EndLoc, NumClauses, 0), |
2804 | CancelRegion(OMPD_unknown) {} |
2805 | |
2806 | |
2807 | |
2808 | |
2809 | explicit OMPCancelDirective(unsigned NumClauses) |
2810 | : OMPExecutableDirective(this, OMPCancelDirectiveClass, OMPD_cancel, |
2811 | SourceLocation(), SourceLocation(), NumClauses, |
2812 | 0), |
2813 | CancelRegion(OMPD_unknown) {} |
2814 | |
2815 | |
2816 | |
2817 | void setCancelRegion(OpenMPDirectiveKind CR) { CancelRegion = CR; } |
2818 | |
2819 | public: |
2820 | |
2821 | |
2822 | |
2823 | |
2824 | |
2825 | |
2826 | |
2827 | static OMPCancelDirective * |
2828 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
2829 | ArrayRef<OMPClause *> Clauses, OpenMPDirectiveKind CancelRegion); |
2830 | |
2831 | |
2832 | |
2833 | |
2834 | |
2835 | |
2836 | static OMPCancelDirective *CreateEmpty(const ASTContext &C, |
2837 | unsigned NumClauses, EmptyShell); |
2838 | |
2839 | |
2840 | OpenMPDirectiveKind getCancelRegion() const { return CancelRegion; } |
2841 | |
2842 | static bool classof(const Stmt *T) { |
2843 | return T->getStmtClass() == OMPCancelDirectiveClass; |
2844 | } |
2845 | }; |
2846 | |
2847 | |
2848 | |
2849 | |
2850 | |
2851 | |
2852 | |
2853 | |
2854 | |
2855 | |
2856 | class OMPTaskLoopDirective : public OMPLoopDirective { |
2857 | friend class ASTStmtReader; |
2858 | |
2859 | |
2860 | |
2861 | |
2862 | |
2863 | |
2864 | |
2865 | OMPTaskLoopDirective(SourceLocation StartLoc, SourceLocation EndLoc, |
2866 | unsigned CollapsedNum, unsigned NumClauses) |
2867 | : OMPLoopDirective(this, OMPTaskLoopDirectiveClass, OMPD_taskloop, |
2868 | StartLoc, EndLoc, CollapsedNum, NumClauses) {} |
2869 | |
2870 | |
2871 | |
2872 | |
2873 | |
2874 | |
2875 | explicit OMPTaskLoopDirective(unsigned CollapsedNum, unsigned NumClauses) |
2876 | : OMPLoopDirective(this, OMPTaskLoopDirectiveClass, OMPD_taskloop, |
2877 | SourceLocation(), SourceLocation(), CollapsedNum, |
2878 | NumClauses) {} |
2879 | |
2880 | public: |
2881 | |
2882 | |
2883 | |
2884 | |
2885 | |
2886 | |
2887 | |
2888 | |
2889 | |
2890 | |
2891 | static OMPTaskLoopDirective * |
2892 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
2893 | unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, |
2894 | Stmt *AssociatedStmt, const HelperExprs &Exprs); |
2895 | |
2896 | |
2897 | |
2898 | |
2899 | |
2900 | |
2901 | |
2902 | |
2903 | static OMPTaskLoopDirective *CreateEmpty(const ASTContext &C, |
2904 | unsigned NumClauses, |
2905 | unsigned CollapsedNum, EmptyShell); |
2906 | |
2907 | static bool classof(const Stmt *T) { |
2908 | return T->getStmtClass() == OMPTaskLoopDirectiveClass; |
2909 | } |
2910 | }; |
2911 | |
2912 | |
2913 | |
2914 | |
2915 | |
2916 | |
2917 | |
2918 | |
2919 | |
2920 | |
2921 | class OMPTaskLoopSimdDirective : public OMPLoopDirective { |
2922 | friend class ASTStmtReader; |
2923 | |
2924 | |
2925 | |
2926 | |
2927 | |
2928 | |
2929 | |
2930 | OMPTaskLoopSimdDirective(SourceLocation StartLoc, SourceLocation EndLoc, |
2931 | unsigned CollapsedNum, unsigned NumClauses) |
2932 | : OMPLoopDirective(this, OMPTaskLoopSimdDirectiveClass, |
2933 | OMPD_taskloop_simd, StartLoc, EndLoc, CollapsedNum, |
2934 | NumClauses) {} |
2935 | |
2936 | |
2937 | |
2938 | |
2939 | |
2940 | |
2941 | explicit OMPTaskLoopSimdDirective(unsigned CollapsedNum, unsigned NumClauses) |
2942 | : OMPLoopDirective(this, OMPTaskLoopSimdDirectiveClass, |
2943 | OMPD_taskloop_simd, SourceLocation(), SourceLocation(), |
2944 | CollapsedNum, NumClauses) {} |
2945 | |
2946 | public: |
2947 | |
2948 | |
2949 | |
2950 | |
2951 | |
2952 | |
2953 | |
2954 | |
2955 | |
2956 | |
2957 | static OMPTaskLoopSimdDirective * |
2958 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
2959 | unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, |
2960 | Stmt *AssociatedStmt, const HelperExprs &Exprs); |
2961 | |
2962 | |
2963 | |
2964 | |
2965 | |
2966 | |
2967 | |
2968 | |
2969 | static OMPTaskLoopSimdDirective *CreateEmpty(const ASTContext &C, |
2970 | unsigned NumClauses, |
2971 | unsigned CollapsedNum, |
2972 | EmptyShell); |
2973 | |
2974 | static bool classof(const Stmt *T) { |
2975 | return T->getStmtClass() == OMPTaskLoopSimdDirectiveClass; |
2976 | } |
2977 | }; |
2978 | |
2979 | |
2980 | |
2981 | |
2982 | |
2983 | |
2984 | |
2985 | |
2986 | |
2987 | class OMPDistributeDirective : public OMPLoopDirective { |
2988 | friend class ASTStmtReader; |
2989 | |
2990 | |
2991 | |
2992 | |
2993 | |
2994 | |
2995 | |
2996 | |
2997 | OMPDistributeDirective(SourceLocation StartLoc, SourceLocation EndLoc, |
2998 | unsigned CollapsedNum, unsigned NumClauses) |
2999 | : OMPLoopDirective(this, OMPDistributeDirectiveClass, OMPD_distribute, |
3000 | StartLoc, EndLoc, CollapsedNum, NumClauses) |
3001 | {} |
3002 | |
3003 | |
3004 | |
3005 | |
3006 | |
3007 | |
3008 | explicit OMPDistributeDirective(unsigned CollapsedNum, unsigned NumClauses) |
3009 | : OMPLoopDirective(this, OMPDistributeDirectiveClass, OMPD_distribute, |
3010 | SourceLocation(), SourceLocation(), CollapsedNum, |
3011 | NumClauses) |
3012 | {} |
3013 | |
3014 | public: |
3015 | |
3016 | |
3017 | |
3018 | |
3019 | |
3020 | |
3021 | |
3022 | |
3023 | |
3024 | |
3025 | static OMPDistributeDirective * |
3026 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
3027 | unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, |
3028 | Stmt *AssociatedStmt, const HelperExprs &Exprs); |
3029 | |
3030 | |
3031 | |
3032 | |
3033 | |
3034 | |
3035 | |
3036 | |
3037 | static OMPDistributeDirective *CreateEmpty(const ASTContext &C, |
3038 | unsigned NumClauses, |
3039 | unsigned CollapsedNum, EmptyShell); |
3040 | |
3041 | static bool classof(const Stmt *T) { |
3042 | return T->getStmtClass() == OMPDistributeDirectiveClass; |
3043 | } |
3044 | }; |
3045 | |
3046 | |
3047 | |
3048 | |
3049 | |
3050 | |
3051 | |
3052 | |
3053 | |
3054 | |
3055 | class OMPTargetUpdateDirective : public OMPExecutableDirective { |
3056 | friend class ASTStmtReader; |
3057 | |
3058 | |
3059 | |
3060 | |
3061 | |
3062 | |
3063 | OMPTargetUpdateDirective(SourceLocation StartLoc, SourceLocation EndLoc, |
3064 | unsigned NumClauses) |
3065 | : OMPExecutableDirective(this, OMPTargetUpdateDirectiveClass, |
3066 | OMPD_target_update, StartLoc, EndLoc, NumClauses, |
3067 | 1) {} |
3068 | |
3069 | |
3070 | |
3071 | |
3072 | |
3073 | explicit OMPTargetUpdateDirective(unsigned NumClauses) |
3074 | : OMPExecutableDirective(this, OMPTargetUpdateDirectiveClass, |
3075 | OMPD_target_update, SourceLocation(), |
3076 | SourceLocation(), NumClauses, 1) {} |
3077 | |
3078 | public: |
3079 | |
3080 | |
3081 | |
3082 | |
3083 | |
3084 | |
3085 | |
3086 | |
3087 | static OMPTargetUpdateDirective * |
3088 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
3089 | ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt); |
3090 | |
3091 | |
3092 | |
3093 | |
3094 | |
3095 | |
3096 | |
3097 | static OMPTargetUpdateDirective *CreateEmpty(const ASTContext &C, |
3098 | unsigned NumClauses, EmptyShell); |
3099 | |
3100 | static bool classof(const Stmt *T) { |
3101 | return T->getStmtClass() == OMPTargetUpdateDirectiveClass; |
3102 | } |
3103 | }; |
3104 | |
3105 | |
3106 | |
3107 | |
3108 | |
3109 | |
3110 | |
3111 | |
3112 | |
3113 | |
3114 | class OMPDistributeParallelForDirective : public OMPLoopDirective { |
3115 | friend class ASTStmtReader; |
3116 | |
3117 | bool HasCancel = false; |
3118 | |
3119 | |
3120 | |
3121 | |
3122 | |
3123 | |
3124 | |
3125 | |
3126 | OMPDistributeParallelForDirective(SourceLocation StartLoc, |
3127 | SourceLocation EndLoc, |
3128 | unsigned CollapsedNum, unsigned NumClauses) |
3129 | : OMPLoopDirective(this, OMPDistributeParallelForDirectiveClass, |
3130 | OMPD_distribute_parallel_for, StartLoc, EndLoc, |
3131 | CollapsedNum, NumClauses), HasCancel(false) {} |
3132 | |
3133 | |
3134 | |
3135 | |
3136 | |
3137 | |
3138 | explicit OMPDistributeParallelForDirective(unsigned CollapsedNum, |
3139 | unsigned NumClauses) |
3140 | : OMPLoopDirective(this, OMPDistributeParallelForDirectiveClass, |
3141 | OMPD_distribute_parallel_for, SourceLocation(), |
3142 | SourceLocation(), CollapsedNum, NumClauses), |
3143 | HasCancel(false) {} |
3144 | |
3145 | |
3146 | void setHasCancel(bool Has) { HasCancel = Has; } |
3147 | |
3148 | public: |
3149 | |
3150 | |
3151 | |
3152 | |
3153 | |
3154 | |
3155 | |
3156 | |
3157 | |
3158 | |
3159 | |
3160 | static OMPDistributeParallelForDirective * |
3161 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
3162 | unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, |
3163 | Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel); |
3164 | |
3165 | |
3166 | |
3167 | |
3168 | |
3169 | |
3170 | |
3171 | |
3172 | static OMPDistributeParallelForDirective *CreateEmpty(const ASTContext &C, |
3173 | unsigned NumClauses, |
3174 | unsigned CollapsedNum, |
3175 | EmptyShell); |
3176 | |
3177 | |
3178 | bool hasCancel() const { return HasCancel; } |
3179 | |
3180 | static bool classof(const Stmt *T) { |
3181 | return T->getStmtClass() == OMPDistributeParallelForDirectiveClass; |
3182 | } |
3183 | }; |
3184 | |
3185 | |
3186 | |
3187 | |
3188 | |
3189 | |
3190 | |
3191 | |
3192 | |
3193 | |
3194 | class OMPDistributeParallelForSimdDirective final : public OMPLoopDirective { |
3195 | friend class ASTStmtReader; |
3196 | |
3197 | |
3198 | |
3199 | |
3200 | |
3201 | |
3202 | |
3203 | |
3204 | OMPDistributeParallelForSimdDirective(SourceLocation StartLoc, |
3205 | SourceLocation EndLoc, |
3206 | unsigned CollapsedNum, |
3207 | unsigned NumClauses) |
3208 | : OMPLoopDirective(this, OMPDistributeParallelForSimdDirectiveClass, |
3209 | OMPD_distribute_parallel_for_simd, StartLoc, |
3210 | EndLoc, CollapsedNum, NumClauses) {} |
3211 | |
3212 | |
3213 | |
3214 | |
3215 | |
3216 | |
3217 | explicit OMPDistributeParallelForSimdDirective(unsigned CollapsedNum, |
3218 | unsigned NumClauses) |
3219 | : OMPLoopDirective(this, OMPDistributeParallelForSimdDirectiveClass, |
3220 | OMPD_distribute_parallel_for_simd, |
3221 | SourceLocation(), SourceLocation(), CollapsedNum, |
3222 | NumClauses) {} |
3223 | |
3224 | public: |
3225 | |
3226 | |
3227 | |
3228 | |
3229 | |
3230 | |
3231 | |
3232 | |
3233 | |
3234 | |
3235 | static OMPDistributeParallelForSimdDirective *Create( |
3236 | const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
3237 | unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, |
3238 | Stmt *AssociatedStmt, const HelperExprs &Exprs); |
3239 | |
3240 | |
3241 | |
3242 | |
3243 | |
3244 | |
3245 | |
3246 | static OMPDistributeParallelForSimdDirective *CreateEmpty( |
3247 | const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, |
3248 | EmptyShell); |
3249 | |
3250 | static bool classof(const Stmt *T) { |
3251 | return T->getStmtClass() == OMPDistributeParallelForSimdDirectiveClass; |
3252 | } |
3253 | }; |
3254 | |
3255 | |
3256 | |
3257 | |
3258 | |
3259 | |
3260 | |
3261 | |
3262 | |
3263 | class OMPDistributeSimdDirective final : public OMPLoopDirective { |
3264 | friend class ASTStmtReader; |
3265 | |
3266 | |
3267 | |
3268 | |
3269 | |
3270 | |
3271 | |
3272 | |
3273 | OMPDistributeSimdDirective(SourceLocation StartLoc, SourceLocation EndLoc, |
3274 | unsigned CollapsedNum, unsigned NumClauses) |
3275 | : OMPLoopDirective(this, OMPDistributeSimdDirectiveClass, |
3276 | OMPD_distribute_simd, StartLoc, EndLoc, CollapsedNum, |
3277 | NumClauses) {} |
3278 | |
3279 | |
3280 | |
3281 | |
3282 | |
3283 | |
3284 | explicit OMPDistributeSimdDirective(unsigned CollapsedNum, |
3285 | unsigned NumClauses) |
3286 | : OMPLoopDirective(this, OMPDistributeSimdDirectiveClass, |
3287 | OMPD_distribute_simd, SourceLocation(), |
3288 | SourceLocation(), CollapsedNum, NumClauses) {} |
3289 | |
3290 | public: |
3291 | |
3292 | |
3293 | |
3294 | |
3295 | |
3296 | |
3297 | |
3298 | |
3299 | |
3300 | |
3301 | static OMPDistributeSimdDirective * |
3302 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
3303 | unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, |
3304 | Stmt *AssociatedStmt, const HelperExprs &Exprs); |
3305 | |
3306 | |
3307 | |
3308 | |
3309 | |
3310 | |
3311 | |
3312 | static OMPDistributeSimdDirective *CreateEmpty(const ASTContext &C, |
3313 | unsigned NumClauses, |
3314 | unsigned CollapsedNum, |
3315 | EmptyShell); |
3316 | |
3317 | static bool classof(const Stmt *T) { |
3318 | return T->getStmtClass() == OMPDistributeSimdDirectiveClass; |
3319 | } |
3320 | }; |
3321 | |
3322 | |
3323 | |
3324 | |
3325 | |
3326 | |
3327 | |
3328 | |
3329 | |
3330 | |
3331 | class OMPTargetParallelForSimdDirective final : public OMPLoopDirective { |
3332 | friend class ASTStmtReader; |
3333 | |
3334 | |
3335 | |
3336 | |
3337 | |
3338 | |
3339 | |
3340 | |
3341 | OMPTargetParallelForSimdDirective(SourceLocation StartLoc, SourceLocation EndLoc, |
3342 | unsigned CollapsedNum, unsigned NumClauses) |
3343 | : OMPLoopDirective(this, OMPTargetParallelForSimdDirectiveClass, |
3344 | OMPD_target_parallel_for_simd, StartLoc, EndLoc, |
3345 | CollapsedNum, NumClauses) {} |
3346 | |
3347 | |
3348 | |
3349 | |
3350 | |
3351 | |
3352 | explicit OMPTargetParallelForSimdDirective(unsigned CollapsedNum, |
3353 | unsigned NumClauses) |
3354 | : OMPLoopDirective(this, OMPTargetParallelForSimdDirectiveClass, |
3355 | OMPD_target_parallel_for_simd, SourceLocation(), |
3356 | SourceLocation(), CollapsedNum, NumClauses) {} |
3357 | |
3358 | public: |
3359 | |
3360 | |
3361 | |
3362 | |
3363 | |
3364 | |
3365 | |
3366 | |
3367 | |
3368 | |
3369 | static OMPTargetParallelForSimdDirective * |
3370 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
3371 | unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, |
3372 | Stmt *AssociatedStmt, const HelperExprs &Exprs); |
3373 | |
3374 | |
3375 | |
3376 | |
3377 | |
3378 | |
3379 | |
3380 | static OMPTargetParallelForSimdDirective *CreateEmpty(const ASTContext &C, |
3381 | unsigned NumClauses, |
3382 | unsigned CollapsedNum, |
3383 | EmptyShell); |
3384 | |
3385 | static bool classof(const Stmt *T) { |
3386 | return T->getStmtClass() == OMPTargetParallelForSimdDirectiveClass; |
3387 | } |
3388 | }; |
3389 | |
3390 | |
3391 | |
3392 | |
3393 | |
3394 | |
3395 | |
3396 | |
3397 | |
3398 | |
3399 | class OMPTargetSimdDirective final : public OMPLoopDirective { |
3400 | friend class ASTStmtReader; |
3401 | |
3402 | |
3403 | |
3404 | |
3405 | |
3406 | |
3407 | |
3408 | |
3409 | OMPTargetSimdDirective(SourceLocation StartLoc, SourceLocation EndLoc, |
3410 | unsigned CollapsedNum, unsigned NumClauses) |
3411 | : OMPLoopDirective(this, OMPTargetSimdDirectiveClass, |
3412 | OMPD_target_simd, StartLoc, EndLoc, CollapsedNum, |
3413 | NumClauses) {} |
3414 | |
3415 | |
3416 | |
3417 | |
3418 | |
3419 | |
3420 | explicit OMPTargetSimdDirective(unsigned CollapsedNum, unsigned NumClauses) |
3421 | : OMPLoopDirective(this, OMPTargetSimdDirectiveClass, OMPD_target_simd, |
3422 | SourceLocation(),SourceLocation(), CollapsedNum, |
3423 | NumClauses) {} |
3424 | |
3425 | public: |
3426 | |
3427 | |
3428 | |
3429 | |
3430 | |
3431 | |
3432 | |
3433 | |
3434 | |
3435 | |
3436 | static OMPTargetSimdDirective * |
3437 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
3438 | unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, |
3439 | Stmt *AssociatedStmt, const HelperExprs &Exprs); |
3440 | |
3441 | |
3442 | |
3443 | |
3444 | |
3445 | |
3446 | |
3447 | static OMPTargetSimdDirective *CreateEmpty(const ASTContext &C, |
3448 | unsigned NumClauses, |
3449 | unsigned CollapsedNum, |
3450 | EmptyShell); |
3451 | |
3452 | static bool classof(const Stmt *T) { |
3453 | return T->getStmtClass() == OMPTargetSimdDirectiveClass; |
3454 | } |
3455 | }; |
3456 | |
3457 | |
3458 | |
3459 | |
3460 | |
3461 | |
3462 | |
3463 | |
3464 | |
3465 | class OMPTeamsDistributeDirective final : public OMPLoopDirective { |
3466 | friend class ASTStmtReader; |
3467 | |
3468 | |
3469 | |
3470 | |
3471 | |
3472 | |
3473 | |
3474 | |
3475 | OMPTeamsDistributeDirective(SourceLocation StartLoc, SourceLocation EndLoc, |
3476 | unsigned CollapsedNum, unsigned NumClauses) |
3477 | : OMPLoopDirective(this, OMPTeamsDistributeDirectiveClass, |
3478 | OMPD_teams_distribute, StartLoc, EndLoc, |
3479 | CollapsedNum, NumClauses) {} |
3480 | |
3481 | |
3482 | |
3483 | |
3484 | |
3485 | |
3486 | explicit OMPTeamsDistributeDirective(unsigned CollapsedNum, |
3487 | unsigned NumClauses) |
3488 | : OMPLoopDirective(this, OMPTeamsDistributeDirectiveClass, |
3489 | OMPD_teams_distribute, SourceLocation(), |
3490 | SourceLocation(), CollapsedNum, NumClauses) {} |
3491 | |
3492 | public: |
3493 | |
3494 | |
3495 | |
3496 | |
3497 | |
3498 | |
3499 | |
3500 | |
3501 | |
3502 | |
3503 | static OMPTeamsDistributeDirective * |
3504 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
3505 | unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, |
3506 | Stmt *AssociatedStmt, const HelperExprs &Exprs); |
3507 | |
3508 | |
3509 | |
3510 | |
3511 | |
3512 | |
3513 | |
3514 | static OMPTeamsDistributeDirective *CreateEmpty(const ASTContext &C, |
3515 | unsigned NumClauses, |
3516 | unsigned CollapsedNum, |
3517 | EmptyShell); |
3518 | |
3519 | static bool classof(const Stmt *T) { |
3520 | return T->getStmtClass() == OMPTeamsDistributeDirectiveClass; |
3521 | } |
3522 | }; |
3523 | |
3524 | |
3525 | |
3526 | |
3527 | |
3528 | |
3529 | |
3530 | |
3531 | |
3532 | |
3533 | class OMPTeamsDistributeSimdDirective final : public OMPLoopDirective { |
3534 | friend class ASTStmtReader; |
3535 | |
3536 | |
3537 | |
3538 | |
3539 | |
3540 | |
3541 | |
3542 | |
3543 | OMPTeamsDistributeSimdDirective(SourceLocation StartLoc, |
3544 | SourceLocation EndLoc, unsigned CollapsedNum, |
3545 | unsigned NumClauses) |
3546 | : OMPLoopDirective(this, OMPTeamsDistributeSimdDirectiveClass, |
3547 | OMPD_teams_distribute_simd, StartLoc, EndLoc, |
3548 | CollapsedNum, NumClauses) {} |
3549 | |
3550 | |
3551 | |
3552 | |
3553 | |
3554 | |
3555 | explicit OMPTeamsDistributeSimdDirective(unsigned CollapsedNum, |
3556 | unsigned NumClauses) |
3557 | : OMPLoopDirective(this, OMPTeamsDistributeSimdDirectiveClass, |
3558 | OMPD_teams_distribute_simd, SourceLocation(), |
3559 | SourceLocation(), CollapsedNum, NumClauses) {} |
3560 | |
3561 | public: |
3562 | |
3563 | |
3564 | |
3565 | |
3566 | |
3567 | |
3568 | |
3569 | |
3570 | |
3571 | |
3572 | static OMPTeamsDistributeSimdDirective * |
3573 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
3574 | unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, |
3575 | Stmt *AssociatedStmt, const HelperExprs &Exprs); |
3576 | |
3577 | |
3578 | |
3579 | |
3580 | |
3581 | |
3582 | |
3583 | |
3584 | static OMPTeamsDistributeSimdDirective *CreateEmpty(const ASTContext &C, |
3585 | unsigned NumClauses, |
3586 | unsigned CollapsedNum, |
3587 | EmptyShell); |
3588 | |
3589 | static bool classof(const Stmt *T) { |
3590 | return T->getStmtClass() == OMPTeamsDistributeSimdDirectiveClass; |
3591 | } |
3592 | }; |
3593 | |
3594 | |
3595 | |
3596 | |
3597 | |
3598 | |
3599 | |
3600 | |
3601 | |
3602 | |
3603 | class OMPTeamsDistributeParallelForSimdDirective final |
3604 | : public OMPLoopDirective { |
3605 | friend class ASTStmtReader; |
3606 | |
3607 | |
3608 | |
3609 | |
3610 | |
3611 | |
3612 | |
3613 | |
3614 | OMPTeamsDistributeParallelForSimdDirective(SourceLocation StartLoc, |
3615 | SourceLocation EndLoc, |
3616 | unsigned CollapsedNum, |
3617 | unsigned NumClauses) |
3618 | : OMPLoopDirective(this, OMPTeamsDistributeParallelForSimdDirectiveClass, |
3619 | OMPD_teams_distribute_parallel_for_simd, StartLoc, |
3620 | EndLoc, CollapsedNum, NumClauses) {} |
3621 | |
3622 | |
3623 | |
3624 | |
3625 | |
3626 | |
3627 | explicit OMPTeamsDistributeParallelForSimdDirective(unsigned CollapsedNum, |
3628 | unsigned NumClauses) |
3629 | : OMPLoopDirective(this, OMPTeamsDistributeParallelForSimdDirectiveClass, |
3630 | OMPD_teams_distribute_parallel_for_simd, |
3631 | SourceLocation(), SourceLocation(), CollapsedNum, |
3632 | NumClauses) {} |
3633 | |
3634 | public: |
3635 | |
3636 | |
3637 | |
3638 | |
3639 | |
3640 | |
3641 | |
3642 | |
3643 | |
3644 | |
3645 | static OMPTeamsDistributeParallelForSimdDirective * |
3646 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
3647 | unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, |
3648 | Stmt *AssociatedStmt, const HelperExprs &Exprs); |
3649 | |
3650 | |
3651 | |
3652 | |
3653 | |
3654 | |
3655 | |
3656 | static OMPTeamsDistributeParallelForSimdDirective * |
3657 | CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, |
3658 | EmptyShell); |
3659 | |
3660 | static bool classof(const Stmt *T) { |
3661 | return T->getStmtClass() == OMPTeamsDistributeParallelForSimdDirectiveClass; |
3662 | } |
3663 | }; |
3664 | |
3665 | |
3666 | |
3667 | |
3668 | |
3669 | |
3670 | |
3671 | |
3672 | |
3673 | |
3674 | class OMPTeamsDistributeParallelForDirective final : public OMPLoopDirective { |
3675 | friend class ASTStmtReader; |
3676 | |
3677 | bool HasCancel = false; |
3678 | |
3679 | |
3680 | |
3681 | |
3682 | |
3683 | |
3684 | |
3685 | |
3686 | OMPTeamsDistributeParallelForDirective(SourceLocation StartLoc, |
3687 | SourceLocation EndLoc, |
3688 | unsigned CollapsedNum, |
3689 | unsigned NumClauses) |
3690 | : OMPLoopDirective(this, OMPTeamsDistributeParallelForDirectiveClass, |
3691 | OMPD_teams_distribute_parallel_for, StartLoc, EndLoc, |
3692 | CollapsedNum, NumClauses), HasCancel(false) {} |
3693 | |
3694 | |
3695 | |
3696 | |
3697 | |
3698 | |
3699 | explicit OMPTeamsDistributeParallelForDirective(unsigned CollapsedNum, |
3700 | unsigned NumClauses) |
3701 | : OMPLoopDirective(this, OMPTeamsDistributeParallelForDirectiveClass, |
3702 | OMPD_teams_distribute_parallel_for, SourceLocation(), |
3703 | SourceLocation(), CollapsedNum, NumClauses), |
3704 | HasCancel(false) {} |
3705 | |
3706 | |
3707 | void setHasCancel(bool Has) { HasCancel = Has; } |
3708 | |
3709 | public: |
3710 | |
3711 | |
3712 | |
3713 | |
3714 | |
3715 | |
3716 | |
3717 | |
3718 | |
3719 | |
3720 | |
3721 | static OMPTeamsDistributeParallelForDirective * |
3722 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
3723 | unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, |
3724 | Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel); |
3725 | |
3726 | |
3727 | |
3728 | |
3729 | |
3730 | |
3731 | |
3732 | static OMPTeamsDistributeParallelForDirective * |
3733 | CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, |
3734 | EmptyShell); |
3735 | |
3736 | |
3737 | bool hasCancel() const { return HasCancel; } |
3738 | |
3739 | static bool classof(const Stmt *T) { |
3740 | return T->getStmtClass() == OMPTeamsDistributeParallelForDirectiveClass; |
3741 | } |
3742 | }; |
3743 | |
3744 | |
3745 | |
3746 | |
3747 | |
3748 | |
3749 | |
3750 | |
3751 | |
3752 | class OMPTargetTeamsDirective final : public OMPExecutableDirective { |
3753 | friend class ASTStmtReader; |
3754 | |
3755 | |
3756 | |
3757 | |
3758 | |
3759 | |
3760 | OMPTargetTeamsDirective(SourceLocation StartLoc, SourceLocation EndLoc, |
3761 | unsigned NumClauses) |
3762 | : OMPExecutableDirective(this, OMPTargetTeamsDirectiveClass, |
3763 | OMPD_target_teams, StartLoc, EndLoc, NumClauses, |
3764 | 1) {} |
3765 | |
3766 | |
3767 | |
3768 | |
3769 | |
3770 | explicit OMPTargetTeamsDirective(unsigned NumClauses) |
3771 | : OMPExecutableDirective(this, OMPTargetTeamsDirectiveClass, |
3772 | OMPD_target_teams, SourceLocation(), |
3773 | SourceLocation(), NumClauses, 1) {} |
3774 | |
3775 | public: |
3776 | |
3777 | |
3778 | |
3779 | |
3780 | |
3781 | |
3782 | |
3783 | |
3784 | static OMPTargetTeamsDirective *Create(const ASTContext &C, |
3785 | SourceLocation StartLoc, |
3786 | SourceLocation EndLoc, |
3787 | ArrayRef<OMPClause *> Clauses, |
3788 | Stmt *AssociatedStmt); |
3789 | |
3790 | |
3791 | |
3792 | |
3793 | |
3794 | |
3795 | static OMPTargetTeamsDirective *CreateEmpty(const ASTContext &C, |
3796 | unsigned NumClauses, EmptyShell); |
3797 | |
3798 | static bool classof(const Stmt *T) { |
3799 | return T->getStmtClass() == OMPTargetTeamsDirectiveClass; |
3800 | } |
3801 | }; |
3802 | |
3803 | |
3804 | |
3805 | |
3806 | |
3807 | |
3808 | |
3809 | |
3810 | |
3811 | class OMPTargetTeamsDistributeDirective final : public OMPLoopDirective { |
3812 | friend class ASTStmtReader; |
3813 | |
3814 | |
3815 | |
3816 | |
3817 | |
3818 | |
3819 | |
3820 | |
3821 | OMPTargetTeamsDistributeDirective(SourceLocation StartLoc, |
3822 | SourceLocation EndLoc, |
3823 | unsigned CollapsedNum, unsigned NumClauses) |
3824 | : OMPLoopDirective(this, OMPTargetTeamsDistributeDirectiveClass, |
3825 | OMPD_target_teams_distribute, StartLoc, EndLoc, |
3826 | CollapsedNum, NumClauses) {} |
3827 | |
3828 | |
3829 | |
3830 | |
3831 | |
3832 | |
3833 | explicit OMPTargetTeamsDistributeDirective(unsigned CollapsedNum, |
3834 | unsigned NumClauses) |
3835 | : OMPLoopDirective(this, OMPTargetTeamsDistributeDirectiveClass, |
3836 | OMPD_target_teams_distribute, SourceLocation(), |
3837 | SourceLocation(), CollapsedNum, NumClauses) {} |
3838 | |
3839 | public: |
3840 | |
3841 | |
3842 | |
3843 | |
3844 | |
3845 | |
3846 | |
3847 | |
3848 | |
3849 | |
3850 | static OMPTargetTeamsDistributeDirective * |
3851 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
3852 | unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, |
3853 | Stmt *AssociatedStmt, const HelperExprs &Exprs); |
3854 | |
3855 | |
3856 | |
3857 | |
3858 | |
3859 | |
3860 | |
3861 | static OMPTargetTeamsDistributeDirective * |
3862 | CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, |
3863 | EmptyShell); |
3864 | |
3865 | static bool classof(const Stmt *T) { |
3866 | return T->getStmtClass() == OMPTargetTeamsDistributeDirectiveClass; |
3867 | } |
3868 | }; |
3869 | |
3870 | |
3871 | |
3872 | |
3873 | |
3874 | |
3875 | |
3876 | |
3877 | |
3878 | |
3879 | class OMPTargetTeamsDistributeParallelForDirective final |
3880 | : public OMPLoopDirective { |
3881 | friend class ASTStmtReader; |
3882 | |
3883 | bool HasCancel = false; |
3884 | |
3885 | |
3886 | |
3887 | |
3888 | |
3889 | |
3890 | |
3891 | |
3892 | OMPTargetTeamsDistributeParallelForDirective(SourceLocation StartLoc, |
3893 | SourceLocation EndLoc, |
3894 | unsigned CollapsedNum, |
3895 | unsigned NumClauses) |
3896 | : OMPLoopDirective(this, |
3897 | OMPTargetTeamsDistributeParallelForDirectiveClass, |
3898 | OMPD_target_teams_distribute_parallel_for, StartLoc, |
3899 | EndLoc, CollapsedNum, NumClauses), |
3900 | HasCancel(false) {} |
3901 | |
3902 | |
3903 | |
3904 | |
3905 | |
3906 | |
3907 | explicit OMPTargetTeamsDistributeParallelForDirective(unsigned CollapsedNum, |
3908 | unsigned NumClauses) |
3909 | : OMPLoopDirective( |
3910 | this, OMPTargetTeamsDistributeParallelForDirectiveClass, |
3911 | OMPD_target_teams_distribute_parallel_for, SourceLocation(), |
3912 | SourceLocation(), CollapsedNum, NumClauses), |
3913 | HasCancel(false) {} |
3914 | |
3915 | |
3916 | void setHasCancel(bool Has) { HasCancel = Has; } |
3917 | |
3918 | public: |
3919 | |
3920 | |
3921 | |
3922 | |
3923 | |
3924 | |
3925 | |
3926 | |
3927 | |
3928 | |
3929 | |
3930 | static OMPTargetTeamsDistributeParallelForDirective * |
3931 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
3932 | unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, |
3933 | Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel); |
3934 | |
3935 | |
3936 | |
3937 | |
3938 | |
3939 | |
3940 | |
3941 | static OMPTargetTeamsDistributeParallelForDirective * |
3942 | CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, |
3943 | EmptyShell); |
3944 | |
3945 | |
3946 | bool hasCancel() const { return HasCancel; } |
3947 | |
3948 | static bool classof(const Stmt *T) { |
3949 | return T->getStmtClass() == |
3950 | OMPTargetTeamsDistributeParallelForDirectiveClass; |
3951 | } |
3952 | }; |
3953 | |
3954 | |
3955 | |
3956 | |
3957 | |
3958 | |
3959 | |
3960 | |
3961 | |
3962 | |
3963 | class OMPTargetTeamsDistributeParallelForSimdDirective final |
3964 | : public OMPLoopDirective { |
3965 | friend class ASTStmtReader; |
3966 | |
3967 | |
3968 | |
3969 | |
3970 | |
3971 | |
3972 | |
3973 | |
3974 | OMPTargetTeamsDistributeParallelForSimdDirective(SourceLocation StartLoc, |
3975 | SourceLocation EndLoc, |
3976 | unsigned CollapsedNum, |
3977 | unsigned NumClauses) |
3978 | : OMPLoopDirective(this, |
3979 | OMPTargetTeamsDistributeParallelForSimdDirectiveClass, |
3980 | OMPD_target_teams_distribute_parallel_for_simd, |
3981 | StartLoc, EndLoc, CollapsedNum, NumClauses) {} |
3982 | |
3983 | |
3984 | |
3985 | |
3986 | |
3987 | |
3988 | explicit OMPTargetTeamsDistributeParallelForSimdDirective( |
3989 | unsigned CollapsedNum, unsigned NumClauses) |
3990 | : OMPLoopDirective( |
3991 | this, OMPTargetTeamsDistributeParallelForSimdDirectiveClass, |
3992 | OMPD_target_teams_distribute_parallel_for_simd, SourceLocation(), |
3993 | SourceLocation(), CollapsedNum, NumClauses) {} |
3994 | |
3995 | public: |
3996 | |
3997 | |
3998 | |
3999 | |
4000 | |
4001 | |
4002 | |
4003 | |
4004 | |
4005 | |
4006 | static OMPTargetTeamsDistributeParallelForSimdDirective * |
4007 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
4008 | unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, |
4009 | Stmt *AssociatedStmt, const HelperExprs &Exprs); |
4010 | |
4011 | |
4012 | |
4013 | |
4014 | |
4015 | |
4016 | |
4017 | static OMPTargetTeamsDistributeParallelForSimdDirective * |
4018 | CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, |
4019 | EmptyShell); |
4020 | |
4021 | static bool classof(const Stmt *T) { |
4022 | return T->getStmtClass() == |
4023 | OMPTargetTeamsDistributeParallelForSimdDirectiveClass; |
4024 | } |
4025 | }; |
4026 | |
4027 | |
4028 | |
4029 | |
4030 | |
4031 | |
4032 | |
4033 | |
4034 | |
4035 | |
4036 | class OMPTargetTeamsDistributeSimdDirective final : public OMPLoopDirective { |
4037 | friend class ASTStmtReader; |
4038 | |
4039 | |
4040 | |
4041 | |
4042 | |
4043 | |
4044 | |
4045 | |
4046 | OMPTargetTeamsDistributeSimdDirective(SourceLocation StartLoc, |
4047 | SourceLocation EndLoc, |
4048 | unsigned CollapsedNum, |
4049 | unsigned NumClauses) |
4050 | : OMPLoopDirective(this, OMPTargetTeamsDistributeSimdDirectiveClass, |
4051 | OMPD_target_teams_distribute_simd, StartLoc, EndLoc, |
4052 | CollapsedNum, NumClauses) {} |
4053 | |
4054 | |
4055 | |
4056 | |
4057 | |
4058 | |
4059 | explicit OMPTargetTeamsDistributeSimdDirective(unsigned CollapsedNum, |
4060 | unsigned NumClauses) |
4061 | : OMPLoopDirective(this, OMPTargetTeamsDistributeSimdDirectiveClass, |
4062 | OMPD_target_teams_distribute_simd, SourceLocation(), |
4063 | SourceLocation(), CollapsedNum, NumClauses) {} |
4064 | |
4065 | public: |
4066 | |
4067 | |
4068 | |
4069 | |
4070 | |
4071 | |
4072 | |
4073 | |
4074 | |
4075 | |
4076 | static OMPTargetTeamsDistributeSimdDirective * |
4077 | Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, |
4078 | unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, |
4079 | Stmt *AssociatedStmt, const HelperExprs &Exprs); |
4080 | |
4081 | |
4082 | |
4083 | |
4084 | |
4085 | |
4086 | |
4087 | static OMPTargetTeamsDistributeSimdDirective * |
4088 | CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, |
4089 | EmptyShell); |
4090 | |
4091 | static bool classof(const Stmt *T) { |
4092 | return T->getStmtClass() == OMPTargetTeamsDistributeSimdDirectiveClass; |
4093 | } |
4094 | }; |
4095 | |
4096 | } |
4097 | |
4098 | #endif |
4099 | |