clang 20.0.0git
SemaOpenMP.h
Go to the documentation of this file.
1//===----- SemaOpenMP.h -- Semantic Analysis for OpenMP constructs -------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8/// \file
9/// This file declares semantic analysis for OpenMP constructs and
10/// clauses.
11///
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_CLANG_SEMA_SEMAOPENMP_H
15#define LLVM_CLANG_SEMA_SEMAOPENMP_H
16
17#include "clang/AST/ASTFwd.h"
18#include "clang/AST/Attr.h"
24#include "clang/Basic/LLVM.h"
28#include "clang/Sema/DeclSpec.h"
30#include "clang/Sema/SemaBase.h"
31#include "llvm/ADT/DenseMap.h"
32#include "llvm/Frontend/OpenMP/OMP.h.inc"
33#include "llvm/Frontend/OpenMP/OMPConstants.h"
34#include <optional>
35#include <string>
36#include <utility>
37
38namespace clang {
39namespace sema {
40class FunctionScopeInfo;
41} // namespace sema
42
43class DeclContext;
44class DeclGroupRef;
45class ParsedAttr;
46class Scope;
47
48class SemaOpenMP : public SemaBase {
49public:
50 SemaOpenMP(Sema &S);
51
52 friend class Parser;
53 friend class Sema;
54
56 using CapturedParamNameType = std::pair<StringRef, QualType>;
57
58 /// Creates a SemaDiagnosticBuilder that emits the diagnostic if the current
59 /// context is "used as device code".
60 ///
61 /// - If CurContext is a `declare target` function or it is known that the
62 /// function is emitted for the device, emits the diagnostics immediately.
63 /// - If CurContext is a non-`declare target` function and we are compiling
64 /// for the device, creates a diagnostic which is emitted if and when we
65 /// realize that the function will be codegen'ed.
66 ///
67 /// Example usage:
68 ///
69 /// // Variable-length arrays are not allowed in NVPTX device code.
70 /// if (diagIfOpenMPDeviceCode(Loc, diag::err_vla_unsupported))
71 /// return ExprError();
72 /// // Otherwise, continue parsing as normal.
74 unsigned DiagID,
75 const FunctionDecl *FD);
76
77 /// Creates a SemaDiagnosticBuilder that emits the diagnostic if the current
78 /// context is "used as host code".
79 ///
80 /// - If CurContext is a `declare target` function or it is known that the
81 /// function is emitted for the host, emits the diagnostics immediately.
82 /// - If CurContext is a non-host function, just ignore it.
83 ///
84 /// Example usage:
85 ///
86 /// // Variable-length arrays are not allowed in NVPTX device code.
87 /// if (diagIfOpenMPHostode(Loc, diag::err_vla_unsupported))
88 /// return ExprError();
89 /// // Otherwise, continue parsing as normal.
91 unsigned DiagID,
92 const FunctionDecl *FD);
93
94 /// The declarator \p D defines a function in the scope \p S which is nested
95 /// in an `omp begin/end declare variant` scope. In this method we create a
96 /// declaration for \p D and rename \p D according to the OpenMP context
97 /// selector of the surrounding scope. Return all base functions in \p Bases.
99 Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParameterLists,
101
102 /// Register \p D as specialization of all base functions in \p Bases in the
103 /// current `omp begin/end declare variant` scope.
106
107 /// Act on \p D, a function definition inside of an `omp [begin/end] assumes`.
109
110 /// Can we exit an OpenMP declare variant scope at the moment.
112 return !OMPDeclareVariantScopes.empty();
113 }
114
117 bool StrictlyPositive = true,
118 bool SuppressExprDiags = false);
119
120 /// Given the potential call expression \p Call, determine if there is a
121 /// specialization via the OpenMP declare variant mechanism available. If
122 /// there is, return the specialized call expression, otherwise return the
123 /// original \p Call.
125 SourceLocation LParenLoc, MultiExprArg ArgExprs,
126 SourceLocation RParenLoc, Expr *ExecConfig);
127
128 /// Handle a `omp begin declare variant`.
130
131 /// Handle a `omp end declare variant`.
133
134 /// Function tries to capture lambda's captured variables in the OpenMP region
135 /// before the original lambda is captured.
137
138 /// Return true if the provided declaration \a VD should be captured by
139 /// reference.
140 /// \param Level Relative level of nested OpenMP construct for that the check
141 /// is performed.
142 /// \param OpenMPCaptureLevel Capture level within an OpenMP construct.
143 bool isOpenMPCapturedByRef(const ValueDecl *D, unsigned Level,
144 unsigned OpenMPCaptureLevel) const;
145
146 /// Check if the specified variable is used in one of the private
147 /// clauses (private, firstprivate, lastprivate, reduction etc.) in OpenMP
148 /// constructs.
149 VarDecl *isOpenMPCapturedDecl(ValueDecl *D, bool CheckScopeInfo = false,
150 unsigned StopAt = 0);
151
152 /// The member expression(this->fd) needs to be rebuilt in the template
153 /// instantiation to generate private copy for OpenMP when default
154 /// clause is used. The function will return true if default
155 /// cluse is used.
157
160
161 /// If the current region is a loop-based region, mark the start of the loop
162 /// construct.
163 void startOpenMPLoop();
164
165 /// If the current region is a range loop-based region, mark the start of the
166 /// loop construct.
168
169 /// Check if the specified variable is used in 'private' clause.
170 /// \param Level Relative level of nested OpenMP construct for that the check
171 /// is performed.
173 unsigned CapLevel) const;
174
175 /// Sets OpenMP capture kind (OMPC_private, OMPC_firstprivate, OMPC_map etc.)
176 /// for \p FD based on DSA for the provided corresponding captured declaration
177 /// \p D.
178 void setOpenMPCaptureKind(FieldDecl *FD, const ValueDecl *D, unsigned Level);
179
180 /// Check if the specified variable is captured by 'target' directive.
181 /// \param Level Relative level of nested OpenMP construct for that the check
182 /// is performed.
183 bool isOpenMPTargetCapturedDecl(const ValueDecl *D, unsigned Level,
184 unsigned CaptureLevel) const;
185
186 /// Check if the specified global variable must be captured by outer capture
187 /// regions.
188 /// \param Level Relative level of nested OpenMP construct for that
189 /// the check is performed.
190 bool isOpenMPGlobalCapturedDecl(ValueDecl *D, unsigned Level,
191 unsigned CaptureLevel) const;
192
194 Expr *Op);
195 /// Called on start of new data sharing attribute block.
197 const DeclarationNameInfo &DirName, Scope *CurScope,
199 /// Start analysis of clauses.
201 /// End analysis of clauses.
202 void EndOpenMPClause();
203 /// Called on end of data sharing attribute block.
204 void EndOpenMPDSABlock(Stmt *CurDirective);
205
206 /// Check if the current region is an OpenMP loop region and if it is,
207 /// mark loop control variable, used in \p Init for loop initialization, as
208 /// private by default.
209 /// \param Init First part of the for loop.
211
212 /// Called on well-formed '\#pragma omp metadirective' after parsing
213 /// of the associated statement.
215 Stmt *AStmt, SourceLocation StartLoc,
216 SourceLocation EndLoc);
217
218 // OpenMP directives and clauses.
219 /// Called on correct id-expression from the '#pragma omp
220 /// threadprivate'.
222 const DeclarationNameInfo &Id,
224 /// Called on well-formed '#pragma omp threadprivate'.
226 ArrayRef<Expr *> VarList);
227 /// Builds a new OpenMPThreadPrivateDecl and checks its correctness.
229 ArrayRef<Expr *> VarList);
230 /// Called on well-formed '#pragma omp allocate'.
232 ArrayRef<Expr *> VarList,
233 ArrayRef<OMPClause *> Clauses,
234 DeclContext *Owner = nullptr);
235
236 /// Called on well-formed '#pragma omp [begin] assume[s]'.
239 ArrayRef<std::string> Assumptions,
240 bool SkippedClauses);
241
242 /// Check if there is an active global `omp begin assumes` directive.
243 bool isInOpenMPAssumeScope() const { return !OMPAssumeScoped.empty(); }
244
245 /// Check if there is an active global `omp assumes` directive.
246 bool hasGlobalOpenMPAssumes() const { return !OMPAssumeGlobal.empty(); }
247
248 /// Called on well-formed '#pragma omp end assumes'.
250
251 /// Called on well-formed '#pragma omp requires'.
253 ArrayRef<OMPClause *> ClauseList);
254 /// Check restrictions on Requires directive
256 ArrayRef<OMPClause *> Clauses);
257 /// Check if the specified type is allowed to be used in 'omp declare
258 /// reduction' construct.
261 /// Called on start of '#pragma omp declare reduction'.
263 Scope *S, DeclContext *DC, DeclarationName Name,
264 ArrayRef<std::pair<QualType, SourceLocation>> ReductionTypes,
265 AccessSpecifier AS, Decl *PrevDeclInScope = nullptr);
266 /// Initialize declare reduction construct initializer.
268 /// Finish current declare reduction construct initializer.
270 /// Initialize declare reduction construct initializer.
271 /// \return omp_priv variable.
273 /// Finish current declare reduction construct initializer.
275 VarDecl *OmpPrivParm);
276 /// Called at the end of '#pragma omp declare reduction'.
278 Scope *S, DeclGroupPtrTy DeclReductions, bool IsValid);
279
280 /// Check variable declaration in 'omp declare mapper' construct.
282 /// Check if the specified type is allowed to be used in 'omp declare
283 /// mapper' construct.
286 /// Called on start of '#pragma omp declare mapper'.
288 Scope *S, DeclContext *DC, DeclarationName Name, QualType MapperType,
290 Expr *MapperVarRef, ArrayRef<OMPClause *> Clauses,
291 Decl *PrevDeclInScope = nullptr);
292 /// Build the mapper variable of '#pragma omp declare mapper'.
294 QualType MapperType,
295 SourceLocation StartLoc,
296 DeclarationName VN);
298 bool isOpenMPDeclareMapperVarDeclAllowed(const VarDecl *VD) const;
300
302 struct MapInfo {
303 OMPDeclareTargetDeclAttr::MapTypeTy MT;
305 };
306 /// Explicitly listed variables and functions in a 'to' or 'link' clause.
307 llvm::DenseMap<NamedDecl *, MapInfo> ExplicitlyMapped;
308
309 /// The 'device_type' as parsed from the clause.
310 OMPDeclareTargetDeclAttr::DevTypeTy DT = OMPDeclareTargetDeclAttr::DT_Any;
311
312 /// The directive kind, `begin declare target` or `declare target`.
314
315 /// The directive with indirect clause.
316 std::optional<Expr *> Indirect;
317
318 /// The directive location.
320
322 : Kind(Kind), Loc(Loc) {}
323 };
324
325 /// Called on the start of target region i.e. '#pragma omp declare target'.
326 bool ActOnStartOpenMPDeclareTargetContext(DeclareTargetContextInfo &DTCI);
327
328 /// Called at the end of target region i.e. '#pragma omp end declare target'.
329 const DeclareTargetContextInfo ActOnOpenMPEndDeclareTargetDirective();
330
331 /// Called once a target context is completed, that can be when a
332 /// '#pragma omp end declare target' was encountered or when a
333 /// '#pragma omp declare target' without declaration-definition-seq was
334 /// encountered.
335 void ActOnFinishedOpenMPDeclareTargetContext(DeclareTargetContextInfo &DTCI);
336
337 /// Report unterminated 'omp declare target' or 'omp begin declare target' at
338 /// the end of a compilation unit.
340
341 /// Searches for the provided declaration name for OpenMP declare target
342 /// directive.
344 CXXScopeSpec &ScopeSpec,
345 const DeclarationNameInfo &Id);
346
347 /// Called on correct id-expression from the '#pragma omp declare target'.
349 OMPDeclareTargetDeclAttr::MapTypeTy MT,
350 DeclareTargetContextInfo &DTCI);
351
352 /// Check declaration inside target region.
353 void
356
357 /// Adds OMPDeclareTargetDeclAttr to referenced variables in declare target
358 /// directive.
360
361 /// Finishes analysis of the deferred functions calls that may be declared as
362 /// host/nohost during device/host compilation.
364 const FunctionDecl *Callee,
366
367 /// Return true if currently in OpenMP task with untied clause context.
368 bool isInOpenMPTaskUntiedContext() const;
369
370 /// Return true inside OpenMP declare target region.
372 return !DeclareTargetNesting.empty();
373 }
374 /// Return true inside OpenMP target region.
376
377 /// Return the number of captured regions created for an OpenMP directive.
379
380 /// Initialization of captured region for OpenMP region.
381 void ActOnOpenMPRegionStart(OpenMPDirectiveKind DKind, Scope *CurScope);
382
383 /// Called for syntactical loops (ForStmt or CXXForRangeStmt) associated to
384 /// an OpenMP loop directive.
386
387 /// Process a canonical OpenMP loop nest that can either be a canonical
388 /// literal loop (ForStmt or CXXForRangeStmt), or the generated loop of an
389 /// OpenMP loop transformation construct.
391
392 /// End of OpenMP region.
393 ///
394 /// \param S Statement associated with the current OpenMP region.
395 /// \param Clauses List of clauses for the current OpenMP region.
396 ///
397 /// \returns Statement for finished OpenMP region.
401 OpenMPDirectiveKind CancelRegion, ArrayRef<OMPClause *> Clauses,
402 Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc);
403 /// Process an OpenMP informational directive.
404 ///
405 /// \param Kind The directive kind.
406 /// \param DirName Declaration name info.
407 /// \param Clauses Array of clauses for directive.
408 /// \param AStmt The associated statement.
409 /// \param StartLoc The start location.
410 /// \param EndLoc The end location.
413 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
414 SourceLocation EndLoc);
415 /// Process an OpenMP assume directive.
416 ///
417 /// \param Clauses Array of clauses for directive.
418 /// \param AStmt The associated statement.
419 /// \param StartLoc The start location.
420 /// \param EndLoc The end location.
422 Stmt *AStmt, SourceLocation StartLoc,
423 SourceLocation EndLoc);
424
425 /// Called on well-formed '\#pragma omp parallel' after parsing
426 /// of the associated statement.
428 Stmt *AStmt, SourceLocation StartLoc,
429 SourceLocation EndLoc);
431 llvm::SmallDenseMap<const ValueDecl *, const Expr *, 4>;
432 /// Called on well-formed '\#pragma omp simd' after parsing
433 /// of the associated statement.
436 SourceLocation StartLoc, SourceLocation EndLoc,
437 VarsWithInheritedDSAType &VarsWithImplicitDSA);
438 /// Called on well-formed '#pragma omp tile' after parsing of its clauses and
439 /// the associated statement.
441 Stmt *AStmt, SourceLocation StartLoc,
442 SourceLocation EndLoc);
443 /// Called on well-formed '#pragma omp unroll' after parsing of its clauses
444 /// and the associated statement.
446 Stmt *AStmt, SourceLocation StartLoc,
447 SourceLocation EndLoc);
448 /// Called on well-formed '#pragma omp reverse'.
450 SourceLocation EndLoc);
451 /// Called on well-formed '#pragma omp interchange' after parsing of its
452 /// clauses and the associated statement.
454 Stmt *AStmt,
455 SourceLocation StartLoc,
456 SourceLocation EndLoc);
457 /// Called on well-formed '\#pragma omp for' after parsing
458 /// of the associated statement.
461 SourceLocation StartLoc, SourceLocation EndLoc,
462 VarsWithInheritedDSAType &VarsWithImplicitDSA);
463 /// Called on well-formed '\#pragma omp for simd' after parsing
464 /// of the associated statement.
467 SourceLocation StartLoc, SourceLocation EndLoc,
468 VarsWithInheritedDSAType &VarsWithImplicitDSA);
469 /// Called on well-formed '\#pragma omp sections' after parsing
470 /// of the associated statement.
472 Stmt *AStmt, SourceLocation StartLoc,
473 SourceLocation EndLoc);
474 /// Called on well-formed '\#pragma omp section' after parsing of the
475 /// associated statement.
477 SourceLocation EndLoc);
478 /// Called on well-formed '\#pragma omp scope' after parsing of the
479 /// associated statement.
481 Stmt *AStmt, SourceLocation StartLoc,
482 SourceLocation EndLoc);
483 /// Called on well-formed '\#pragma omp single' after parsing of the
484 /// associated statement.
486 Stmt *AStmt, SourceLocation StartLoc,
487 SourceLocation EndLoc);
488 /// Called on well-formed '\#pragma omp master' after parsing of the
489 /// associated statement.
491 SourceLocation EndLoc);
492 /// Called on well-formed '\#pragma omp critical' after parsing of the
493 /// associated statement.
495 ArrayRef<OMPClause *> Clauses,
496 Stmt *AStmt, SourceLocation StartLoc,
497 SourceLocation EndLoc);
498 /// Called on well-formed '\#pragma omp parallel for' after parsing
499 /// of the associated statement.
501 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
502 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
503 /// Called on well-formed '\#pragma omp parallel for simd' after
504 /// parsing of the associated statement.
506 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
507 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
508 /// Called on well-formed '\#pragma omp parallel master' after
509 /// parsing of the associated statement.
511 Stmt *AStmt,
512 SourceLocation StartLoc,
513 SourceLocation EndLoc);
514 /// Called on well-formed '\#pragma omp parallel masked' after
515 /// parsing of the associated statement.
517 Stmt *AStmt,
518 SourceLocation StartLoc,
519 SourceLocation EndLoc);
520 /// Called on well-formed '\#pragma omp parallel sections' after
521 /// parsing of the associated statement.
523 Stmt *AStmt,
524 SourceLocation StartLoc,
525 SourceLocation EndLoc);
526 /// Called on well-formed '\#pragma omp task' after parsing of the
527 /// associated statement.
529 Stmt *AStmt, SourceLocation StartLoc,
530 SourceLocation EndLoc);
531 /// Called on well-formed '\#pragma omp taskyield'.
533 SourceLocation EndLoc);
534 /// Called on well-formed '\#pragma omp error'.
535 /// Error direcitive is allowed in both declared and excutable contexts.
536 /// Adding InExContext to identify which context is called from.
538 SourceLocation StartLoc,
539 SourceLocation EndLoc,
540 bool InExContext = true);
541 /// Called on well-formed '\#pragma omp barrier'.
543 SourceLocation EndLoc);
544 /// Called on well-formed '\#pragma omp taskwait'.
546 SourceLocation StartLoc,
547 SourceLocation EndLoc);
548 /// Called on well-formed '\#pragma omp taskgroup'.
550 Stmt *AStmt, SourceLocation StartLoc,
551 SourceLocation EndLoc);
552 /// Called on well-formed '\#pragma omp flush'.
554 SourceLocation StartLoc,
555 SourceLocation EndLoc);
556 /// Called on well-formed '\#pragma omp depobj'.
558 SourceLocation StartLoc,
559 SourceLocation EndLoc);
560 /// Called on well-formed '\#pragma omp scan'.
562 SourceLocation StartLoc,
563 SourceLocation EndLoc);
564 /// Called on well-formed '\#pragma omp ordered' after parsing of the
565 /// associated statement.
567 Stmt *AStmt, SourceLocation StartLoc,
568 SourceLocation EndLoc);
569 /// Called on well-formed '\#pragma omp atomic' after parsing of the
570 /// associated statement.
572 Stmt *AStmt, SourceLocation StartLoc,
573 SourceLocation EndLoc);
574 /// Called on well-formed '\#pragma omp target' after parsing of the
575 /// associated statement.
577 Stmt *AStmt, SourceLocation StartLoc,
578 SourceLocation EndLoc);
579 /// Called on well-formed '\#pragma omp target data' after parsing of
580 /// the associated statement.
582 Stmt *AStmt,
583 SourceLocation StartLoc,
584 SourceLocation EndLoc);
585 /// Called on well-formed '\#pragma omp target enter data' after
586 /// parsing of the associated statement.
588 SourceLocation StartLoc,
589 SourceLocation EndLoc,
590 Stmt *AStmt);
591 /// Called on well-formed '\#pragma omp target exit data' after
592 /// parsing of the associated statement.
594 SourceLocation StartLoc,
595 SourceLocation EndLoc,
596 Stmt *AStmt);
597 /// Called on well-formed '\#pragma omp target parallel' after
598 /// parsing of the associated statement.
600 Stmt *AStmt,
601 SourceLocation StartLoc,
602 SourceLocation EndLoc);
603 /// Called on well-formed '\#pragma omp target parallel for' after
604 /// parsing of the associated statement.
606 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
607 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
608 /// Called on well-formed '\#pragma omp teams' after parsing of the
609 /// associated statement.
611 Stmt *AStmt, SourceLocation StartLoc,
612 SourceLocation EndLoc);
613 /// Called on well-formed '\#pragma omp teams loop' after parsing of the
614 /// associated statement.
616 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
617 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
618 /// Called on well-formed '\#pragma omp target teams loop' after parsing of
619 /// the associated statement.
621 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
622 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
623 /// Called on well-formed '\#pragma omp parallel loop' after parsing of the
624 /// associated statement.
626 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
627 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
628 /// Called on well-formed '\#pragma omp target parallel loop' after parsing
629 /// of the associated statement.
631 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
632 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
633 /// Called on well-formed '\#pragma omp cancellation point'.
636 SourceLocation EndLoc,
637 OpenMPDirectiveKind CancelRegion);
638 /// Called on well-formed '\#pragma omp cancel'.
640 SourceLocation StartLoc,
641 SourceLocation EndLoc,
642 OpenMPDirectiveKind CancelRegion);
643 /// Called on well-formed '\#pragma omp taskloop' after parsing of the
644 /// associated statement.
647 SourceLocation StartLoc, SourceLocation EndLoc,
648 VarsWithInheritedDSAType &VarsWithImplicitDSA);
649 /// Called on well-formed '\#pragma omp taskloop simd' after parsing of
650 /// the associated statement.
652 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
653 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
654 /// Called on well-formed '\#pragma omp master taskloop' after parsing of the
655 /// associated statement.
657 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
658 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
659 /// Called on well-formed '\#pragma omp master taskloop simd' after parsing of
660 /// the associated statement.
662 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
663 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
664 /// Called on well-formed '\#pragma omp parallel master taskloop' after
665 /// parsing of the associated statement.
667 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
668 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
669 /// Called on well-formed '\#pragma omp parallel master taskloop simd' after
670 /// parsing of the associated statement.
672 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
673 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
674 /// Called on well-formed '\#pragma omp masked taskloop' after parsing of the
675 /// associated statement.
677 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
678 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
679 /// Called on well-formed '\#pragma omp masked taskloop simd' after parsing of
680 /// the associated statement.
682 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
683 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
684 /// Called on well-formed '\#pragma omp parallel masked taskloop' after
685 /// parsing of the associated statement.
687 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
688 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
689 /// Called on well-formed '\#pragma omp parallel masked taskloop simd' after
690 /// parsing of the associated statement.
692 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
693 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
694 /// Called on well-formed '\#pragma omp distribute' after parsing
695 /// of the associated statement.
698 SourceLocation StartLoc, SourceLocation EndLoc,
699 VarsWithInheritedDSAType &VarsWithImplicitDSA);
700 /// Called on well-formed '\#pragma omp target update'.
702 SourceLocation StartLoc,
703 SourceLocation EndLoc,
704 Stmt *AStmt);
705 /// Called on well-formed '\#pragma omp distribute parallel for' after
706 /// parsing of the associated statement.
708 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
709 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
710 /// Called on well-formed '\#pragma omp distribute parallel for simd'
711 /// after parsing of the associated statement.
713 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
714 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
715 /// Called on well-formed '\#pragma omp distribute simd' after
716 /// parsing of the associated statement.
718 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
719 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
720 /// Called on well-formed '\#pragma omp target parallel for simd' after
721 /// parsing of the associated statement.
723 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
724 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
725 /// Called on well-formed '\#pragma omp target simd' after parsing of
726 /// the associated statement.
729 SourceLocation StartLoc, SourceLocation EndLoc,
730 VarsWithInheritedDSAType &VarsWithImplicitDSA);
731 /// Called on well-formed '\#pragma omp teams distribute' after parsing of
732 /// the associated statement.
734 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
735 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
736 /// Called on well-formed '\#pragma omp teams distribute simd' after parsing
737 /// of the associated statement.
739 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
740 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
741 /// Called on well-formed '\#pragma omp teams distribute parallel for simd'
742 /// after parsing of the associated statement.
744 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
745 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
746 /// Called on well-formed '\#pragma omp teams distribute parallel for'
747 /// after parsing of the associated statement.
749 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
750 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
751 /// Called on well-formed '\#pragma omp target teams' after parsing of the
752 /// associated statement.
754 Stmt *AStmt,
755 SourceLocation StartLoc,
756 SourceLocation EndLoc);
757 /// Called on well-formed '\#pragma omp target teams distribute' after parsing
758 /// of the associated statement.
760 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
761 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
762 /// Called on well-formed '\#pragma omp target teams distribute parallel for'
763 /// after parsing of the associated statement.
765 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
766 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
767 /// Called on well-formed '\#pragma omp target teams distribute parallel for
768 /// simd' after parsing of the associated statement.
770 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
771 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
772 /// Called on well-formed '\#pragma omp target teams distribute simd' after
773 /// parsing of the associated statement.
775 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
776 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
777 /// Called on well-formed '\#pragma omp interop'.
779 SourceLocation StartLoc,
780 SourceLocation EndLoc);
781 /// Called on well-formed '\#pragma omp dispatch' after parsing of the
782 // /associated statement.
784 Stmt *AStmt, SourceLocation StartLoc,
785 SourceLocation EndLoc);
786 /// Called on well-formed '\#pragma omp masked' after parsing of the
787 // /associated statement.
789 Stmt *AStmt, SourceLocation StartLoc,
790 SourceLocation EndLoc);
791
792 /// Called on well-formed '\#pragma omp loop' after parsing of the
793 /// associated statement.
795 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
796 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
797
798 /// Checks correctness of linear modifiers.
800 SourceLocation LinLoc);
801 /// Checks that the specified declaration matches requirements for the linear
802 /// decls.
805 bool IsDeclareSimd = false);
806
807 /// Called on well-formed '\#pragma omp declare simd' after parsing of
808 /// the associated method/function.
810 DeclGroupPtrTy DG, OMPDeclareSimdDeclAttr::BranchStateTy BS,
811 Expr *Simdlen, ArrayRef<Expr *> Uniforms, ArrayRef<Expr *> Aligneds,
812 ArrayRef<Expr *> Alignments, ArrayRef<Expr *> Linears,
813 ArrayRef<unsigned> LinModifiers, ArrayRef<Expr *> Steps, SourceRange SR);
814
815 /// Checks '\#pragma omp declare variant' variant function and original
816 /// functions after parsing of the associated method/function.
817 /// \param DG Function declaration to which declare variant directive is
818 /// applied to.
819 /// \param VariantRef Expression that references the variant function, which
820 /// must be used instead of the original one, specified in \p DG.
821 /// \param TI The trait info object representing the match clause.
822 /// \param NumAppendArgs The number of omp_interop_t arguments to account for
823 /// in checking.
824 /// \returns std::nullopt, if the function/variant function are not compatible
825 /// with the pragma, pair of original function/variant ref expression
826 /// otherwise.
827 std::optional<std::pair<FunctionDecl *, Expr *>>
829 OMPTraitInfo &TI, unsigned NumAppendArgs,
830 SourceRange SR);
831
832 /// Called on well-formed '\#pragma omp declare variant' after parsing of
833 /// the associated method/function.
834 /// \param FD Function declaration to which declare variant directive is
835 /// applied to.
836 /// \param VariantRef Expression that references the variant function, which
837 /// must be used instead of the original one, specified in \p DG.
838 /// \param TI The context traits associated with the function variant.
839 /// \param AdjustArgsNothing The list of 'nothing' arguments.
840 /// \param AdjustArgsNeedDevicePtr The list of 'need_device_ptr' arguments.
841 /// \param AppendArgs The list of 'append_args' arguments.
842 /// \param AdjustArgsLoc The Location of an 'adjust_args' clause.
843 /// \param AppendArgsLoc The Location of an 'append_args' clause.
844 /// \param SR The SourceRange of the 'declare variant' directive.
846 FunctionDecl *FD, Expr *VariantRef, OMPTraitInfo &TI,
847 ArrayRef<Expr *> AdjustArgsNothing,
848 ArrayRef<Expr *> AdjustArgsNeedDevicePtr,
849 ArrayRef<OMPInteropInfo> AppendArgs, SourceLocation AdjustArgsLoc,
850 SourceLocation AppendArgsLoc, SourceRange SR);
851
853 SourceLocation StartLoc,
854 SourceLocation LParenLoc,
855 SourceLocation EndLoc);
856 /// Called on well-formed 'allocator' clause.
858 SourceLocation StartLoc,
859 SourceLocation LParenLoc,
860 SourceLocation EndLoc);
861 /// Called on well-formed 'if' clause.
863 Expr *Condition, SourceLocation StartLoc,
864 SourceLocation LParenLoc,
865 SourceLocation NameModifierLoc,
866 SourceLocation ColonLoc,
867 SourceLocation EndLoc);
868 /// Called on well-formed 'final' clause.
870 SourceLocation LParenLoc,
871 SourceLocation EndLoc);
872 /// Called on well-formed 'num_threads' clause.
874 SourceLocation StartLoc,
875 SourceLocation LParenLoc,
876 SourceLocation EndLoc);
877 /// Called on well-formed 'align' clause.
879 SourceLocation LParenLoc,
880 SourceLocation EndLoc);
881 /// Called on well-formed 'safelen' clause.
883 SourceLocation LParenLoc,
884 SourceLocation EndLoc);
885 /// Called on well-formed 'simdlen' clause.
887 SourceLocation LParenLoc,
888 SourceLocation EndLoc);
889 /// Called on well-form 'sizes' clause.
891 SourceLocation StartLoc,
892 SourceLocation LParenLoc,
893 SourceLocation EndLoc);
894 /// Called on well-form 'permutation' clause after parsing its arguments.
896 SourceLocation StartLoc,
897 SourceLocation LParenLoc,
898 SourceLocation EndLoc);
899 /// Called on well-form 'full' clauses.
901 SourceLocation EndLoc);
902 /// Called on well-form 'partial' clauses.
904 SourceLocation LParenLoc,
905 SourceLocation EndLoc);
906 /// Called on well-formed 'collapse' clause.
908 SourceLocation StartLoc,
909 SourceLocation LParenLoc,
910 SourceLocation EndLoc);
911 /// Called on well-formed 'ordered' clause.
912 OMPClause *
914 SourceLocation LParenLoc = SourceLocation(),
915 Expr *NumForLoops = nullptr);
916 /// Called on well-formed 'grainsize' clause.
918 Expr *Size, SourceLocation StartLoc,
919 SourceLocation LParenLoc,
920 SourceLocation ModifierLoc,
921 SourceLocation EndLoc);
922 /// Called on well-formed 'num_tasks' clause.
924 Expr *NumTasks, SourceLocation StartLoc,
925 SourceLocation LParenLoc,
926 SourceLocation ModifierLoc,
927 SourceLocation EndLoc);
928 /// Called on well-formed 'hint' clause.
930 SourceLocation LParenLoc,
931 SourceLocation EndLoc);
932 /// Called on well-formed 'detach' clause.
934 SourceLocation LParenLoc,
935 SourceLocation EndLoc);
936
938 SourceLocation ArgumentLoc,
939 SourceLocation StartLoc,
940 SourceLocation LParenLoc,
941 SourceLocation EndLoc);
942 /// Called on well-formed 'when' clause.
944 SourceLocation LParenLoc,
945 SourceLocation EndLoc);
946 /// Called on well-formed 'default' clause.
947 OMPClause *ActOnOpenMPDefaultClause(llvm::omp::DefaultKind Kind,
948 SourceLocation KindLoc,
949 SourceLocation StartLoc,
950 SourceLocation LParenLoc,
951 SourceLocation EndLoc);
952 /// Called on well-formed 'proc_bind' clause.
953 OMPClause *ActOnOpenMPProcBindClause(llvm::omp::ProcBindKind Kind,
954 SourceLocation KindLoc,
955 SourceLocation StartLoc,
956 SourceLocation LParenLoc,
957 SourceLocation EndLoc);
958 /// Called on well-formed 'order' clause.
961 SourceLocation StartLoc,
962 SourceLocation LParenLoc,
963 SourceLocation MLoc, SourceLocation KindLoc,
964 SourceLocation EndLoc);
965 /// Called on well-formed 'update' clause.
967 SourceLocation KindLoc,
968 SourceLocation StartLoc,
969 SourceLocation LParenLoc,
970 SourceLocation EndLoc);
971 /// Called on well-formed 'holds' clause.
973 SourceLocation LParenLoc,
974 SourceLocation EndLoc);
975 /// Called on well-formed 'absent' or 'contains' clauses.
981 SourceLocation RLoc);
982
985 SourceLocation StartLoc, SourceLocation LParenLoc,
986 ArrayRef<SourceLocation> ArgumentsLoc, SourceLocation DelimLoc,
987 SourceLocation EndLoc);
988 /// Called on well-formed 'schedule' clause.
991 OpenMPScheduleClauseKind Kind, Expr *ChunkSize, SourceLocation StartLoc,
992 SourceLocation LParenLoc, SourceLocation M1Loc, SourceLocation M2Loc,
993 SourceLocation KindLoc, SourceLocation CommaLoc, SourceLocation EndLoc);
994
996 SourceLocation EndLoc);
997 /// Called on well-formed 'nowait' clause.
999 SourceLocation EndLoc);
1000 /// Called on well-formed 'untied' clause.
1002 SourceLocation EndLoc);
1003 /// Called on well-formed 'mergeable' clause.
1005 SourceLocation EndLoc);
1006 /// Called on well-formed 'read' clause.
1008 SourceLocation EndLoc);
1009 /// Called on well-formed 'write' clause.
1011 SourceLocation EndLoc);
1012 /// Called on well-formed 'update' clause.
1014 SourceLocation EndLoc);
1015 /// Called on well-formed 'capture' clause.
1017 SourceLocation EndLoc);
1018 /// Called on well-formed 'compare' clause.
1020 SourceLocation EndLoc);
1021 /// Called on well-formed 'fail' clause.
1023 SourceLocation EndLoc);
1025 SourceLocation KindLoc,
1026 SourceLocation StartLoc,
1027 SourceLocation LParenLoc,
1028 SourceLocation EndLoc);
1029
1030 /// Called on well-formed 'seq_cst' clause.
1032 SourceLocation EndLoc);
1033 /// Called on well-formed 'acq_rel' clause.
1035 SourceLocation EndLoc);
1036 /// Called on well-formed 'acquire' clause.
1038 SourceLocation EndLoc);
1039 /// Called on well-formed 'release' clause.
1041 SourceLocation EndLoc);
1042 /// Called on well-formed 'relaxed' clause.
1044 SourceLocation EndLoc);
1045 /// Called on well-formed 'weak' clause.
1047 SourceLocation EndLoc);
1048
1049 /// Called on well-formed 'init' clause.
1050 OMPClause *
1051 ActOnOpenMPInitClause(Expr *InteropVar, OMPInteropInfo &InteropInfo,
1052 SourceLocation StartLoc, SourceLocation LParenLoc,
1053 SourceLocation VarLoc, SourceLocation EndLoc);
1054
1055 /// Called on well-formed 'use' clause.
1056 OMPClause *ActOnOpenMPUseClause(Expr *InteropVar, SourceLocation StartLoc,
1057 SourceLocation LParenLoc,
1058 SourceLocation VarLoc, SourceLocation EndLoc);
1059
1060 /// Called on well-formed 'destroy' clause.
1062 SourceLocation LParenLoc,
1063 SourceLocation VarLoc,
1064 SourceLocation EndLoc);
1065 /// Called on well-formed 'novariants' clause.
1067 SourceLocation StartLoc,
1068 SourceLocation LParenLoc,
1069 SourceLocation EndLoc);
1070 /// Called on well-formed 'nocontext' clause.
1072 SourceLocation StartLoc,
1073 SourceLocation LParenLoc,
1074 SourceLocation EndLoc);
1075 /// Called on well-formed 'filter' clause.
1077 SourceLocation LParenLoc,
1078 SourceLocation EndLoc);
1079 /// Called on well-formed 'threads' clause.
1081 SourceLocation EndLoc);
1082 /// Called on well-formed 'simd' clause.
1084 SourceLocation EndLoc);
1085 /// Called on well-formed 'nogroup' clause.
1087 SourceLocation EndLoc);
1088 /// Called on well-formed 'unified_address' clause.
1090 SourceLocation EndLoc);
1091
1092 /// Called on well-formed 'unified_address' clause.
1094 SourceLocation EndLoc);
1095
1096 /// Called on well-formed 'reverse_offload' clause.
1098 SourceLocation EndLoc);
1099
1100 /// Called on well-formed 'dynamic_allocators' clause.
1102 SourceLocation EndLoc);
1103
1104 /// Called on well-formed 'atomic_default_mem_order' clause.
1107 SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc);
1108
1109 /// Called on well-formed 'at' clause.
1111 SourceLocation KindLoc,
1112 SourceLocation StartLoc,
1113 SourceLocation LParenLoc,
1114 SourceLocation EndLoc);
1115
1116 /// Called on well-formed 'severity' clause.
1118 SourceLocation KindLoc,
1119 SourceLocation StartLoc,
1120 SourceLocation LParenLoc,
1121 SourceLocation EndLoc);
1122
1123 /// Called on well-formed 'message' clause.
1124 /// passing string for message.
1126 SourceLocation LParenLoc,
1127 SourceLocation EndLoc);
1128
1129 /// Data used for processing a list of variables in OpenMP clauses.
1130 struct OpenMPVarListDataTy final {
1132 Expr *IteratorExpr = nullptr;
1137 int ExtraModifier = -1; ///< Additional modifier for linear, map, depend or
1138 ///< lastprivate clause.
1146 bool IsMapTypeImplicit = false;
1150 StepModifierLoc; /// 'step' modifier location for linear clause
1152 };
1153
1155 ArrayRef<Expr *> Vars,
1156 const OMPVarListLocTy &Locs,
1158 /// Called on well-formed 'inclusive' clause.
1160 SourceLocation StartLoc,
1161 SourceLocation LParenLoc,
1162 SourceLocation EndLoc);
1163 /// Called on well-formed 'exclusive' clause.
1165 SourceLocation StartLoc,
1166 SourceLocation LParenLoc,
1167 SourceLocation EndLoc);
1168 /// Called on well-formed 'allocate' clause.
1170 Expr *Allocator, OpenMPAllocateClauseModifier ACModifier,
1171 ArrayRef<Expr *> VarList, SourceLocation StartLoc,
1172 SourceLocation ColonLoc, SourceLocation LParenLoc, SourceLocation EndLoc);
1173 /// Called on well-formed 'private' clause.
1175 SourceLocation StartLoc,
1176 SourceLocation LParenLoc,
1177 SourceLocation EndLoc);
1178 /// Called on well-formed 'firstprivate' clause.
1180 SourceLocation StartLoc,
1181 SourceLocation LParenLoc,
1182 SourceLocation EndLoc);
1183 /// Called on well-formed 'lastprivate' clause.
1186 SourceLocation LPKindLoc, SourceLocation ColonLoc,
1187 SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc);
1188 /// Called on well-formed 'shared' clause.
1190 SourceLocation StartLoc,
1191 SourceLocation LParenLoc,
1192 SourceLocation EndLoc);
1193 /// Called on well-formed 'reduction' clause.
1196 SourceLocation StartLoc, SourceLocation LParenLoc,
1197 SourceLocation ModifierLoc, SourceLocation ColonLoc,
1198 SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec,
1199 const DeclarationNameInfo &ReductionId,
1200 ArrayRef<Expr *> UnresolvedReductions = {});
1201 /// Called on well-formed 'task_reduction' clause.
1203 ArrayRef<Expr *> VarList, SourceLocation StartLoc,
1204 SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc,
1205 CXXScopeSpec &ReductionIdScopeSpec,
1206 const DeclarationNameInfo &ReductionId,
1207 ArrayRef<Expr *> UnresolvedReductions = {});
1208 /// Called on well-formed 'in_reduction' clause.
1210 ArrayRef<Expr *> VarList, SourceLocation StartLoc,
1211 SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc,
1212 CXXScopeSpec &ReductionIdScopeSpec,
1213 const DeclarationNameInfo &ReductionId,
1214 ArrayRef<Expr *> UnresolvedReductions = {});
1215 /// Called on well-formed 'linear' clause.
1216 OMPClause *ActOnOpenMPLinearClause(
1217 ArrayRef<Expr *> VarList, Expr *Step, SourceLocation StartLoc,
1218 SourceLocation LParenLoc, OpenMPLinearClauseKind LinKind,
1219 SourceLocation LinLoc, SourceLocation ColonLoc,
1220 SourceLocation StepModifierLoc, SourceLocation EndLoc);
1221 /// Called on well-formed 'aligned' clause.
1222 OMPClause *ActOnOpenMPAlignedClause(ArrayRef<Expr *> VarList, Expr *Alignment,
1223 SourceLocation StartLoc,
1224 SourceLocation LParenLoc,
1225 SourceLocation ColonLoc,
1226 SourceLocation EndLoc);
1227 /// Called on well-formed 'copyin' clause.
1228 OMPClause *ActOnOpenMPCopyinClause(ArrayRef<Expr *> VarList,
1229 SourceLocation StartLoc,
1230 SourceLocation LParenLoc,
1231 SourceLocation EndLoc);
1232 /// Called on well-formed 'copyprivate' clause.
1233 OMPClause *ActOnOpenMPCopyprivateClause(ArrayRef<Expr *> VarList,
1234 SourceLocation StartLoc,
1235 SourceLocation LParenLoc,
1236 SourceLocation EndLoc);
1237 /// Called on well-formed 'flush' pseudo clause.
1238 OMPClause *ActOnOpenMPFlushClause(ArrayRef<Expr *> VarList,
1239 SourceLocation StartLoc,
1240 SourceLocation LParenLoc,
1241 SourceLocation EndLoc);
1242 /// Called on well-formed 'depobj' pseudo clause.
1243 OMPClause *ActOnOpenMPDepobjClause(Expr *Depobj, SourceLocation StartLoc,
1244 SourceLocation LParenLoc,
1245 SourceLocation EndLoc);
1246 /// Called on well-formed 'depend' clause.
1247 OMPClause *ActOnOpenMPDependClause(const OMPDependClause::DependDataTy &Data,
1248 Expr *DepModifier,
1249 ArrayRef<Expr *> VarList,
1250 SourceLocation StartLoc,
1251 SourceLocation LParenLoc,
1252 SourceLocation EndLoc);
1253 /// Called on well-formed 'device' clause.
1255 Expr *Device, SourceLocation StartLoc,
1256 SourceLocation LParenLoc,
1257 SourceLocation ModifierLoc,
1258 SourceLocation EndLoc);
1259 /// Called on well-formed 'map' clause.
1260 OMPClause *ActOnOpenMPMapClause(
1261 Expr *IteratorModifier, ArrayRef<OpenMPMapModifierKind> MapTypeModifiers,
1262 ArrayRef<SourceLocation> MapTypeModifiersLoc,
1263 CXXScopeSpec &MapperIdScopeSpec, DeclarationNameInfo &MapperId,
1264 OpenMPMapClauseKind MapType, bool IsMapTypeImplicit,
1265 SourceLocation MapLoc, SourceLocation ColonLoc, ArrayRef<Expr *> VarList,
1266 const OMPVarListLocTy &Locs, bool NoDiagnose = false,
1267 ArrayRef<Expr *> UnresolvedMappers = {});
1268 /// Called on well-formed 'num_teams' clause.
1269 OMPClause *ActOnOpenMPNumTeamsClause(ArrayRef<Expr *> VarList,
1270 SourceLocation StartLoc,
1271 SourceLocation LParenLoc,
1272 SourceLocation EndLoc);
1273 /// Called on well-formed 'thread_limit' clause.
1274 OMPClause *ActOnOpenMPThreadLimitClause(ArrayRef<Expr *> VarList,
1275 SourceLocation StartLoc,
1276 SourceLocation LParenLoc,
1277 SourceLocation EndLoc);
1278 /// Called on well-formed 'priority' clause.
1279 OMPClause *ActOnOpenMPPriorityClause(Expr *Priority, SourceLocation StartLoc,
1280 SourceLocation LParenLoc,
1281 SourceLocation EndLoc);
1282 /// Called on well-formed 'dist_schedule' clause.
1284 OpenMPDistScheduleClauseKind Kind, Expr *ChunkSize,
1285 SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation KindLoc,
1286 SourceLocation CommaLoc, SourceLocation EndLoc);
1287 /// Called on well-formed 'defaultmap' clause.
1288 OMPClause *ActOnOpenMPDefaultmapClause(
1290 SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation MLoc,
1291 SourceLocation KindLoc, SourceLocation EndLoc);
1292 /// Called on well-formed 'to' clause.
1293 OMPClause *
1294 ActOnOpenMPToClause(ArrayRef<OpenMPMotionModifierKind> MotionModifiers,
1295 ArrayRef<SourceLocation> MotionModifiersLoc,
1296 CXXScopeSpec &MapperIdScopeSpec,
1297 DeclarationNameInfo &MapperId, SourceLocation ColonLoc,
1298 ArrayRef<Expr *> VarList, const OMPVarListLocTy &Locs,
1299 ArrayRef<Expr *> UnresolvedMappers = {});
1300 /// Called on well-formed 'from' clause.
1301 OMPClause *
1302 ActOnOpenMPFromClause(ArrayRef<OpenMPMotionModifierKind> MotionModifiers,
1303 ArrayRef<SourceLocation> MotionModifiersLoc,
1304 CXXScopeSpec &MapperIdScopeSpec,
1305 DeclarationNameInfo &MapperId, SourceLocation ColonLoc,
1306 ArrayRef<Expr *> VarList, const OMPVarListLocTy &Locs,
1307 ArrayRef<Expr *> UnresolvedMappers = {});
1308 /// Called on well-formed 'use_device_ptr' clause.
1309 OMPClause *ActOnOpenMPUseDevicePtrClause(ArrayRef<Expr *> VarList,
1310 const OMPVarListLocTy &Locs);
1311 /// Called on well-formed 'use_device_addr' clause.
1312 OMPClause *ActOnOpenMPUseDeviceAddrClause(ArrayRef<Expr *> VarList,
1313 const OMPVarListLocTy &Locs);
1314 /// Called on well-formed 'is_device_ptr' clause.
1315 OMPClause *ActOnOpenMPIsDevicePtrClause(ArrayRef<Expr *> VarList,
1316 const OMPVarListLocTy &Locs);
1317 /// Called on well-formed 'has_device_addr' clause.
1318 OMPClause *ActOnOpenMPHasDeviceAddrClause(ArrayRef<Expr *> VarList,
1319 const OMPVarListLocTy &Locs);
1320 /// Called on well-formed 'nontemporal' clause.
1321 OMPClause *ActOnOpenMPNontemporalClause(ArrayRef<Expr *> VarList,
1322 SourceLocation StartLoc,
1323 SourceLocation LParenLoc,
1324 SourceLocation EndLoc);
1325
1326 /// Data for list of allocators.
1328 /// Allocator.
1329 Expr *Allocator = nullptr;
1330 /// Allocator traits.
1332 /// Locations of '(' and ')' symbols.
1334 };
1335 /// Called on well-formed 'uses_allocators' clause.
1337 SourceLocation LParenLoc,
1338 SourceLocation EndLoc,
1340 /// Called on well-formed 'affinity' clause.
1342 SourceLocation LParenLoc,
1343 SourceLocation ColonLoc,
1344 SourceLocation EndLoc, Expr *Modifier,
1345 ArrayRef<Expr *> Locators);
1346 /// Called on a well-formed 'bind' clause.
1348 SourceLocation KindLoc,
1349 SourceLocation StartLoc,
1350 SourceLocation LParenLoc,
1351 SourceLocation EndLoc);
1352
1353 /// Called on a well-formed 'ompx_dyn_cgroup_mem' clause.
1355 SourceLocation LParenLoc,
1356 SourceLocation EndLoc);
1357
1358 /// Called on well-formed 'doacross' clause.
1359 OMPClause *
1361 SourceLocation DepLoc, SourceLocation ColonLoc,
1362 ArrayRef<Expr *> VarList, SourceLocation StartLoc,
1363 SourceLocation LParenLoc, SourceLocation EndLoc);
1364
1365 /// Called on a well-formed 'ompx_attribute' clause.
1367 SourceLocation StartLoc,
1368 SourceLocation LParenLoc,
1369 SourceLocation EndLoc);
1370
1371 /// Called on a well-formed 'ompx_bare' clause.
1373 SourceLocation EndLoc);
1374
1376 Expr *LowerBound,
1377 SourceLocation ColonLocFirst,
1378 SourceLocation ColonLocSecond,
1379 Expr *Length, Expr *Stride,
1380 SourceLocation RBLoc);
1382 SourceLocation RParenLoc,
1383 ArrayRef<Expr *> Dims,
1384 ArrayRef<SourceRange> Brackets);
1385
1386 /// Data structure for iterator expression.
1395 };
1396
1398 SourceLocation LLoc, SourceLocation RLoc,
1400
1401 void handleOMPAssumeAttr(Decl *D, const ParsedAttr &AL);
1402
1403private:
1404 void *VarDataSharingAttributesStack;
1405
1406 /// Number of nested '#pragma omp declare target' directives.
1407 SmallVector<DeclareTargetContextInfo, 4> DeclareTargetNesting;
1408
1409 /// Initialization of data-sharing attributes stack.
1410 void InitDataSharingAttributesStack();
1411 void DestroyDataSharingAttributesStack();
1412
1413 /// Returns OpenMP nesting level for current directive.
1414 unsigned getOpenMPNestingLevel() const;
1415
1416 /// Adjusts the function scopes index for the target-based regions.
1417 void adjustOpenMPTargetScopeIndex(unsigned &FunctionScopesIndex,
1418 unsigned Level) const;
1419
1420 /// Returns the number of scopes associated with the construct on the given
1421 /// OpenMP level.
1422 int getNumberOfConstructScopes(unsigned Level) const;
1423
1424 /// Push new OpenMP function region for non-capturing function.
1425 void pushOpenMPFunctionRegion();
1426
1427 /// Pop OpenMP function region for non-capturing function.
1428 void popOpenMPFunctionRegion(const sema::FunctionScopeInfo *OldFSI);
1429
1430 /// Analyzes and checks a loop nest for use by a loop transformation.
1431 ///
1432 /// \param Kind The loop transformation directive kind.
1433 /// \param NumLoops How many nested loops the directive is expecting.
1434 /// \param AStmt Associated statement of the transformation directive.
1435 /// \param LoopHelpers [out] The loop analysis result.
1436 /// \param Body [out] The body code nested in \p NumLoops loop.
1437 /// \param OriginalInits [out] Collection of statements and declarations that
1438 /// must have been executed/declared before entering the
1439 /// loop.
1440 ///
1441 /// \return Whether there was any error.
1442 bool checkTransformableLoopNest(
1443 OpenMPDirectiveKind Kind, Stmt *AStmt, int NumLoops,
1445 Stmt *&Body, SmallVectorImpl<SmallVector<Stmt *, 0>> &OriginalInits);
1446
1447 /// Helper to keep information about the current `omp begin/end declare
1448 /// variant` nesting.
1449 struct OMPDeclareVariantScope {
1450 /// The associated OpenMP context selector.
1451 OMPTraitInfo *TI;
1452
1453 /// The associated OpenMP context selector mangling.
1454 std::string NameSuffix;
1455
1456 OMPDeclareVariantScope(OMPTraitInfo &TI);
1457 };
1458
1459 /// Return the OMPTraitInfo for the surrounding scope, if any.
1460 OMPTraitInfo *getOMPTraitInfoForSurroundingScope() {
1461 return OMPDeclareVariantScopes.empty() ? nullptr
1462 : OMPDeclareVariantScopes.back().TI;
1463 }
1464
1465 /// The current `omp begin/end declare variant` scopes.
1466 SmallVector<OMPDeclareVariantScope, 4> OMPDeclareVariantScopes;
1467
1468 /// The current `omp begin/end assumes` scopes.
1469 SmallVector<OMPAssumeAttr *, 4> OMPAssumeScoped;
1470
1471 /// All `omp assumes` we encountered so far.
1472 SmallVector<OMPAssumeAttr *, 4> OMPAssumeGlobal;
1473};
1474
1475} // namespace clang
1476
1477#endif // LLVM_CLANG_SEMA_SEMAOPENMP_H
#define V(N, I)
Definition: ASTContext.h:3443
Forward declaration of all AST node types.
const Decl * D
Expr * E
enum clang::sema::@1718::IndirectLocalPathEntry::EntryKind Kind
int Priority
Definition: Format.cpp:3036
Defines the clang::IdentifierInfo, clang::IdentifierTable, and clang::Selector interfaces.
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
This file defines OpenMP AST classes for clauses.
Defines some OpenMP-specific enums and functions.
uint32_t Id
Definition: SemaARM.cpp:1134
SourceLocation Loc
Definition: SemaObjC.cpp:759
Defines the clang::SourceLocation class and associated facilities.
Defines various enumerations that describe declaration and type specifiers.
This file defines OpenMP AST classes for executable directives and clauses.
Represents a C++ nested-name-specifier or a global scope specifier.
Definition: DeclSpec.h:74
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Definition: DeclBase.h:1435
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:86
The name of a declaration.
Information about one declarator, including the parsed type information and the identifier.
Definition: DeclSpec.h:1903
This represents one expression.
Definition: Expr.h:110
Represents a member of a struct/union/class.
Definition: Decl.h:3033
Represents a function declaration or definition.
Definition: Decl.h:1935
One of these records is kept for each identifier that is lexed.
This represents a decl that may have a name.
Definition: Decl.h:253
This is a basic class for representing single OpenMP clause.
Definition: OpenMPClause.h:55
This represents '#pragma omp requires...' directive.
Definition: DeclOpenMP.h:417
This represents '#pragma omp threadprivate ...' directive.
Definition: DeclOpenMP.h:110
Helper data structure representing the traits in a match clause of an declare variant or metadirectiv...
Wrapper for void* pointer.
Definition: Ownership.h:50
ParsedAttr - Represents a syntactic attribute.
Definition: ParsedAttr.h:129
Parser - This implements a parser for the C family of languages.
Definition: Parser.h:58
A (possibly-)qualified type.
Definition: Type.h:929
Scope - A scope is a transient data structure that is used while parsing the program.
Definition: Scope.h:41
A generic diagnostic builder for errors which may or may not be deferred.
Definition: SemaBase.h:110
StmtResult ActOnOpenMPTargetParallelForDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target parallel for' after parsing of the associated statement.
OMPClause * ActOnOpenMPNocontextClause(Expr *Condition, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'nocontext' clause.
OMPClause * ActOnOpenMPXDynCGroupMemClause(Expr *Size, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on a well-formed 'ompx_dyn_cgroup_mem' clause.
DeclGroupPtrTy ActOnOpenMPDeclareReductionDirectiveEnd(Scope *S, DeclGroupPtrTy DeclReductions, bool IsValid)
Called at the end of '#pragma omp declare reduction'.
bool isInOpenMPTaskUntiedContext() const
Return true if currently in OpenMP task with untied clause context.
OMPClause * ActOnOpenMPUntiedClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'untied' clause.
OMPClause * ActOnOpenMPSafelenClause(Expr *Length, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'safelen' clause.
OMPClause * ActOnOpenMPHoldsClause(Expr *E, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'holds' clause.
StmtResult ActOnOpenMPParallelMasterTaskLoopSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp parallel master taskloop simd' after parsing of the associated sta...
OMPClause * ActOnOpenMPDefaultClause(llvm::omp::DefaultKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'default' clause.
StmtResult ActOnOpenMPParallelMasterDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp parallel master' after parsing of the associated statement.
StmtResult ActOnOpenMPDispatchDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp dispatch' after parsing of the.
OMPClause * ActOnOpenMPReadClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'read' clause.
OMPClause * ActOnOpenMPFilterClause(Expr *ThreadID, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'filter' clause.
void ActOnOpenMPDeclareReductionCombinerEnd(Decl *D, Expr *Combiner)
Finish current declare reduction construct initializer.
ExprResult ActOnOpenMPCall(ExprResult Call, Scope *Scope, SourceLocation LParenLoc, MultiExprArg ArgExprs, SourceLocation RParenLoc, Expr *ExecConfig)
Given the potential call expression Call, determine if there is a specialization via the OpenMP decla...
OMPClause * ActOnOpenMPFullClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-form 'full' clauses.
StmtResult ActOnOpenMPTargetEnterDataDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AStmt)
Called on well-formed '#pragma omp target enter data' after parsing of the associated statement.
StmtResult ActOnOpenMPTargetTeamsGenericLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target teams loop' after parsing of the associated statement.
OMPClause * ActOnOpenMPDetachClause(Expr *Evt, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'detach' clause.
OMPClause * ActOnOpenMPUseClause(Expr *InteropVar, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation VarLoc, SourceLocation EndLoc)
Called on well-formed 'use' clause.
OMPClause * ActOnOpenMPFailClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'fail' clause.
StmtResult ActOnOpenMPTargetTeamsDistributeParallelForSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target teams distribute parallel for simd' after parsing of the as...
StmtResult ActOnOpenMPAssumeDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Process an OpenMP assume directive.
void ActOnFinishedOpenMPDeclareTargetContext(DeclareTargetContextInfo &DTCI)
Called once a target context is completed, that can be when a '#pragma omp end declare target' was en...
OMPClause * ActOnOpenMPDirectivePresenceClause(OpenMPClauseKind CK, llvm::ArrayRef< OpenMPDirectiveKind > DKVec, SourceLocation Loc, SourceLocation LLoc, SourceLocation RLoc)
Called on well-formed 'absent' or 'contains' clauses.
void tryCaptureOpenMPLambdas(ValueDecl *V)
Function tries to capture lambda's captured variables in the OpenMP region before the original lambda...
OMPClause * ActOnOpenMPToClause(ArrayRef< OpenMPMotionModifierKind > MotionModifiers, ArrayRef< SourceLocation > MotionModifiersLoc, CXXScopeSpec &MapperIdScopeSpec, DeclarationNameInfo &MapperId, SourceLocation ColonLoc, ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs, ArrayRef< Expr * > UnresolvedMappers={})
Called on well-formed 'to' clause.
StmtResult ActOnOpenMPParallelMaskedDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp parallel masked' after parsing of the associated statement.
StmtResult ActOnOpenMPTargetTeamsDistributeParallelForDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target teams distribute parallel for' after parsing of the associa...
OMPClause * ActOnOpenMPPrivateClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'private' clause.
void StartOpenMPClause(OpenMPClauseKind K)
Start analysis of clauses.
bool CheckOpenMPLinearModifier(OpenMPLinearClauseKind LinKind, SourceLocation LinLoc)
Checks correctness of linear modifiers.
ExprResult ActOnOpenMPDeclareMapperDirectiveVarDecl(Scope *S, QualType MapperType, SourceLocation StartLoc, DeclarationName VN)
Build the mapper variable of '#pragma omp declare mapper'.
OMPClause * ActOnOpenMPOrderedClause(SourceLocation StartLoc, SourceLocation EndLoc, SourceLocation LParenLoc=SourceLocation(), Expr *NumForLoops=nullptr)
Called on well-formed 'ordered' clause.
bool CheckOpenMPLinearDecl(const ValueDecl *D, SourceLocation ELoc, OpenMPLinearClauseKind LinKind, QualType Type, bool IsDeclareSimd=false)
Checks that the specified declaration matches requirements for the linear decls.
OMPClause * ActOnOpenMPIsDevicePtrClause(ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs)
Called on well-formed 'is_device_ptr' clause.
OMPClause * ActOnOpenMPHasDeviceAddrClause(ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs)
Called on well-formed 'has_device_addr' clause.
StmtResult ActOnOpenMPErrorDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc, bool InExContext=true)
Called on well-formed '#pragma omp error'.
OMPClause * ActOnOpenMPPartialClause(Expr *FactorExpr, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-form 'partial' clauses.
StmtResult ActOnOpenMPSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp simd' after parsing of the associated statement.
OMPClause * ActOnOpenMPLastprivateClause(ArrayRef< Expr * > VarList, OpenMPLastprivateModifier LPKind, SourceLocation LPKindLoc, SourceLocation ColonLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'lastprivate' clause.
void ActOnOpenMPDeclareTargetName(NamedDecl *ND, SourceLocation Loc, OMPDeclareTargetDeclAttr::MapTypeTy MT, DeclareTargetContextInfo &DTCI)
Called on correct id-expression from the '#pragma omp declare target'.
DeclGroupPtrTy ActOnOpenMPRequiresDirective(SourceLocation Loc, ArrayRef< OMPClause * > ClauseList)
Called on well-formed '#pragma omp requires'.
StmtResult ActOnOpenMPDistributeSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp distribute simd' after parsing of the associated statement.
OMPClause * ActOnOpenMPFirstprivateClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'firstprivate' clause.
StmtResult ActOnOpenMPDepobjDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp depobj'.
ExprResult getOpenMPCapturedExpr(VarDecl *Capture, ExprValueKind VK, ExprObjectKind OK, SourceLocation Loc)
OMPClause * ActOnOpenMPPriorityClause(Expr *Priority, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'priority' clause.
OMPClause * ActOnOpenMPSingleExprWithArgClause(OpenMPClauseKind Kind, ArrayRef< unsigned > Arguments, Expr *Expr, SourceLocation StartLoc, SourceLocation LParenLoc, ArrayRef< SourceLocation > ArgumentsLoc, SourceLocation DelimLoc, SourceLocation EndLoc)
OMPClause * ActOnOpenMPAllocateClause(Expr *Allocator, OpenMPAllocateClauseModifier ACModifier, ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation ColonLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'allocate' clause.
StmtResult ActOnOpenMPTargetParallelDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp target parallel' after parsing of the associated statement.
OMPClause * ActOnOpenMPDistScheduleClause(OpenMPDistScheduleClauseKind Kind, Expr *ChunkSize, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation KindLoc, SourceLocation CommaLoc, SourceLocation EndLoc)
Called on well-formed 'dist_schedule' clause.
OpenMPClauseKind isOpenMPPrivateDecl(ValueDecl *D, unsigned Level, unsigned CapLevel) const
Check if the specified variable is used in 'private' clause.
OMPClause * ActOnOpenMPNowaitClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'nowait' clause.
StmtResult ActOnOpenMPMetaDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp metadirective' after parsing of the associated statement.
OMPClause * ActOnOpenMPPermutationClause(ArrayRef< Expr * > PermExprs, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-form 'permutation' clause after parsing its arguments.
OMPClause * ActOnOpenMPNontemporalClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'nontemporal' clause.
OMPClause * ActOnOpenMPFromClause(ArrayRef< OpenMPMotionModifierKind > MotionModifiers, ArrayRef< SourceLocation > MotionModifiersLoc, CXXScopeSpec &MapperIdScopeSpec, DeclarationNameInfo &MapperId, SourceLocation ColonLoc, ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs, ArrayRef< Expr * > UnresolvedMappers={})
Called on well-formed 'from' clause.
OMPClause * ActOnOpenMPBindClause(OpenMPBindClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on a well-formed 'bind' clause.
OMPClause * ActOnOpenMPThreadsClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'threads' clause.
OMPClause * ActOnOpenMPThreadLimitClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'thread_limit' clause.
OMPClause * ActOnOpenMPSharedClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'shared' clause.
StmtResult ActOnOpenMPTargetExitDataDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AStmt)
Called on well-formed '#pragma omp target exit data' after parsing of the associated statement.
StmtResult ActOnOpenMPTeamsDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp teams' after parsing of the associated statement.
OMPClause * ActOnOpenMPCopyinClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'copyin' clause.
OMPClause * ActOnOpenMPMergeableClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'mergeable' clause.
void startOpenMPCXXRangeFor()
If the current region is a range loop-based region, mark the start of the loop construct.
OMPClause * ActOnOpenMPDestroyClause(Expr *InteropVar, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation VarLoc, SourceLocation EndLoc)
Called on well-formed 'destroy' clause.
StmtResult ActOnOpenMPParallelMaskedTaskLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp parallel masked taskloop' after parsing of the associated statemen...
OMPClause * ActOnOpenMPAffinityClause(SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, Expr *Modifier, ArrayRef< Expr * > Locators)
Called on well-formed 'affinity' clause.
OMPClause * ActOnOpenMPCompareClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'compare' clause.
OMPClause * ActOnOpenMPNumTeamsClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'num_teams' clause.
StmtResult ActOnOpenMPParallelSectionsDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp parallel sections' after parsing of the associated statement.
OMPClause * ActOnOpenMPUpdateClause(OpenMPDependClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'update' clause.
OMPClause * ActOnOpenMPDependClause(const OMPDependClause::DependDataTy &Data, Expr *DepModifier, ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'depend' clause.
OMPClause * ActOnOpenMPDoacrossClause(OpenMPDoacrossClauseModifier DepType, SourceLocation DepLoc, SourceLocation ColonLoc, ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'doacross' clause.
VarDecl * ActOnOpenMPDeclareReductionInitializerStart(Scope *S, Decl *D)
Initialize declare reduction construct initializer.
StmtResult ActOnOpenMPTeamsDistributeParallelForDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp teams distribute parallel for' after parsing of the associated sta...
StmtResult ActOnOpenMPMasterDirective(Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp master' after parsing of the associated statement.
StmtResult ActOnOpenMPTaskgroupDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp taskgroup'.
VarDecl * isOpenMPCapturedDecl(ValueDecl *D, bool CheckScopeInfo=false, unsigned StopAt=0)
Check if the specified variable is used in one of the private clauses (private, firstprivate,...
StmtResult ActOnOpenMPMasterTaskLoopSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp master taskloop simd' after parsing of the associated statement.
ExprResult ActOnOpenMPIdExpression(Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id, OpenMPDirectiveKind Kind)
Called on correct id-expression from the '#pragma omp threadprivate'.
void ActOnOpenMPEndAssumesDirective()
Called on well-formed '#pragma omp end assumes'.
OMPClause * ActOnOpenMPNogroupClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'nogroup' clause.
OMPClause * ActOnOpenMPGrainsizeClause(OpenMPGrainsizeClauseModifier Modifier, Expr *Size, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ModifierLoc, SourceLocation EndLoc)
Called on well-formed 'grainsize' clause.
ExprResult ActOnOMPArraySectionExpr(Expr *Base, SourceLocation LBLoc, Expr *LowerBound, SourceLocation ColonLocFirst, SourceLocation ColonLocSecond, Expr *Length, Expr *Stride, SourceLocation RBLoc)
bool isOpenMPRebuildMemberExpr(ValueDecl *D)
The member expression(this->fd) needs to be rebuilt in the template instantiation to generate private...
QualType ActOnOpenMPDeclareReductionType(SourceLocation TyLoc, TypeResult ParsedType)
Check if the specified type is allowed to be used in 'omp declare reduction' construct.
StmtResult ActOnOpenMPMaskedTaskLoopSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp masked taskloop simd' after parsing of the associated statement.
bool isOpenMPCapturedByRef(const ValueDecl *D, unsigned Level, unsigned OpenMPCaptureLevel) const
Return true if the provided declaration VD should be captured by reference.
OMPClause * ActOnOpenMPWhenClause(OMPTraitInfo &TI, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'when' clause.
StmtResult ActOnOpenMPParallelGenericLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp parallel loop' after parsing of the associated statement.
DeclGroupPtrTy ActOnOpenMPAllocateDirective(SourceLocation Loc, ArrayRef< Expr * > VarList, ArrayRef< OMPClause * > Clauses, DeclContext *Owner=nullptr)
Called on well-formed '#pragma omp allocate'.
OMPClause * ActOnOpenMPSimpleClause(OpenMPClauseKind Kind, unsigned Argument, SourceLocation ArgumentLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
OMPClause * ActOnOpenMPUnifiedAddressClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'unified_address' clause.
static int getOpenMPCaptureLevels(OpenMPDirectiveKind Kind)
Return the number of captured regions created for an OpenMP directive.
bool isOpenMPTargetCapturedDecl(const ValueDecl *D, unsigned Level, unsigned CaptureLevel) const
Check if the specified variable is captured by 'target' directive.
StmtResult ActOnOpenMPParallelMaskedTaskLoopSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp parallel masked taskloop simd' after parsing of the associated sta...
OMPClause * ActOnOpenMPDynamicAllocatorsClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'dynamic_allocators' clause.
StmtResult ActOnOpenMPScopeDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp scope' after parsing of the associated statement.
void ActOnOpenMPIteratorVarDecl(VarDecl *VD)
bool isInOpenMPDeclareVariantScope() const
Can we exit an OpenMP declare variant scope at the moment.
Definition: SemaOpenMP.h:111
StmtResult ActOnOpenMPDistributeParallelForSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp distribute parallel for simd' after parsing of the associated stat...
StmtResult ActOnOpenMPBarrierDirective(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp barrier'.
TypeResult ActOnOpenMPDeclareMapperVarDecl(Scope *S, Declarator &D)
Check variable declaration in 'omp declare mapper' construct.
ExprResult ActOnOMPIteratorExpr(Scope *S, SourceLocation IteratorKwLoc, SourceLocation LLoc, SourceLocation RLoc, ArrayRef< OMPIteratorData > Data)
OMPClause * ActOnOpenMPUsesAllocatorClause(SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, ArrayRef< UsesAllocatorsData > Data)
Called on well-formed 'uses_allocators' clause.
StmtResult ActOnOpenMPRegionEnd(StmtResult S, ArrayRef< OMPClause * > Clauses)
End of OpenMP region.
DeclGroupPtrTy ActOnOpenMPDeclareReductionDirectiveStart(Scope *S, DeclContext *DC, DeclarationName Name, ArrayRef< std::pair< QualType, SourceLocation > > ReductionTypes, AccessSpecifier AS, Decl *PrevDeclInScope=nullptr)
Called on start of '#pragma omp declare reduction'.
OMPClause * ActOnOpenMPAcqRelClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'acq_rel' clause.
OMPClause * ActOnOpenMPAllocatorClause(Expr *Allocator, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'allocator' clause.
ExprResult VerifyPositiveIntegerConstantInClause(Expr *Op, OpenMPClauseKind CKind, bool StrictlyPositive=true, bool SuppressExprDiags=false)
bool isOpenMPDeclareMapperVarDeclAllowed(const VarDecl *VD) const
OMPClause * ActOnOpenMPInclusiveClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'inclusive' clause.
SemaDiagnosticBuilder diagIfOpenMPHostCode(SourceLocation Loc, unsigned DiagID, const FunctionDecl *FD)
Creates a SemaDiagnosticBuilder that emits the diagnostic if the current context is "used as host cod...
SemaDiagnosticBuilder diagIfOpenMPDeviceCode(SourceLocation Loc, unsigned DiagID, const FunctionDecl *FD)
Creates a SemaDiagnosticBuilder that emits the diagnostic if the current context is "used as device c...
StmtResult ActOnOpenMPSectionsDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp sections' after parsing of the associated statement.
void ActOnOpenMPEndDeclareVariant()
Handle a omp end declare variant.
OMPClause * ActOnOpenMPTaskReductionClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef< Expr * > UnresolvedReductions={})
Called on well-formed 'task_reduction' clause.
bool hasGlobalOpenMPAssumes() const
Check if there is an active global omp assumes directive.
Definition: SemaOpenMP.h:246
StmtResult ActOnOpenMPCriticalDirective(const DeclarationNameInfo &DirName, ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp critical' after parsing of the associated statement.
StmtResult ActOnOpenMPMaskedDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp masked' after parsing of the.
void ActOnFinishedFunctionDefinitionInOpenMPAssumeScope(Decl *D)
Act on D, a function definition inside of an omp [begin/end] assumes.
void EndOpenMPDSABlock(Stmt *CurDirective)
Called on end of data sharing attribute block.
OMPClause * ActOnOpenMPOrderClause(OpenMPOrderClauseModifier Modifier, OpenMPOrderClauseKind Kind, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation MLoc, SourceLocation KindLoc, SourceLocation EndLoc)
Called on well-formed 'order' clause.
OMPClause * ActOnOpenMPReductionClause(ArrayRef< Expr * > VarList, OpenMPReductionClauseModifier Modifier, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ModifierLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef< Expr * > UnresolvedReductions={})
Called on well-formed 'reduction' clause.
OMPClause * ActOnOpenMPSizesClause(ArrayRef< Expr * > SizeExprs, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-form 'sizes' clause.
bool ActOnStartOpenMPDeclareTargetContext(DeclareTargetContextInfo &DTCI)
Called on the start of target region i.e. '#pragma omp declare target'.
StmtResult ActOnOpenMPTeamsDistributeParallelForSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp teams distribute parallel for simd' after parsing of the associate...
OMPClause * ActOnOpenMPDeviceClause(OpenMPDeviceClauseModifier Modifier, Expr *Device, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ModifierLoc, SourceLocation EndLoc)
Called on well-formed 'device' clause.
OMPClause * ActOnOpenMPNumThreadsClause(Expr *NumThreads, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'num_threads' clause.
StmtResult ActOnOpenMPDistributeDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp distribute' after parsing of the associated statement.
StmtResult ActOnOpenMPSectionDirective(Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp section' after parsing of the associated statement.
StmtResult ActOnOpenMPInterchangeDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp interchange' after parsing of its clauses and the associated state...
bool isOpenMPGlobalCapturedDecl(ValueDecl *D, unsigned Level, unsigned CaptureLevel) const
Check if the specified global variable must be captured by outer capture regions.
OMPClause * ActOnOpenMPInReductionClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef< Expr * > UnresolvedReductions={})
Called on well-formed 'in_reduction' clause.
StmtResult ActOnOpenMPGenericLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp loop' after parsing of the associated statement.
OMPClause * ActOnOpenMPFlushClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'flush' pseudo clause.
OMPRequiresDecl * CheckOMPRequiresDecl(SourceLocation Loc, ArrayRef< OMPClause * > Clauses)
Check restrictions on Requires directive.
void ActOnFinishedFunctionDefinitionInOpenMPDeclareVariantScope(Decl *D, SmallVectorImpl< FunctionDecl * > &Bases)
Register D as specialization of all base functions in Bases in the current omp begin/end declare vari...
StmtResult ActOnOpenMPExecutableDirective(OpenMPDirectiveKind Kind, const DeclarationNameInfo &DirName, OpenMPDirectiveKind CancelRegion, ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
void EndOpenMPClause()
End analysis of clauses.
bool isInOpenMPAssumeScope() const
Check if there is an active global omp begin assumes directive.
Definition: SemaOpenMP.h:243
StmtResult ActOnOpenMPDistributeParallelForDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp distribute parallel for' after parsing of the associated statement...
QualType ActOnOpenMPDeclareMapperType(SourceLocation TyLoc, TypeResult ParsedType)
Check if the specified type is allowed to be used in 'omp declare mapper' construct.
StmtResult ActOnOpenMPTeamsDistributeDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp teams distribute' after parsing of the associated statement.
StmtResult ActOnOpenMPTargetTeamsDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp target teams' after parsing of the associated statement.
OMPClause * ActOnOpenMPMessageClause(Expr *MS, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'message' clause.
StmtResult ActOnOpenMPScanDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp scan'.
OMPClause * ActOnOpenMPScheduleClause(OpenMPScheduleClauseModifier M1, OpenMPScheduleClauseModifier M2, OpenMPScheduleClauseKind Kind, Expr *ChunkSize, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation M1Loc, SourceLocation M2Loc, SourceLocation KindLoc, SourceLocation CommaLoc, SourceLocation EndLoc)
Called on well-formed 'schedule' clause.
void ActOnOpenMPLoopInitialization(SourceLocation ForLoc, Stmt *Init)
Check if the current region is an OpenMP loop region and if it is, mark loop control variable,...
OMPClause * ActOnOpenMPUnifiedSharedMemoryClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'unified_address' clause.
void DiagnoseUnterminatedOpenMPDeclareTarget()
Report unterminated 'omp declare target' or 'omp begin declare target' at the end of a compilation un...
void finalizeOpenMPDelayedAnalysis(const FunctionDecl *Caller, const FunctionDecl *Callee, SourceLocation Loc)
Finishes analysis of the deferred functions calls that may be declared as host/nohost during device/h...
OMPClause * ActOnOpenMPSimdlenClause(Expr *Length, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'simdlen' clause.
std::optional< std::pair< FunctionDecl *, Expr * > > checkOpenMPDeclareVariantFunction(DeclGroupPtrTy DG, Expr *VariantRef, OMPTraitInfo &TI, unsigned NumAppendArgs, SourceRange SR)
Checks '#pragma omp declare variant' variant function and original functions after parsing of the ass...
OMPClause * ActOnOpenMPUseDevicePtrClause(ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs)
Called on well-formed 'use_device_ptr' clause.
StmtResult ActOnOpenMPParallelForSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp parallel for simd' after parsing of the associated statement.
OpaquePtr< DeclGroupRef > DeclGroupPtrTy
Definition: SemaOpenMP.h:55
OMPClause * ActOnOpenMPReleaseClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'release' clause.
OMPClause * ActOnOpenMPAcquireClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'acquire' clause.
OMPClause * ActOnOpenMPProcBindClause(llvm::omp::ProcBindKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'proc_bind' clause.
OMPClause * ActOnOpenMPSIMDClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'simd' clause.
OMPClause * ActOnOpenMPXBareClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on a well-formed 'ompx_bare' clause.
StmtResult ActOnOpenMPInformationalDirective(OpenMPDirectiveKind Kind, const DeclarationNameInfo &DirName, ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Process an OpenMP informational directive.
StmtResult ActOnOpenMPCanonicalLoop(Stmt *AStmt)
Called for syntactical loops (ForStmt or CXXForRangeStmt) associated to an OpenMP loop directive.
OMPClause * ActOnOpenMPHintClause(Expr *Hint, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'hint' clause.
OMPClause * ActOnOpenMPSingleExprClause(OpenMPClauseKind Kind, Expr *Expr, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
OMPClause * ActOnOpenMPNullaryAssumptionClause(OpenMPClauseKind CK, SourceLocation Loc, SourceLocation RLoc)
StmtResult ActOnOpenMPTargetTeamsDistributeDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target teams distribute' after parsing of the associated statement...
StmtResult ActOnOpenMPParallelForDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp parallel for' after parsing of the associated statement.
OMPClause * ActOnOpenMPCaptureClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'capture' clause.
StmtResult ActOnOpenMPForDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp for' after parsing of the associated statement.
StmtResult ActOnOpenMPAtomicDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp atomic' after parsing of the associated statement.
StmtResult ActOnOpenMPTargetUpdateDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AStmt)
Called on well-formed '#pragma omp target update'.
StmtResult ActOnOpenMPOrderedDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp ordered' after parsing of the associated statement.
StmtResult ActOnOpenMPReverseDirective(Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp reverse'.
ExprResult ActOnOMPArrayShapingExpr(Expr *Base, SourceLocation LParenLoc, SourceLocation RParenLoc, ArrayRef< Expr * > Dims, ArrayRef< SourceRange > Brackets)
OMPClause * ActOnOpenMPAtClause(OpenMPAtClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'at' clause.
StmtResult ActOnOpenMPTaskLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp taskloop' after parsing of the associated statement.
OMPClause * ActOnOpenMPInitClause(Expr *InteropVar, OMPInteropInfo &InteropInfo, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation VarLoc, SourceLocation EndLoc)
Called on well-formed 'init' clause.
OMPClause * ActOnOpenMPUseDeviceAddrClause(ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs)
Called on well-formed 'use_device_addr' clause.
void ActOnOpenMPDeclareReductionCombinerStart(Scope *S, Decl *D)
Initialize declare reduction construct initializer.
std::pair< StringRef, QualType > CapturedParamNameType
Definition: SemaOpenMP.h:56
OMPClause * ActOnOpenMPFinalClause(Expr *Condition, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'final' clause.
bool isInOpenMPTargetExecutionDirective() const
Return true inside OpenMP target region.
StmtResult ActOnOpenMPTargetDataDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp target data' after parsing of the associated statement.
StmtResult ActOnOpenMPMasterTaskLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp master taskloop' after parsing of the associated statement.
void ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParameterLists, SmallVectorImpl< FunctionDecl * > &Bases)
The declarator D defines a function in the scope S which is nested in an omp begin/end declare varian...
StmtResult ActOnOpenMPFlushDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp flush'.
StmtResult ActOnOpenMPUnrollDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp unroll' after parsing of its clauses and the associated statement.
OMPClause * ActOnOpenMPMapClause(Expr *IteratorModifier, ArrayRef< OpenMPMapModifierKind > MapTypeModifiers, ArrayRef< SourceLocation > MapTypeModifiersLoc, CXXScopeSpec &MapperIdScopeSpec, DeclarationNameInfo &MapperId, OpenMPMapClauseKind MapType, bool IsMapTypeImplicit, SourceLocation MapLoc, SourceLocation ColonLoc, ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs, bool NoDiagnose=false, ArrayRef< Expr * > UnresolvedMappers={})
Called on well-formed 'map' clause.
OMPClause * ActOnOpenMPNumTasksClause(OpenMPNumTasksClauseModifier Modifier, Expr *NumTasks, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ModifierLoc, SourceLocation EndLoc)
Called on well-formed 'num_tasks' clause.
void ActOnOpenMPDeclareTargetInitializer(Decl *D)
Adds OMPDeclareTargetDeclAttr to referenced variables in declare target directive.
bool isInOpenMPDeclareTargetContext() const
Return true inside OpenMP declare target region.
Definition: SemaOpenMP.h:371
StmtResult ActOnOpenMPCancellationPointDirective(SourceLocation StartLoc, SourceLocation EndLoc, OpenMPDirectiveKind CancelRegion)
Called on well-formed '#pragma omp cancellation point'.
OMPClause * ActOnOpenMPVarListClause(OpenMPClauseKind Kind, ArrayRef< Expr * > Vars, const OMPVarListLocTy &Locs, OpenMPVarListDataTy &Data)
void startOpenMPLoop()
If the current region is a loop-based region, mark the start of the loop construct.
StmtResult ActOnOpenMPTargetDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp target' after parsing of the associated statement.
void StartOpenMPDSABlock(OpenMPDirectiveKind K, const DeclarationNameInfo &DirName, Scope *CurScope, SourceLocation Loc)
Called on start of new data sharing attribute block.
OMPThreadPrivateDecl * CheckOMPThreadPrivateDecl(SourceLocation Loc, ArrayRef< Expr * > VarList)
Builds a new OpenMPThreadPrivateDecl and checks its correctness.
void handleOMPAssumeAttr(Decl *D, const ParsedAttr &AL)
OMPClause * ActOnOpenMPSeverityClause(OpenMPSeverityClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'severity' clause.
void ActOnOpenMPDeclareVariantDirective(FunctionDecl *FD, Expr *VariantRef, OMPTraitInfo &TI, ArrayRef< Expr * > AdjustArgsNothing, ArrayRef< Expr * > AdjustArgsNeedDevicePtr, ArrayRef< OMPInteropInfo > AppendArgs, SourceLocation AdjustArgsLoc, SourceLocation AppendArgsLoc, SourceRange SR)
Called on well-formed '#pragma omp declare variant' after parsing of the associated method/function.
void ActOnOpenMPDeclareReductionInitializerEnd(Decl *D, Expr *Initializer, VarDecl *OmpPrivParm)
Finish current declare reduction construct initializer.
OMPClause * ActOnOpenMPLinearClause(ArrayRef< Expr * > VarList, Expr *Step, SourceLocation StartLoc, SourceLocation LParenLoc, OpenMPLinearClauseKind LinKind, SourceLocation LinLoc, SourceLocation ColonLoc, SourceLocation StepModifierLoc, SourceLocation EndLoc)
Called on well-formed 'linear' clause.
OMPClause * ActOnOpenMPDefaultmapClause(OpenMPDefaultmapClauseModifier M, OpenMPDefaultmapClauseKind Kind, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation MLoc, SourceLocation KindLoc, SourceLocation EndLoc)
Called on well-formed 'defaultmap' clause.
StmtResult ActOnOpenMPMaskedTaskLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp masked taskloop' after parsing of the associated statement.
StmtResult ActOnOpenMPTaskwaitDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp taskwait'.
StmtResult ActOnOpenMPForSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp for simd' after parsing of the associated statement.
OMPClause * ActOnOpenMPRelaxedClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'relaxed' clause.
OMPClause * ActOnOpenMPAlignedClause(ArrayRef< Expr * > VarList, Expr *Alignment, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc)
Called on well-formed 'aligned' clause.
StmtResult ActOnOpenMPInteropDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp interop'.
OMPClause * ActOnOpenMPDepobjClause(Expr *Depobj, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'depobj' pseudo clause.
OMPClause * ActOnOpenMPSeqCstClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'seq_cst' clause.
void checkDeclIsAllowedInOpenMPTarget(Expr *E, Decl *D, SourceLocation IdLoc=SourceLocation())
Check declaration inside target region.
OMPClause * ActOnOpenMPNovariantsClause(Expr *Condition, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'novariants' clause.
OMPClause * ActOnOpenMPCopyprivateClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'copyprivate' clause.
OMPClause * ActOnOpenMPCollapseClause(Expr *NumForLoops, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'collapse' clause.
DeclGroupPtrTy ActOnOpenMPDeclareSimdDirective(DeclGroupPtrTy DG, OMPDeclareSimdDeclAttr::BranchStateTy BS, Expr *Simdlen, ArrayRef< Expr * > Uniforms, ArrayRef< Expr * > Aligneds, ArrayRef< Expr * > Alignments, ArrayRef< Expr * > Linears, ArrayRef< unsigned > LinModifiers, ArrayRef< Expr * > Steps, SourceRange SR)
Called on well-formed '#pragma omp declare simd' after parsing of the associated method/function.
ExprResult PerformOpenMPImplicitIntegerConversion(SourceLocation OpLoc, Expr *Op)
StmtResult ActOnOpenMPTargetSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target simd' after parsing of the associated statement.
OMPClause * ActOnOpenMPAlignClause(Expr *Alignment, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'align' clause.
OMPClause * ActOnOpenMPAtomicDefaultMemOrderClause(OpenMPAtomicDefaultMemOrderClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'atomic_default_mem_order' clause.
StmtResult ActOnOpenMPTeamsGenericLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp teams loop' after parsing of the associated statement.
OMPClause * ActOnOpenMPWeakClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'weak' clause.
OMPClause * ActOnOpenMPXAttributeClause(ArrayRef< const Attr * > Attrs, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on a well-formed 'ompx_attribute' clause.
StmtResult ActOnOpenMPTileDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp tile' after parsing of its clauses and the associated statement.
StmtResult ActOnOpenMPParallelDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp parallel' after parsing of the associated statement.
StmtResult ActOnOpenMPSingleDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp single' after parsing of the associated statement.
StmtResult ActOnOpenMPTaskLoopSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp taskloop simd' after parsing of the associated statement.
const ValueDecl * getOpenMPDeclareMapperVarName() const
StmtResult ActOnOpenMPParallelMasterTaskLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp parallel master taskloop' after parsing of the associated statemen...
DeclGroupPtrTy ActOnOpenMPThreadprivateDirective(SourceLocation Loc, ArrayRef< Expr * > VarList)
Called on well-formed '#pragma omp threadprivate'.
void ActOnOpenMPRegionStart(OpenMPDirectiveKind DKind, Scope *CurScope)
Initialization of captured region for OpenMP region.
NamedDecl * lookupOpenMPDeclareTargetName(Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id)
Searches for the provided declaration name for OpenMP declare target directive.
OMPClause * ActOnOpenMPExclusiveClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'exclusive' clause.
OMPClause * ActOnOpenMPWriteClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'write' clause.
StmtResult ActOnOpenMPTargetParallelGenericLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target parallel loop' after parsing of the associated statement.
void ActOnOpenMPAssumesDirective(SourceLocation Loc, OpenMPDirectiveKind DKind, ArrayRef< std::string > Assumptions, bool SkippedClauses)
Called on well-formed '#pragma omp [begin] assume[s]'.
StmtResult ActOnOpenMPTargetParallelForSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target parallel for simd' after parsing of the associated statemen...
void ActOnOpenMPBeginDeclareVariant(SourceLocation Loc, OMPTraitInfo &TI)
Handle a omp begin declare variant.
StmtResult ActOnOpenMPLoopnest(Stmt *AStmt)
Process a canonical OpenMP loop nest that can either be a canonical literal loop (ForStmt or CXXForRa...
OMPClause * ActOnOpenMPReverseOffloadClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'reverse_offload' clause.
StmtResult ActOnOpenMPTaskDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp task' after parsing of the associated statement.
OMPClause * ActOnOpenMPIfClause(OpenMPDirectiveKind NameModifier, Expr *Condition, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation NameModifierLoc, SourceLocation ColonLoc, SourceLocation EndLoc)
Called on well-formed 'if' clause.
llvm::SmallDenseMap< const ValueDecl *, const Expr *, 4 > VarsWithInheritedDSAType
Definition: SemaOpenMP.h:431
StmtResult ActOnOpenMPTargetTeamsDistributeSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target teams distribute simd' after parsing of the associated stat...
const DeclareTargetContextInfo ActOnOpenMPEndDeclareTargetDirective()
Called at the end of target region i.e. '#pragma omp end declare target'.
void setOpenMPCaptureKind(FieldDecl *FD, const ValueDecl *D, unsigned Level)
Sets OpenMP capture kind (OMPC_private, OMPC_firstprivate, OMPC_map etc.) for FD based on DSA for the...
OMPClause * ActOnOpenMPClause(OpenMPClauseKind Kind, SourceLocation StartLoc, SourceLocation EndLoc)
StmtResult ActOnOpenMPCancelDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc, OpenMPDirectiveKind CancelRegion)
Called on well-formed '#pragma omp cancel'.
StmtResult ActOnOpenMPTaskyieldDirective(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp taskyield'.
StmtResult ActOnOpenMPTeamsDistributeSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp teams distribute simd' after parsing of the associated statement.
DeclGroupPtrTy ActOnOpenMPDeclareMapperDirective(Scope *S, DeclContext *DC, DeclarationName Name, QualType MapperType, SourceLocation StartLoc, DeclarationName VN, AccessSpecifier AS, Expr *MapperVarRef, ArrayRef< OMPClause * > Clauses, Decl *PrevDeclInScope=nullptr)
Called on start of '#pragma omp declare mapper'.
Sema - This implements semantic analysis and AST building for C.
Definition: Sema.h:463
Encodes a location in the source.
A trivial tuple used to represent a source range.
Stmt - This represents one statement.
Definition: Stmt.h:84
The base class of the type hierarchy.
Definition: Type.h:1828
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
Definition: Decl.h:671
Represents a variable declaration or definition.
Definition: Decl.h:882
Retains information about a function, method, or block that is currently being parsed.
Definition: ScopeInfo.h:104
The JSON file list parser is used to communicate input to InstallAPI.
llvm::omp::Directive OpenMPDirectiveKind
OpenMP directives.
Definition: OpenMPKinds.h:25
OpenMPDefaultmapClauseModifier
OpenMP modifiers for 'defaultmap' clause.
Definition: OpenMPKinds.h:119
OpenMPOrderClauseModifier
OpenMP modifiers for 'order' clause.
Definition: OpenMPKinds.h:172
ExprObjectKind
A further classification of the kind of object referenced by an l-value or x-value.
Definition: Specifiers.h:149
OpenMPAtClauseKind
OpenMP attributes for 'at' clause.
Definition: OpenMPKinds.h:136
OpenMPReductionClauseModifier
OpenMP modifiers for 'reduction' clause.
Definition: OpenMPKinds.h:187
OpenMPScheduleClauseModifier
OpenMP modifiers for 'schedule' clause.
Definition: OpenMPKinds.h:39
llvm::omp::Clause OpenMPClauseKind
OpenMP clauses.
Definition: OpenMPKinds.h:28
OpenMPDistScheduleClauseKind
OpenMP attributes for 'dist_schedule' clause.
Definition: OpenMPKinds.h:104
OpenMPDoacrossClauseModifier
OpenMP dependence types for 'doacross' clause.
Definition: OpenMPKinds.h:220
OpenMPBindClauseKind
OpenMP bindings for the 'bind' clause.
Definition: OpenMPKinds.h:201
OpenMPLastprivateModifier
OpenMP 'lastprivate' clause modifier.
Definition: OpenMPKinds.h:158
OpenMPDependClauseKind
OpenMP attributes for 'depend' clause.
Definition: OpenMPKinds.h:55
OpenMPGrainsizeClauseModifier
Definition: OpenMPKinds.h:207
OpenMPNumTasksClauseModifier
Definition: OpenMPKinds.h:213
OpenMPSeverityClauseKind
OpenMP attributes for 'severity' clause.
Definition: OpenMPKinds.h:143
OpenMPDefaultmapClauseKind
OpenMP attributes for 'defaultmap' clause.
Definition: OpenMPKinds.h:111
OpenMPAllocateClauseModifier
OpenMP modifiers for 'allocate' clause.
Definition: OpenMPKinds.h:227
@ OMPC_ALLOCATE_unknown
Definition: OpenMPKinds.h:230
OpenMPLinearClauseKind
OpenMP attributes for 'linear' clause.
Definition: OpenMPKinds.h:63
ExprValueKind
The categorization of expression values, currently following the C++11 scheme.
Definition: Specifiers.h:132
OpenMPAtomicDefaultMemOrderClauseKind
OpenMP attributes for 'atomic_default_mem_order' clause.
Definition: OpenMPKinds.h:128
OpenMPDeviceClauseModifier
OpenMP modifiers for 'device' clause.
Definition: OpenMPKinds.h:48
OpenMPOrderClauseKind
OpenMP attributes for 'order' clause.
Definition: OpenMPKinds.h:165
OpenMPScheduleClauseKind
OpenMP attributes for 'schedule' clause.
Definition: OpenMPKinds.h:31
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
Definition: Specifiers.h:123
OpenMPMapClauseKind
OpenMP mapping kind for 'map' clause.
Definition: OpenMPKinds.h:71
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspon...
Iterator range representation begin:end[:step].
Definition: ExprOpenMP.h:154
This structure contains most locations needed for by an OMPVarListClause.
Definition: OpenMPClause.h:259
OMPDeclareTargetDeclAttr::MapTypeTy MT
Definition: SemaOpenMP.h:303
DeclareTargetContextInfo(OpenMPDirectiveKind Kind, SourceLocation Loc)
Definition: SemaOpenMP.h:321
std::optional< Expr * > Indirect
The directive with indirect clause.
Definition: SemaOpenMP.h:316
OpenMPDirectiveKind Kind
The directive kind, begin declare target or declare target.
Definition: SemaOpenMP.h:313
OMPDeclareTargetDeclAttr::DevTypeTy DT
The 'device_type' as parsed from the clause.
Definition: SemaOpenMP.h:310
SourceLocation Loc
The directive location.
Definition: SemaOpenMP.h:319
llvm::DenseMap< NamedDecl *, MapInfo > ExplicitlyMapped
Explicitly listed variables and functions in a 'to' or 'link' clause.
Definition: SemaOpenMP.h:307
Data structure for iterator expression.
Definition: SemaOpenMP.h:1387
OMPIteratorExpr::IteratorRange Range
Definition: SemaOpenMP.h:1391
Data used for processing a list of variables in OpenMP clauses.
Definition: SemaOpenMP.h:1130
SmallVector< SourceLocation, NumberOfOMPMotionModifiers > MotionModifiersLoc
Definition: SemaOpenMP.h:1145
SmallVector< OpenMPMotionModifierKind, NumberOfOMPMotionModifiers > MotionModifiers
Definition: SemaOpenMP.h:1144
SmallVector< OpenMPMapModifierKind, NumberOfOMPMapClauseModifiers > MapTypeModifiers
Definition: SemaOpenMP.h:1140
SmallVector< SourceLocation, NumberOfOMPMapClauseModifiers > MapTypeModifiersLoc
Definition: SemaOpenMP.h:1142
DeclarationNameInfo ReductionOrMapperId
Definition: SemaOpenMP.h:1136
int ExtraModifier
Additional modifier for linear, map, depend or lastprivate clause.
Definition: SemaOpenMP.h:1137
OpenMPAllocateClauseModifier AllocClauseModifier
'step' modifier location for linear clause
Definition: SemaOpenMP.h:1151
Data for list of allocators.
Definition: SemaOpenMP.h:1327
Expr * AllocatorTraits
Allocator traits.
Definition: SemaOpenMP.h:1331
SourceLocation LParenLoc
Locations of '(' and ')' symbols.
Definition: SemaOpenMP.h:1333