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 'full' clauses.
896 SourceLocation EndLoc);
897 /// Called on well-form 'partial' clauses.
899 SourceLocation LParenLoc,
900 SourceLocation EndLoc);
901 /// Called on well-formed 'collapse' clause.
903 SourceLocation StartLoc,
904 SourceLocation LParenLoc,
905 SourceLocation EndLoc);
906 /// Called on well-formed 'ordered' clause.
907 OMPClause *
909 SourceLocation LParenLoc = SourceLocation(),
910 Expr *NumForLoops = nullptr);
911 /// Called on well-formed 'grainsize' clause.
913 Expr *Size, SourceLocation StartLoc,
914 SourceLocation LParenLoc,
915 SourceLocation ModifierLoc,
916 SourceLocation EndLoc);
917 /// Called on well-formed 'num_tasks' clause.
919 Expr *NumTasks, SourceLocation StartLoc,
920 SourceLocation LParenLoc,
921 SourceLocation ModifierLoc,
922 SourceLocation EndLoc);
923 /// Called on well-formed 'hint' clause.
925 SourceLocation LParenLoc,
926 SourceLocation EndLoc);
927 /// Called on well-formed 'detach' clause.
929 SourceLocation LParenLoc,
930 SourceLocation EndLoc);
931
933 SourceLocation ArgumentLoc,
934 SourceLocation StartLoc,
935 SourceLocation LParenLoc,
936 SourceLocation EndLoc);
937 /// Called on well-formed 'when' clause.
939 SourceLocation LParenLoc,
940 SourceLocation EndLoc);
941 /// Called on well-formed 'default' clause.
942 OMPClause *ActOnOpenMPDefaultClause(llvm::omp::DefaultKind Kind,
943 SourceLocation KindLoc,
944 SourceLocation StartLoc,
945 SourceLocation LParenLoc,
946 SourceLocation EndLoc);
947 /// Called on well-formed 'proc_bind' clause.
948 OMPClause *ActOnOpenMPProcBindClause(llvm::omp::ProcBindKind Kind,
949 SourceLocation KindLoc,
950 SourceLocation StartLoc,
951 SourceLocation LParenLoc,
952 SourceLocation EndLoc);
953 /// Called on well-formed 'order' clause.
956 SourceLocation StartLoc,
957 SourceLocation LParenLoc,
958 SourceLocation MLoc, SourceLocation KindLoc,
959 SourceLocation EndLoc);
960 /// Called on well-formed 'update' clause.
962 SourceLocation KindLoc,
963 SourceLocation StartLoc,
964 SourceLocation LParenLoc,
965 SourceLocation EndLoc);
966 /// Called on well-formed 'holds' clause.
968 SourceLocation LParenLoc,
969 SourceLocation EndLoc);
970 /// Called on well-formed 'absent' or 'contains' clauses.
976 SourceLocation RLoc);
977
980 SourceLocation StartLoc, SourceLocation LParenLoc,
981 ArrayRef<SourceLocation> ArgumentsLoc, SourceLocation DelimLoc,
982 SourceLocation EndLoc);
983 /// Called on well-formed 'schedule' clause.
986 OpenMPScheduleClauseKind Kind, Expr *ChunkSize, SourceLocation StartLoc,
987 SourceLocation LParenLoc, SourceLocation M1Loc, SourceLocation M2Loc,
988 SourceLocation KindLoc, SourceLocation CommaLoc, SourceLocation EndLoc);
989
991 SourceLocation EndLoc);
992 /// Called on well-formed 'nowait' clause.
994 SourceLocation EndLoc);
995 /// Called on well-formed 'untied' clause.
997 SourceLocation EndLoc);
998 /// Called on well-formed 'mergeable' clause.
1000 SourceLocation EndLoc);
1001 /// Called on well-formed 'read' clause.
1003 SourceLocation EndLoc);
1004 /// Called on well-formed 'write' clause.
1006 SourceLocation EndLoc);
1007 /// Called on well-formed 'update' clause.
1009 SourceLocation EndLoc);
1010 /// Called on well-formed 'capture' clause.
1012 SourceLocation EndLoc);
1013 /// Called on well-formed 'compare' clause.
1015 SourceLocation EndLoc);
1016 /// Called on well-formed 'fail' clause.
1018 SourceLocation EndLoc);
1020 SourceLocation KindLoc,
1021 SourceLocation StartLoc,
1022 SourceLocation LParenLoc,
1023 SourceLocation EndLoc);
1024
1025 /// Called on well-formed 'seq_cst' clause.
1027 SourceLocation EndLoc);
1028 /// Called on well-formed 'acq_rel' clause.
1030 SourceLocation EndLoc);
1031 /// Called on well-formed 'acquire' clause.
1033 SourceLocation EndLoc);
1034 /// Called on well-formed 'release' clause.
1036 SourceLocation EndLoc);
1037 /// Called on well-formed 'relaxed' clause.
1039 SourceLocation EndLoc);
1040 /// Called on well-formed 'weak' clause.
1042 SourceLocation EndLoc);
1043
1044 /// Called on well-formed 'init' clause.
1045 OMPClause *
1046 ActOnOpenMPInitClause(Expr *InteropVar, OMPInteropInfo &InteropInfo,
1047 SourceLocation StartLoc, SourceLocation LParenLoc,
1048 SourceLocation VarLoc, SourceLocation EndLoc);
1049
1050 /// Called on well-formed 'use' clause.
1051 OMPClause *ActOnOpenMPUseClause(Expr *InteropVar, SourceLocation StartLoc,
1052 SourceLocation LParenLoc,
1053 SourceLocation VarLoc, SourceLocation EndLoc);
1054
1055 /// Called on well-formed 'destroy' clause.
1057 SourceLocation LParenLoc,
1058 SourceLocation VarLoc,
1059 SourceLocation EndLoc);
1060 /// Called on well-formed 'novariants' clause.
1062 SourceLocation StartLoc,
1063 SourceLocation LParenLoc,
1064 SourceLocation EndLoc);
1065 /// Called on well-formed 'nocontext' clause.
1067 SourceLocation StartLoc,
1068 SourceLocation LParenLoc,
1069 SourceLocation EndLoc);
1070 /// Called on well-formed 'filter' clause.
1072 SourceLocation LParenLoc,
1073 SourceLocation EndLoc);
1074 /// Called on well-formed 'threads' clause.
1076 SourceLocation EndLoc);
1077 /// Called on well-formed 'simd' clause.
1079 SourceLocation EndLoc);
1080 /// Called on well-formed 'nogroup' clause.
1082 SourceLocation EndLoc);
1083 /// Called on well-formed 'unified_address' clause.
1085 SourceLocation EndLoc);
1086
1087 /// Called on well-formed 'unified_address' clause.
1089 SourceLocation EndLoc);
1090
1091 /// Called on well-formed 'reverse_offload' clause.
1093 SourceLocation EndLoc);
1094
1095 /// Called on well-formed 'dynamic_allocators' clause.
1097 SourceLocation EndLoc);
1098
1099 /// Called on well-formed 'atomic_default_mem_order' clause.
1102 SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc);
1103
1104 /// Called on well-formed 'at' clause.
1106 SourceLocation KindLoc,
1107 SourceLocation StartLoc,
1108 SourceLocation LParenLoc,
1109 SourceLocation EndLoc);
1110
1111 /// Called on well-formed 'severity' clause.
1113 SourceLocation KindLoc,
1114 SourceLocation StartLoc,
1115 SourceLocation LParenLoc,
1116 SourceLocation EndLoc);
1117
1118 /// Called on well-formed 'message' clause.
1119 /// passing string for message.
1121 SourceLocation LParenLoc,
1122 SourceLocation EndLoc);
1123
1124 /// Data used for processing a list of variables in OpenMP clauses.
1125 struct OpenMPVarListDataTy final {
1127 Expr *IteratorExpr = nullptr;
1132 int ExtraModifier = -1; ///< Additional modifier for linear, map, depend or
1133 ///< lastprivate clause.
1141 bool IsMapTypeImplicit = false;
1145 StepModifierLoc; /// 'step' modifier location for linear clause
1146 };
1147
1149 ArrayRef<Expr *> Vars,
1150 const OMPVarListLocTy &Locs,
1152 /// Called on well-formed 'inclusive' clause.
1154 SourceLocation StartLoc,
1155 SourceLocation LParenLoc,
1156 SourceLocation EndLoc);
1157 /// Called on well-formed 'exclusive' clause.
1159 SourceLocation StartLoc,
1160 SourceLocation LParenLoc,
1161 SourceLocation EndLoc);
1162 /// Called on well-formed 'allocate' clause.
1163 OMPClause *
1165 SourceLocation StartLoc, SourceLocation ColonLoc,
1166 SourceLocation LParenLoc, SourceLocation EndLoc);
1167 /// Called on well-formed 'private' clause.
1169 SourceLocation StartLoc,
1170 SourceLocation LParenLoc,
1171 SourceLocation EndLoc);
1172 /// Called on well-formed 'firstprivate' clause.
1174 SourceLocation StartLoc,
1175 SourceLocation LParenLoc,
1176 SourceLocation EndLoc);
1177 /// Called on well-formed 'lastprivate' clause.
1180 SourceLocation LPKindLoc, SourceLocation ColonLoc,
1181 SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc);
1182 /// Called on well-formed 'shared' clause.
1184 SourceLocation StartLoc,
1185 SourceLocation LParenLoc,
1186 SourceLocation EndLoc);
1187 /// Called on well-formed 'reduction' clause.
1190 SourceLocation StartLoc, SourceLocation LParenLoc,
1191 SourceLocation ModifierLoc, SourceLocation ColonLoc,
1192 SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec,
1193 const DeclarationNameInfo &ReductionId,
1194 ArrayRef<Expr *> UnresolvedReductions = std::nullopt);
1195 /// Called on well-formed 'task_reduction' clause.
1197 ArrayRef<Expr *> VarList, SourceLocation StartLoc,
1198 SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc,
1199 CXXScopeSpec &ReductionIdScopeSpec,
1200 const DeclarationNameInfo &ReductionId,
1201 ArrayRef<Expr *> UnresolvedReductions = std::nullopt);
1202 /// Called on well-formed 'in_reduction' clause.
1204 ArrayRef<Expr *> VarList, SourceLocation StartLoc,
1205 SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc,
1206 CXXScopeSpec &ReductionIdScopeSpec,
1207 const DeclarationNameInfo &ReductionId,
1208 ArrayRef<Expr *> UnresolvedReductions = std::nullopt);
1209 /// Called on well-formed 'linear' clause.
1211 ArrayRef<Expr *> VarList, Expr *Step, SourceLocation StartLoc,
1212 SourceLocation LParenLoc, OpenMPLinearClauseKind LinKind,
1213 SourceLocation LinLoc, SourceLocation ColonLoc,
1214 SourceLocation StepModifierLoc, SourceLocation EndLoc);
1215 /// Called on well-formed 'aligned' clause.
1217 SourceLocation StartLoc,
1218 SourceLocation LParenLoc,
1219 SourceLocation ColonLoc,
1220 SourceLocation EndLoc);
1221 /// Called on well-formed 'copyin' clause.
1223 SourceLocation StartLoc,
1224 SourceLocation LParenLoc,
1225 SourceLocation EndLoc);
1226 /// Called on well-formed 'copyprivate' clause.
1228 SourceLocation StartLoc,
1229 SourceLocation LParenLoc,
1230 SourceLocation EndLoc);
1231 /// Called on well-formed 'flush' pseudo clause.
1233 SourceLocation StartLoc,
1234 SourceLocation LParenLoc,
1235 SourceLocation EndLoc);
1236 /// Called on well-formed 'depobj' pseudo clause.
1238 SourceLocation LParenLoc,
1239 SourceLocation EndLoc);
1240 /// Called on well-formed 'depend' clause.
1242 Expr *DepModifier,
1243 ArrayRef<Expr *> VarList,
1244 SourceLocation StartLoc,
1245 SourceLocation LParenLoc,
1246 SourceLocation EndLoc);
1247 /// Called on well-formed 'device' clause.
1249 Expr *Device, SourceLocation StartLoc,
1250 SourceLocation LParenLoc,
1251 SourceLocation ModifierLoc,
1252 SourceLocation EndLoc);
1253 /// Called on well-formed 'map' clause.
1255 Expr *IteratorModifier, ArrayRef<OpenMPMapModifierKind> MapTypeModifiers,
1256 ArrayRef<SourceLocation> MapTypeModifiersLoc,
1257 CXXScopeSpec &MapperIdScopeSpec, DeclarationNameInfo &MapperId,
1258 OpenMPMapClauseKind MapType, bool IsMapTypeImplicit,
1259 SourceLocation MapLoc, SourceLocation ColonLoc, ArrayRef<Expr *> VarList,
1260 const OMPVarListLocTy &Locs, bool NoDiagnose = false,
1261 ArrayRef<Expr *> UnresolvedMappers = std::nullopt);
1262 /// Called on well-formed 'num_teams' clause.
1264 SourceLocation StartLoc,
1265 SourceLocation LParenLoc,
1266 SourceLocation EndLoc);
1267 /// Called on well-formed 'thread_limit' clause.
1269 SourceLocation StartLoc,
1270 SourceLocation LParenLoc,
1271 SourceLocation EndLoc);
1272 /// Called on well-formed 'priority' clause.
1274 SourceLocation LParenLoc,
1275 SourceLocation EndLoc);
1276 /// Called on well-formed 'dist_schedule' clause.
1279 SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation KindLoc,
1280 SourceLocation CommaLoc, SourceLocation EndLoc);
1281 /// Called on well-formed 'defaultmap' clause.
1284 SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation MLoc,
1285 SourceLocation KindLoc, SourceLocation EndLoc);
1286 /// Called on well-formed 'to' clause.
1287 OMPClause *
1289 ArrayRef<SourceLocation> MotionModifiersLoc,
1290 CXXScopeSpec &MapperIdScopeSpec,
1291 DeclarationNameInfo &MapperId, SourceLocation ColonLoc,
1292 ArrayRef<Expr *> VarList, const OMPVarListLocTy &Locs,
1293 ArrayRef<Expr *> UnresolvedMappers = std::nullopt);
1294 /// Called on well-formed 'from' clause.
1295 OMPClause *
1297 ArrayRef<SourceLocation> MotionModifiersLoc,
1298 CXXScopeSpec &MapperIdScopeSpec,
1299 DeclarationNameInfo &MapperId, SourceLocation ColonLoc,
1300 ArrayRef<Expr *> VarList, const OMPVarListLocTy &Locs,
1301 ArrayRef<Expr *> UnresolvedMappers = std::nullopt);
1302 /// Called on well-formed 'use_device_ptr' clause.
1304 const OMPVarListLocTy &Locs);
1305 /// Called on well-formed 'use_device_addr' clause.
1307 const OMPVarListLocTy &Locs);
1308 /// Called on well-formed 'is_device_ptr' clause.
1310 const OMPVarListLocTy &Locs);
1311 /// Called on well-formed 'has_device_addr' clause.
1313 const OMPVarListLocTy &Locs);
1314 /// Called on well-formed 'nontemporal' clause.
1316 SourceLocation StartLoc,
1317 SourceLocation LParenLoc,
1318 SourceLocation EndLoc);
1319
1320 /// Data for list of allocators.
1322 /// Allocator.
1323 Expr *Allocator = nullptr;
1324 /// Allocator traits.
1326 /// Locations of '(' and ')' symbols.
1328 };
1329 /// Called on well-formed 'uses_allocators' clause.
1331 SourceLocation LParenLoc,
1332 SourceLocation EndLoc,
1334 /// Called on well-formed 'affinity' clause.
1336 SourceLocation LParenLoc,
1337 SourceLocation ColonLoc,
1338 SourceLocation EndLoc, Expr *Modifier,
1339 ArrayRef<Expr *> Locators);
1340 /// Called on a well-formed 'bind' clause.
1342 SourceLocation KindLoc,
1343 SourceLocation StartLoc,
1344 SourceLocation LParenLoc,
1345 SourceLocation EndLoc);
1346
1347 /// Called on a well-formed 'ompx_dyn_cgroup_mem' clause.
1349 SourceLocation LParenLoc,
1350 SourceLocation EndLoc);
1351
1352 /// Called on well-formed 'doacross' clause.
1353 OMPClause *
1355 SourceLocation DepLoc, SourceLocation ColonLoc,
1356 ArrayRef<Expr *> VarList, SourceLocation StartLoc,
1357 SourceLocation LParenLoc, SourceLocation EndLoc);
1358
1359 /// Called on a well-formed 'ompx_attribute' clause.
1361 SourceLocation StartLoc,
1362 SourceLocation LParenLoc,
1363 SourceLocation EndLoc);
1364
1365 /// Called on a well-formed 'ompx_bare' clause.
1367 SourceLocation EndLoc);
1368
1370 Expr *LowerBound,
1371 SourceLocation ColonLocFirst,
1372 SourceLocation ColonLocSecond,
1373 Expr *Length, Expr *Stride,
1374 SourceLocation RBLoc);
1376 SourceLocation RParenLoc,
1377 ArrayRef<Expr *> Dims,
1378 ArrayRef<SourceRange> Brackets);
1379
1380 /// Data structure for iterator expression.
1389 };
1390
1392 SourceLocation LLoc, SourceLocation RLoc,
1394
1395 void handleOMPAssumeAttr(Decl *D, const ParsedAttr &AL);
1396
1397private:
1398 void *VarDataSharingAttributesStack;
1399
1400 /// Number of nested '#pragma omp declare target' directives.
1401 SmallVector<DeclareTargetContextInfo, 4> DeclareTargetNesting;
1402
1403 /// Initialization of data-sharing attributes stack.
1404 void InitDataSharingAttributesStack();
1405 void DestroyDataSharingAttributesStack();
1406
1407 /// Returns OpenMP nesting level for current directive.
1408 unsigned getOpenMPNestingLevel() const;
1409
1410 /// Adjusts the function scopes index for the target-based regions.
1411 void adjustOpenMPTargetScopeIndex(unsigned &FunctionScopesIndex,
1412 unsigned Level) const;
1413
1414 /// Returns the number of scopes associated with the construct on the given
1415 /// OpenMP level.
1416 int getNumberOfConstructScopes(unsigned Level) const;
1417
1418 /// Push new OpenMP function region for non-capturing function.
1419 void pushOpenMPFunctionRegion();
1420
1421 /// Pop OpenMP function region for non-capturing function.
1422 void popOpenMPFunctionRegion(const sema::FunctionScopeInfo *OldFSI);
1423
1424 /// Analyzes and checks a loop nest for use by a loop transformation.
1425 ///
1426 /// \param Kind The loop transformation directive kind.
1427 /// \param NumLoops How many nested loops the directive is expecting.
1428 /// \param AStmt Associated statement of the transformation directive.
1429 /// \param LoopHelpers [out] The loop analysis result.
1430 /// \param Body [out] The body code nested in \p NumLoops loop.
1431 /// \param OriginalInits [out] Collection of statements and declarations that
1432 /// must have been executed/declared before entering the
1433 /// loop.
1434 ///
1435 /// \return Whether there was any error.
1436 bool checkTransformableLoopNest(
1437 OpenMPDirectiveKind Kind, Stmt *AStmt, int NumLoops,
1439 Stmt *&Body, SmallVectorImpl<SmallVector<Stmt *, 0>> &OriginalInits);
1440
1441 /// Helper to keep information about the current `omp begin/end declare
1442 /// variant` nesting.
1443 struct OMPDeclareVariantScope {
1444 /// The associated OpenMP context selector.
1445 OMPTraitInfo *TI;
1446
1447 /// The associated OpenMP context selector mangling.
1448 std::string NameSuffix;
1449
1450 OMPDeclareVariantScope(OMPTraitInfo &TI);
1451 };
1452
1453 /// Return the OMPTraitInfo for the surrounding scope, if any.
1454 OMPTraitInfo *getOMPTraitInfoForSurroundingScope() {
1455 return OMPDeclareVariantScopes.empty() ? nullptr
1456 : OMPDeclareVariantScopes.back().TI;
1457 }
1458
1459 /// The current `omp begin/end declare variant` scopes.
1460 SmallVector<OMPDeclareVariantScope, 4> OMPDeclareVariantScopes;
1461
1462 /// The current `omp begin/end assumes` scopes.
1463 SmallVector<OMPAssumeAttr *, 4> OMPAssumeScoped;
1464
1465 /// All `omp assumes` we encountered so far.
1466 SmallVector<OMPAssumeAttr *, 4> OMPAssumeGlobal;
1467};
1468
1469} // namespace clang
1470
1471#endif // LLVM_CLANG_SEMA_SEMAOPENMP_H
#define V(N, I)
Definition: ASTContext.h:3341
Forward declaration of all AST node types.
const Decl * D
enum clang::sema::@1655::IndirectLocalPathEntry::EntryKind Kind
Expr * E
int Priority
Definition: Format.cpp:3005
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:1144
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:1436
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:3030
Represents a function declaration or definition.
Definition: Decl.h:1932
One of these records is kept for each identifier that is lexed.
This represents a decl that may have a name.
Definition: Decl.h:249
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:941
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...
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.
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=std::nullopt)
Called on well-formed 'reduction' 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)
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 * ActOnOpenMPAllocateClause(Expr *Allocator, ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation ColonLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'allocate' 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 * ActOnOpenMPNontemporalClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'nontemporal' 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)
OMPClause * ActOnOpenMPFromClause(ArrayRef< OpenMPMotionModifierKind > MotionModifiers, ArrayRef< SourceLocation > MotionModifiersLoc, CXXScopeSpec &MapperIdScopeSpec, DeclarationNameInfo &MapperId, SourceLocation ColonLoc, ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs, ArrayRef< Expr * > UnresolvedMappers=std::nullopt)
Called on well-formed 'from' clause.
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)
OMPClause * ActOnOpenMPToClause(ArrayRef< OpenMPMotionModifierKind > MotionModifiers, ArrayRef< SourceLocation > MotionModifiersLoc, CXXScopeSpec &MapperIdScopeSpec, DeclarationNameInfo &MapperId, SourceLocation ColonLoc, ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs, ArrayRef< Expr * > UnresolvedMappers=std::nullopt)
Called on well-formed 'to' clause.
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.
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 * 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.
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.
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=std::nullopt)
Called on well-formed 'map' clause.
OMPClause * ActOnOpenMPTaskReductionClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef< Expr * > UnresolvedReductions=std::nullopt)
Called on well-formed 'task_reduction' 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 * 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.
OMPClause * ActOnOpenMPInReductionClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef< Expr * > UnresolvedReductions=std::nullopt)
Called on well-formed 'in_reduction' clause.
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:493
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:1829
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
Definition: Decl.h:667
Represents a variable declaration or definition.
Definition: Decl.h:879
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:24
OpenMPDefaultmapClauseModifier
OpenMP modifiers for 'defaultmap' clause.
Definition: OpenMPKinds.h:118
OpenMPOrderClauseModifier
OpenMP modifiers for 'order' clause.
Definition: OpenMPKinds.h:171
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:135
OpenMPReductionClauseModifier
OpenMP modifiers for 'reduction' clause.
Definition: OpenMPKinds.h:186
OpenMPScheduleClauseModifier
OpenMP modifiers for 'schedule' clause.
Definition: OpenMPKinds.h:38
llvm::omp::Clause OpenMPClauseKind
OpenMP clauses.
Definition: OpenMPKinds.h:27
OpenMPDistScheduleClauseKind
OpenMP attributes for 'dist_schedule' clause.
Definition: OpenMPKinds.h:103
OpenMPDoacrossClauseModifier
OpenMP dependence types for 'doacross' clause.
Definition: OpenMPKinds.h:219
OpenMPBindClauseKind
OpenMP bindings for the 'bind' clause.
Definition: OpenMPKinds.h:200
OpenMPLastprivateModifier
OpenMP 'lastprivate' clause modifier.
Definition: OpenMPKinds.h:157
OpenMPDependClauseKind
OpenMP attributes for 'depend' clause.
Definition: OpenMPKinds.h:54
OpenMPGrainsizeClauseModifier
Definition: OpenMPKinds.h:206
OpenMPNumTasksClauseModifier
Definition: OpenMPKinds.h:212
OpenMPSeverityClauseKind
OpenMP attributes for 'severity' clause.
Definition: OpenMPKinds.h:142
OpenMPDefaultmapClauseKind
OpenMP attributes for 'defaultmap' clause.
Definition: OpenMPKinds.h:110
OpenMPLinearClauseKind
OpenMP attributes for 'linear' clause.
Definition: OpenMPKinds.h:62
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:127
OpenMPDeviceClauseModifier
OpenMP modifiers for 'device' clause.
Definition: OpenMPKinds.h:47
OpenMPOrderClauseKind
OpenMP attributes for 'order' clause.
Definition: OpenMPKinds.h:164
OpenMPScheduleClauseKind
OpenMP attributes for 'schedule' clause.
Definition: OpenMPKinds.h:30
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:70
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:1381
OMPIteratorExpr::IteratorRange Range
Definition: SemaOpenMP.h:1385
Data used for processing a list of variables in OpenMP clauses.
Definition: SemaOpenMP.h:1125
SmallVector< SourceLocation, NumberOfOMPMotionModifiers > MotionModifiersLoc
Definition: SemaOpenMP.h:1140
SmallVector< OpenMPMotionModifierKind, NumberOfOMPMotionModifiers > MotionModifiers
Definition: SemaOpenMP.h:1139
SmallVector< OpenMPMapModifierKind, NumberOfOMPMapClauseModifiers > MapTypeModifiers
Definition: SemaOpenMP.h:1135
SmallVector< SourceLocation, NumberOfOMPMapClauseModifiers > MapTypeModifiersLoc
Definition: SemaOpenMP.h:1137
DeclarationNameInfo ReductionOrMapperId
Definition: SemaOpenMP.h:1131
int ExtraModifier
Additional modifier for linear, map, depend or lastprivate clause.
Definition: SemaOpenMP.h:1132
Data for list of allocators.
Definition: SemaOpenMP.h:1321
Expr * AllocatorTraits
Allocator traits.
Definition: SemaOpenMP.h:1325
SourceLocation LParenLoc
Locations of '(' and ')' symbols.
Definition: SemaOpenMP.h:1327