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/Attr.h"
18#include "clang/AST/Decl.h"
19#include "clang/AST/DeclBase.h"
22#include "clang/AST/Expr.h"
25#include "clang/AST/Stmt.h"
27#include "clang/AST/Type.h"
29#include "clang/Basic/LLVM.h"
33#include "clang/Sema/DeclSpec.h"
35#include "clang/Sema/Scope.h"
37#include "clang/Sema/SemaBase.h"
38#include "llvm/ADT/DenseMap.h"
39#include "llvm/ADT/PointerUnion.h"
40#include <optional>
41#include <string>
42#include <utility>
43
44namespace clang {
45class ParsedAttr;
46
47class SemaOpenMP : public SemaBase {
48public:
49 SemaOpenMP(Sema &S);
50
51 friend class Parser;
52 friend class Sema;
53
55 using CapturedParamNameType = std::pair<StringRef, QualType>;
56
57 /// Creates a SemaDiagnosticBuilder that emits the diagnostic if the current
58 /// context is "used as device code".
59 ///
60 /// - If CurContext is a `declare target` function or it is known that the
61 /// function is emitted for the device, emits the diagnostics immediately.
62 /// - If CurContext is a non-`declare target` function and we are compiling
63 /// for the device, creates a diagnostic which is emitted if and when we
64 /// realize that the function will be codegen'ed.
65 ///
66 /// Example usage:
67 ///
68 /// // Variable-length arrays are not allowed in NVPTX device code.
69 /// if (diagIfOpenMPDeviceCode(Loc, diag::err_vla_unsupported))
70 /// return ExprError();
71 /// // Otherwise, continue parsing as normal.
73 unsigned DiagID,
74 const FunctionDecl *FD);
75
76 /// Creates a SemaDiagnosticBuilder that emits the diagnostic if the current
77 /// context is "used as host code".
78 ///
79 /// - If CurContext is a `declare target` function or it is known that the
80 /// function is emitted for the host, emits the diagnostics immediately.
81 /// - If CurContext is a non-host function, just ignore it.
82 ///
83 /// Example usage:
84 ///
85 /// // Variable-length arrays are not allowed in NVPTX device code.
86 /// if (diagIfOpenMPHostode(Loc, diag::err_vla_unsupported))
87 /// return ExprError();
88 /// // Otherwise, continue parsing as normal.
90 unsigned DiagID,
91 const FunctionDecl *FD);
92
93 /// The declarator \p D defines a function in the scope \p S which is nested
94 /// in an `omp begin/end declare variant` scope. In this method we create a
95 /// declaration for \p D and rename \p D according to the OpenMP context
96 /// selector of the surrounding scope. Return all base functions in \p Bases.
98 Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParameterLists,
100
101 /// Register \p D as specialization of all base functions in \p Bases in the
102 /// current `omp begin/end declare variant` scope.
105
106 /// Act on \p D, a function definition inside of an `omp [begin/end] assumes`.
108
109 /// Can we exit an OpenMP declare variant scope at the moment.
111 return !OMPDeclareVariantScopes.empty();
112 }
113
116 bool StrictlyPositive = true,
117 bool SuppressExprDiags = false);
118
119 /// Given the potential call expression \p Call, determine if there is a
120 /// specialization via the OpenMP declare variant mechanism available. If
121 /// there is, return the specialized call expression, otherwise return the
122 /// original \p Call.
124 SourceLocation LParenLoc, MultiExprArg ArgExprs,
125 SourceLocation RParenLoc, Expr *ExecConfig);
126
127 /// Handle a `omp begin declare variant`.
129
130 /// Handle a `omp end declare variant`.
132
133 /// Function tries to capture lambda's captured variables in the OpenMP region
134 /// before the original lambda is captured.
136
137 /// Return true if the provided declaration \a VD should be captured by
138 /// reference.
139 /// \param Level Relative level of nested OpenMP construct for that the check
140 /// is performed.
141 /// \param OpenMPCaptureLevel Capture level within an OpenMP construct.
142 bool isOpenMPCapturedByRef(const ValueDecl *D, unsigned Level,
143 unsigned OpenMPCaptureLevel) const;
144
145 /// Check if the specified variable is used in one of the private
146 /// clauses (private, firstprivate, lastprivate, reduction etc.) in OpenMP
147 /// constructs.
148 VarDecl *isOpenMPCapturedDecl(ValueDecl *D, bool CheckScopeInfo = false,
149 unsigned StopAt = 0);
150
151 /// The member expression(this->fd) needs to be rebuilt in the template
152 /// instantiation to generate private copy for OpenMP when default
153 /// clause is used. The function will return true if default
154 /// cluse is used.
156
159
160 /// If the current region is a loop-based region, mark the start of the loop
161 /// construct.
162 void startOpenMPLoop();
163
164 /// If the current region is a range loop-based region, mark the start of the
165 /// loop construct.
167
168 /// Check if the specified variable is used in 'private' clause.
169 /// \param Level Relative level of nested OpenMP construct for that the check
170 /// is performed.
172 unsigned CapLevel) const;
173
174 /// Sets OpenMP capture kind (OMPC_private, OMPC_firstprivate, OMPC_map etc.)
175 /// for \p FD based on DSA for the provided corresponding captured declaration
176 /// \p D.
177 void setOpenMPCaptureKind(FieldDecl *FD, const ValueDecl *D, unsigned Level);
178
179 /// Check if the specified variable is captured by 'target' directive.
180 /// \param Level Relative level of nested OpenMP construct for that the check
181 /// is performed.
182 bool isOpenMPTargetCapturedDecl(const ValueDecl *D, unsigned Level,
183 unsigned CaptureLevel) const;
184
185 /// Check if the specified global variable must be captured by outer capture
186 /// regions.
187 /// \param Level Relative level of nested OpenMP construct for that
188 /// the check is performed.
189 bool isOpenMPGlobalCapturedDecl(ValueDecl *D, unsigned Level,
190 unsigned CaptureLevel) const;
191
193 Expr *Op);
194 /// Called on start of new data sharing attribute block.
196 const DeclarationNameInfo &DirName, Scope *CurScope,
198 /// Start analysis of clauses.
200 /// End analysis of clauses.
201 void EndOpenMPClause();
202 /// Called on end of data sharing attribute block.
203 void EndOpenMPDSABlock(Stmt *CurDirective);
204
205 /// Check if the current region is an OpenMP loop region and if it is,
206 /// mark loop control variable, used in \p Init for loop initialization, as
207 /// private by default.
208 /// \param Init First part of the for loop.
210
211 /// Called on well-formed '\#pragma omp metadirective' after parsing
212 /// of the associated statement.
214 Stmt *AStmt, SourceLocation StartLoc,
215 SourceLocation EndLoc);
216
217 // OpenMP directives and clauses.
218 /// Called on correct id-expression from the '#pragma omp
219 /// threadprivate'.
221 const DeclarationNameInfo &Id,
223 /// Called on well-formed '#pragma omp threadprivate'.
225 ArrayRef<Expr *> VarList);
226 /// Builds a new OpenMPThreadPrivateDecl and checks its correctness.
228 ArrayRef<Expr *> VarList);
229 /// Called on well-formed '#pragma omp allocate'.
231 ArrayRef<Expr *> VarList,
232 ArrayRef<OMPClause *> Clauses,
233 DeclContext *Owner = nullptr);
234
235 /// Called on well-formed '#pragma omp [begin] assume[s]'.
238 ArrayRef<std::string> Assumptions,
239 bool SkippedClauses);
240
241 /// Check if there is an active global `omp begin assumes` directive.
242 bool isInOpenMPAssumeScope() const { return !OMPAssumeScoped.empty(); }
243
244 /// Check if there is an active global `omp assumes` directive.
245 bool hasGlobalOpenMPAssumes() const { return !OMPAssumeGlobal.empty(); }
246
247 /// Called on well-formed '#pragma omp end assumes'.
249
250 /// Called on well-formed '#pragma omp requires'.
252 ArrayRef<OMPClause *> ClauseList);
253 /// Check restrictions on Requires directive
255 ArrayRef<OMPClause *> Clauses);
256 /// Check if the specified type is allowed to be used in 'omp declare
257 /// reduction' construct.
260 /// Called on start of '#pragma omp declare reduction'.
262 Scope *S, DeclContext *DC, DeclarationName Name,
263 ArrayRef<std::pair<QualType, SourceLocation>> ReductionTypes,
264 AccessSpecifier AS, Decl *PrevDeclInScope = nullptr);
265 /// Initialize declare reduction construct initializer.
267 /// Finish current declare reduction construct initializer.
269 /// Initialize declare reduction construct initializer.
270 /// \return omp_priv variable.
272 /// Finish current declare reduction construct initializer.
274 VarDecl *OmpPrivParm);
275 /// Called at the end of '#pragma omp declare reduction'.
277 Scope *S, DeclGroupPtrTy DeclReductions, bool IsValid);
278
279 /// Check variable declaration in 'omp declare mapper' construct.
281 /// Check if the specified type is allowed to be used in 'omp declare
282 /// mapper' construct.
285 /// Called on start of '#pragma omp declare mapper'.
287 Scope *S, DeclContext *DC, DeclarationName Name, QualType MapperType,
289 Expr *MapperVarRef, ArrayRef<OMPClause *> Clauses,
290 Decl *PrevDeclInScope = nullptr);
291 /// Build the mapper variable of '#pragma omp declare mapper'.
293 QualType MapperType,
294 SourceLocation StartLoc,
295 DeclarationName VN);
297 bool isOpenMPDeclareMapperVarDeclAllowed(const VarDecl *VD) const;
299
301 struct MapInfo {
302 OMPDeclareTargetDeclAttr::MapTypeTy MT;
304 };
305 /// Explicitly listed variables and functions in a 'to' or 'link' clause.
306 llvm::DenseMap<NamedDecl *, MapInfo> ExplicitlyMapped;
307
308 /// The 'device_type' as parsed from the clause.
309 OMPDeclareTargetDeclAttr::DevTypeTy DT = OMPDeclareTargetDeclAttr::DT_Any;
310
311 /// The directive kind, `begin declare target` or `declare target`.
313
314 /// The directive with indirect clause.
315 std::optional<Expr *> Indirect;
316
317 /// The directive location.
319
321 : Kind(Kind), Loc(Loc) {}
322 };
323
324 /// Called on the start of target region i.e. '#pragma omp declare target'.
325 bool ActOnStartOpenMPDeclareTargetContext(DeclareTargetContextInfo &DTCI);
326
327 /// Called at the end of target region i.e. '#pragma omp end declare target'.
328 const DeclareTargetContextInfo ActOnOpenMPEndDeclareTargetDirective();
329
330 /// Called once a target context is completed, that can be when a
331 /// '#pragma omp end declare target' was encountered or when a
332 /// '#pragma omp declare target' without declaration-definition-seq was
333 /// encountered.
334 void ActOnFinishedOpenMPDeclareTargetContext(DeclareTargetContextInfo &DTCI);
335
336 /// Report unterminated 'omp declare target' or 'omp begin declare target' at
337 /// the end of a compilation unit.
339
340 /// Searches for the provided declaration name for OpenMP declare target
341 /// directive.
343 CXXScopeSpec &ScopeSpec,
344 const DeclarationNameInfo &Id);
345
346 /// Called on correct id-expression from the '#pragma omp declare target'.
348 OMPDeclareTargetDeclAttr::MapTypeTy MT,
349 DeclareTargetContextInfo &DTCI);
350
351 /// Check declaration inside target region.
352 void
355
356 /// Adds OMPDeclareTargetDeclAttr to referenced variables in declare target
357 /// directive.
359
360 /// Finishes analysis of the deferred functions calls that may be declared as
361 /// host/nohost during device/host compilation.
363 const FunctionDecl *Callee,
365
366 /// Return true if currently in OpenMP task with untied clause context.
367 bool isInOpenMPTaskUntiedContext() const;
368
369 /// Return true inside OpenMP declare target region.
371 return !DeclareTargetNesting.empty();
372 }
373 /// Return true inside OpenMP target region.
375
376 /// Return the number of captured regions created for an OpenMP directive.
378
379 /// Initialization of captured region for OpenMP region.
380 void ActOnOpenMPRegionStart(OpenMPDirectiveKind DKind, Scope *CurScope);
381
382 /// Called for syntactical loops (ForStmt or CXXForRangeStmt) associated to
383 /// an OpenMP loop directive.
385
386 /// Process a canonical OpenMP loop nest that can either be a canonical
387 /// literal loop (ForStmt or CXXForRangeStmt), or the generated loop of an
388 /// OpenMP loop transformation construct.
390
391 /// End of OpenMP region.
392 ///
393 /// \param S Statement associated with the current OpenMP region.
394 /// \param Clauses List of clauses for the current OpenMP region.
395 ///
396 /// \returns Statement for finished OpenMP region.
400 OpenMPDirectiveKind CancelRegion, ArrayRef<OMPClause *> Clauses,
401 Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc);
402 /// Process an OpenMP informational directive.
403 ///
404 /// \param Kind The directive kind.
405 /// \param DirName Declaration name info.
406 /// \param Clauses Array of clauses for directive.
407 /// \param AStmt The associated statement.
408 /// \param StartLoc The start location.
409 /// \param EndLoc The end location.
412 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
413 SourceLocation EndLoc);
414 /// Process an OpenMP assume directive.
415 ///
416 /// \param Clauses Array of clauses for directive.
417 /// \param AStmt The associated statement.
418 /// \param StartLoc The start location.
419 /// \param EndLoc The end location.
421 Stmt *AStmt, SourceLocation StartLoc,
422 SourceLocation EndLoc);
423
424 /// Called on well-formed '\#pragma omp parallel' after parsing
425 /// of the associated statement.
427 Stmt *AStmt, SourceLocation StartLoc,
428 SourceLocation EndLoc);
430 llvm::SmallDenseMap<const ValueDecl *, const Expr *, 4>;
431 /// Called on well-formed '\#pragma omp simd' after parsing
432 /// of the associated statement.
435 SourceLocation StartLoc, SourceLocation EndLoc,
436 VarsWithInheritedDSAType &VarsWithImplicitDSA);
437 /// Called on well-formed '#pragma omp tile' after parsing of its clauses and
438 /// the associated statement.
440 Stmt *AStmt, SourceLocation StartLoc,
441 SourceLocation EndLoc);
442 /// Called on well-formed '#pragma omp unroll' after parsing of its clauses
443 /// and the associated statement.
445 Stmt *AStmt, SourceLocation StartLoc,
446 SourceLocation EndLoc);
447 /// Called on well-formed '#pragma omp reverse'.
449 SourceLocation EndLoc);
450 /// Called on well-formed '#pragma omp interchange' after parsing of its
451 /// clauses and the associated statement.
453 Stmt *AStmt,
454 SourceLocation StartLoc,
455 SourceLocation EndLoc);
456 /// Called on well-formed '\#pragma omp for' after parsing
457 /// of the associated statement.
460 SourceLocation StartLoc, SourceLocation EndLoc,
461 VarsWithInheritedDSAType &VarsWithImplicitDSA);
462 /// Called on well-formed '\#pragma omp for simd' after parsing
463 /// of the associated statement.
466 SourceLocation StartLoc, SourceLocation EndLoc,
467 VarsWithInheritedDSAType &VarsWithImplicitDSA);
468 /// Called on well-formed '\#pragma omp sections' after parsing
469 /// of the associated statement.
471 Stmt *AStmt, SourceLocation StartLoc,
472 SourceLocation EndLoc);
473 /// Called on well-formed '\#pragma omp section' after parsing of the
474 /// associated statement.
476 SourceLocation EndLoc);
477 /// Called on well-formed '\#pragma omp scope' after parsing of the
478 /// associated statement.
480 Stmt *AStmt, SourceLocation StartLoc,
481 SourceLocation EndLoc);
482 /// Called on well-formed '\#pragma omp single' after parsing of the
483 /// associated statement.
485 Stmt *AStmt, SourceLocation StartLoc,
486 SourceLocation EndLoc);
487 /// Called on well-formed '\#pragma omp master' after parsing of the
488 /// associated statement.
490 SourceLocation EndLoc);
491 /// Called on well-formed '\#pragma omp critical' after parsing of the
492 /// associated statement.
494 ArrayRef<OMPClause *> Clauses,
495 Stmt *AStmt, SourceLocation StartLoc,
496 SourceLocation EndLoc);
497 /// Called on well-formed '\#pragma omp parallel for' after parsing
498 /// of the associated statement.
500 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
501 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
502 /// Called on well-formed '\#pragma omp parallel for simd' after
503 /// parsing of the associated statement.
505 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
506 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
507 /// Called on well-formed '\#pragma omp parallel master' after
508 /// parsing of the associated statement.
510 Stmt *AStmt,
511 SourceLocation StartLoc,
512 SourceLocation EndLoc);
513 /// Called on well-formed '\#pragma omp parallel masked' after
514 /// parsing of the associated statement.
516 Stmt *AStmt,
517 SourceLocation StartLoc,
518 SourceLocation EndLoc);
519 /// Called on well-formed '\#pragma omp parallel sections' after
520 /// parsing of the associated statement.
522 Stmt *AStmt,
523 SourceLocation StartLoc,
524 SourceLocation EndLoc);
525 /// Called on well-formed '\#pragma omp task' after parsing of the
526 /// associated statement.
528 Stmt *AStmt, SourceLocation StartLoc,
529 SourceLocation EndLoc);
530 /// Called on well-formed '\#pragma omp taskyield'.
532 SourceLocation EndLoc);
533 /// Called on well-formed '\#pragma omp error'.
534 /// Error direcitive is allowed in both declared and excutable contexts.
535 /// Adding InExContext to identify which context is called from.
537 SourceLocation StartLoc,
538 SourceLocation EndLoc,
539 bool InExContext = true);
540 /// Called on well-formed '\#pragma omp barrier'.
542 SourceLocation EndLoc);
543 /// Called on well-formed '\#pragma omp taskwait'.
545 SourceLocation StartLoc,
546 SourceLocation EndLoc);
547 /// Called on well-formed '\#pragma omp taskgroup'.
549 Stmt *AStmt, SourceLocation StartLoc,
550 SourceLocation EndLoc);
551 /// Called on well-formed '\#pragma omp flush'.
553 SourceLocation StartLoc,
554 SourceLocation EndLoc);
555 /// Called on well-formed '\#pragma omp depobj'.
557 SourceLocation StartLoc,
558 SourceLocation EndLoc);
559 /// Called on well-formed '\#pragma omp scan'.
561 SourceLocation StartLoc,
562 SourceLocation EndLoc);
563 /// Called on well-formed '\#pragma omp ordered' after parsing of the
564 /// associated statement.
566 Stmt *AStmt, SourceLocation StartLoc,
567 SourceLocation EndLoc);
568 /// Called on well-formed '\#pragma omp atomic' after parsing of the
569 /// associated statement.
571 Stmt *AStmt, SourceLocation StartLoc,
572 SourceLocation EndLoc);
573 /// Called on well-formed '\#pragma omp target' after parsing of the
574 /// associated statement.
576 Stmt *AStmt, SourceLocation StartLoc,
577 SourceLocation EndLoc);
578 /// Called on well-formed '\#pragma omp target data' after parsing of
579 /// the associated statement.
581 Stmt *AStmt,
582 SourceLocation StartLoc,
583 SourceLocation EndLoc);
584 /// Called on well-formed '\#pragma omp target enter data' after
585 /// parsing of the associated statement.
587 SourceLocation StartLoc,
588 SourceLocation EndLoc,
589 Stmt *AStmt);
590 /// Called on well-formed '\#pragma omp target exit data' after
591 /// parsing of the associated statement.
593 SourceLocation StartLoc,
594 SourceLocation EndLoc,
595 Stmt *AStmt);
596 /// Called on well-formed '\#pragma omp target parallel' after
597 /// parsing of the associated statement.
599 Stmt *AStmt,
600 SourceLocation StartLoc,
601 SourceLocation EndLoc);
602 /// Called on well-formed '\#pragma omp target parallel for' after
603 /// parsing of the associated statement.
605 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
606 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
607 /// Called on well-formed '\#pragma omp teams' after parsing of the
608 /// associated statement.
610 Stmt *AStmt, SourceLocation StartLoc,
611 SourceLocation EndLoc);
612 /// Called on well-formed '\#pragma omp teams loop' after parsing of the
613 /// associated statement.
615 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
616 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
617 /// Called on well-formed '\#pragma omp target teams loop' after parsing of
618 /// the associated statement.
620 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
621 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
622 /// Called on well-formed '\#pragma omp parallel loop' after parsing of the
623 /// associated statement.
625 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
626 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
627 /// Called on well-formed '\#pragma omp target parallel loop' after parsing
628 /// of the associated statement.
630 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
631 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
632 /// Called on well-formed '\#pragma omp cancellation point'.
635 SourceLocation EndLoc,
636 OpenMPDirectiveKind CancelRegion);
637 /// Called on well-formed '\#pragma omp cancel'.
639 SourceLocation StartLoc,
640 SourceLocation EndLoc,
641 OpenMPDirectiveKind CancelRegion);
642 /// Called on well-formed '\#pragma omp taskloop' after parsing of the
643 /// associated statement.
646 SourceLocation StartLoc, SourceLocation EndLoc,
647 VarsWithInheritedDSAType &VarsWithImplicitDSA);
648 /// Called on well-formed '\#pragma omp taskloop simd' after parsing of
649 /// the associated statement.
651 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
652 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
653 /// Called on well-formed '\#pragma omp master taskloop' after parsing of the
654 /// associated statement.
656 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
657 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
658 /// Called on well-formed '\#pragma omp master taskloop simd' after parsing of
659 /// the associated statement.
661 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
662 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
663 /// Called on well-formed '\#pragma omp parallel master taskloop' after
664 /// parsing of the associated statement.
666 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
667 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
668 /// Called on well-formed '\#pragma omp parallel master taskloop simd' after
669 /// parsing of the associated statement.
671 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
672 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
673 /// Called on well-formed '\#pragma omp masked taskloop' after parsing of the
674 /// associated statement.
676 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
677 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
678 /// Called on well-formed '\#pragma omp masked taskloop simd' after parsing of
679 /// the associated statement.
681 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
682 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
683 /// Called on well-formed '\#pragma omp parallel masked taskloop' after
684 /// parsing of the associated statement.
686 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
687 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
688 /// Called on well-formed '\#pragma omp parallel masked taskloop simd' after
689 /// parsing of the associated statement.
691 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
692 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
693 /// Called on well-formed '\#pragma omp distribute' after parsing
694 /// of the associated statement.
697 SourceLocation StartLoc, SourceLocation EndLoc,
698 VarsWithInheritedDSAType &VarsWithImplicitDSA);
699 /// Called on well-formed '\#pragma omp target update'.
701 SourceLocation StartLoc,
702 SourceLocation EndLoc,
703 Stmt *AStmt);
704 /// Called on well-formed '\#pragma omp distribute parallel for' after
705 /// parsing of the associated statement.
707 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
708 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
709 /// Called on well-formed '\#pragma omp distribute parallel for simd'
710 /// after parsing of the associated statement.
712 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
713 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
714 /// Called on well-formed '\#pragma omp distribute simd' after
715 /// parsing of the associated statement.
717 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
718 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
719 /// Called on well-formed '\#pragma omp target parallel for simd' after
720 /// parsing of the associated statement.
722 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
723 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
724 /// Called on well-formed '\#pragma omp target simd' after parsing of
725 /// the associated statement.
728 SourceLocation StartLoc, SourceLocation EndLoc,
729 VarsWithInheritedDSAType &VarsWithImplicitDSA);
730 /// Called on well-formed '\#pragma omp teams distribute' after parsing of
731 /// the associated statement.
733 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
734 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
735 /// Called on well-formed '\#pragma omp teams distribute simd' after parsing
736 /// of the associated statement.
738 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
739 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
740 /// Called on well-formed '\#pragma omp teams distribute parallel for simd'
741 /// after parsing of the associated statement.
743 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
744 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
745 /// Called on well-formed '\#pragma omp teams distribute parallel for'
746 /// after parsing of the associated statement.
748 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
749 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
750 /// Called on well-formed '\#pragma omp target teams' after parsing of the
751 /// associated statement.
753 Stmt *AStmt,
754 SourceLocation StartLoc,
755 SourceLocation EndLoc);
756 /// Called on well-formed '\#pragma omp target teams distribute' after parsing
757 /// of the associated statement.
759 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
760 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
761 /// Called on well-formed '\#pragma omp target teams distribute parallel for'
762 /// after parsing of the associated statement.
764 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
765 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
766 /// Called on well-formed '\#pragma omp target teams distribute parallel for
767 /// simd' after parsing of the associated statement.
769 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
770 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
771 /// Called on well-formed '\#pragma omp target teams distribute simd' after
772 /// parsing of the associated statement.
774 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
775 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
776 /// Called on well-formed '\#pragma omp interop'.
778 SourceLocation StartLoc,
779 SourceLocation EndLoc);
780 /// Called on well-formed '\#pragma omp dispatch' after parsing of the
781 // /associated statement.
783 Stmt *AStmt, SourceLocation StartLoc,
784 SourceLocation EndLoc);
785 /// Called on well-formed '\#pragma omp masked' after parsing of the
786 // /associated statement.
788 Stmt *AStmt, SourceLocation StartLoc,
789 SourceLocation EndLoc);
790
791 /// Called on well-formed '\#pragma omp loop' after parsing of the
792 /// associated statement.
794 ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
795 SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
796
797 /// Checks correctness of linear modifiers.
799 SourceLocation LinLoc);
800 /// Checks that the specified declaration matches requirements for the linear
801 /// decls.
804 bool IsDeclareSimd = false);
805
806 /// Called on well-formed '\#pragma omp declare simd' after parsing of
807 /// the associated method/function.
809 DeclGroupPtrTy DG, OMPDeclareSimdDeclAttr::BranchStateTy BS,
810 Expr *Simdlen, ArrayRef<Expr *> Uniforms, ArrayRef<Expr *> Aligneds,
811 ArrayRef<Expr *> Alignments, ArrayRef<Expr *> Linears,
812 ArrayRef<unsigned> LinModifiers, ArrayRef<Expr *> Steps, SourceRange SR);
813
814 /// Checks '\#pragma omp declare variant' variant function and original
815 /// functions after parsing of the associated method/function.
816 /// \param DG Function declaration to which declare variant directive is
817 /// applied to.
818 /// \param VariantRef Expression that references the variant function, which
819 /// must be used instead of the original one, specified in \p DG.
820 /// \param TI The trait info object representing the match clause.
821 /// \param NumAppendArgs The number of omp_interop_t arguments to account for
822 /// in checking.
823 /// \returns std::nullopt, if the function/variant function are not compatible
824 /// with the pragma, pair of original function/variant ref expression
825 /// otherwise.
826 std::optional<std::pair<FunctionDecl *, Expr *>>
828 OMPTraitInfo &TI, unsigned NumAppendArgs,
829 SourceRange SR);
830
831 /// Called on well-formed '\#pragma omp declare variant' after parsing of
832 /// the associated method/function.
833 /// \param FD Function declaration to which declare variant directive is
834 /// applied to.
835 /// \param VariantRef Expression that references the variant function, which
836 /// must be used instead of the original one, specified in \p DG.
837 /// \param TI The context traits associated with the function variant.
838 /// \param AdjustArgsNothing The list of 'nothing' arguments.
839 /// \param AdjustArgsNeedDevicePtr The list of 'need_device_ptr' arguments.
840 /// \param AppendArgs The list of 'append_args' arguments.
841 /// \param AdjustArgsLoc The Location of an 'adjust_args' clause.
842 /// \param AppendArgsLoc The Location of an 'append_args' clause.
843 /// \param SR The SourceRange of the 'declare variant' directive.
845 FunctionDecl *FD, Expr *VariantRef, OMPTraitInfo &TI,
846 ArrayRef<Expr *> AdjustArgsNothing,
847 ArrayRef<Expr *> AdjustArgsNeedDevicePtr,
848 ArrayRef<OMPInteropInfo> AppendArgs, SourceLocation AdjustArgsLoc,
849 SourceLocation AppendArgsLoc, SourceRange SR);
850
852 SourceLocation StartLoc,
853 SourceLocation LParenLoc,
854 SourceLocation EndLoc);
855 /// Called on well-formed 'allocator' clause.
857 SourceLocation StartLoc,
858 SourceLocation LParenLoc,
859 SourceLocation EndLoc);
860 /// Called on well-formed 'if' clause.
862 Expr *Condition, SourceLocation StartLoc,
863 SourceLocation LParenLoc,
864 SourceLocation NameModifierLoc,
865 SourceLocation ColonLoc,
866 SourceLocation EndLoc);
867 /// Called on well-formed 'final' clause.
869 SourceLocation LParenLoc,
870 SourceLocation EndLoc);
871 /// Called on well-formed 'num_threads' clause.
873 SourceLocation StartLoc,
874 SourceLocation LParenLoc,
875 SourceLocation EndLoc);
876 /// Called on well-formed 'align' clause.
878 SourceLocation LParenLoc,
879 SourceLocation EndLoc);
880 /// Called on well-formed 'safelen' clause.
882 SourceLocation LParenLoc,
883 SourceLocation EndLoc);
884 /// Called on well-formed 'simdlen' clause.
886 SourceLocation LParenLoc,
887 SourceLocation EndLoc);
888 /// Called on well-form 'sizes' clause.
890 SourceLocation StartLoc,
891 SourceLocation LParenLoc,
892 SourceLocation EndLoc);
893 /// Called on well-form 'full' clauses.
895 SourceLocation EndLoc);
896 /// Called on well-form 'partial' clauses.
898 SourceLocation LParenLoc,
899 SourceLocation EndLoc);
900 /// Called on well-formed 'collapse' clause.
902 SourceLocation StartLoc,
903 SourceLocation LParenLoc,
904 SourceLocation EndLoc);
905 /// Called on well-formed 'ordered' clause.
906 OMPClause *
908 SourceLocation LParenLoc = SourceLocation(),
909 Expr *NumForLoops = nullptr);
910 /// Called on well-formed 'grainsize' clause.
912 Expr *Size, SourceLocation StartLoc,
913 SourceLocation LParenLoc,
914 SourceLocation ModifierLoc,
915 SourceLocation EndLoc);
916 /// Called on well-formed 'num_tasks' clause.
918 Expr *NumTasks, SourceLocation StartLoc,
919 SourceLocation LParenLoc,
920 SourceLocation ModifierLoc,
921 SourceLocation EndLoc);
922 /// Called on well-formed 'hint' clause.
924 SourceLocation LParenLoc,
925 SourceLocation EndLoc);
926 /// Called on well-formed 'detach' clause.
928 SourceLocation LParenLoc,
929 SourceLocation EndLoc);
930
932 SourceLocation ArgumentLoc,
933 SourceLocation StartLoc,
934 SourceLocation LParenLoc,
935 SourceLocation EndLoc);
936 /// Called on well-formed 'when' clause.
938 SourceLocation LParenLoc,
939 SourceLocation EndLoc);
940 /// Called on well-formed 'default' clause.
941 OMPClause *ActOnOpenMPDefaultClause(llvm::omp::DefaultKind Kind,
942 SourceLocation KindLoc,
943 SourceLocation StartLoc,
944 SourceLocation LParenLoc,
945 SourceLocation EndLoc);
946 /// Called on well-formed 'proc_bind' clause.
947 OMPClause *ActOnOpenMPProcBindClause(llvm::omp::ProcBindKind Kind,
948 SourceLocation KindLoc,
949 SourceLocation StartLoc,
950 SourceLocation LParenLoc,
951 SourceLocation EndLoc);
952 /// Called on well-formed 'order' clause.
955 SourceLocation StartLoc,
956 SourceLocation LParenLoc,
957 SourceLocation MLoc, SourceLocation KindLoc,
958 SourceLocation EndLoc);
959 /// Called on well-formed 'update' clause.
961 SourceLocation KindLoc,
962 SourceLocation StartLoc,
963 SourceLocation LParenLoc,
964 SourceLocation EndLoc);
965 /// Called on well-formed 'holds' clause.
967 SourceLocation LParenLoc,
968 SourceLocation EndLoc);
969 /// Called on well-formed 'absent' or 'contains' clauses.
975 SourceLocation RLoc);
976
979 SourceLocation StartLoc, SourceLocation LParenLoc,
980 ArrayRef<SourceLocation> ArgumentsLoc, SourceLocation DelimLoc,
981 SourceLocation EndLoc);
982 /// Called on well-formed 'schedule' clause.
985 OpenMPScheduleClauseKind Kind, Expr *ChunkSize, SourceLocation StartLoc,
986 SourceLocation LParenLoc, SourceLocation M1Loc, SourceLocation M2Loc,
987 SourceLocation KindLoc, SourceLocation CommaLoc, SourceLocation EndLoc);
988
990 SourceLocation EndLoc);
991 /// Called on well-formed 'nowait' clause.
993 SourceLocation EndLoc);
994 /// Called on well-formed 'untied' clause.
996 SourceLocation EndLoc);
997 /// Called on well-formed 'mergeable' clause.
999 SourceLocation EndLoc);
1000 /// Called on well-formed 'read' clause.
1002 SourceLocation EndLoc);
1003 /// Called on well-formed 'write' clause.
1005 SourceLocation EndLoc);
1006 /// Called on well-formed 'update' clause.
1008 SourceLocation EndLoc);
1009 /// Called on well-formed 'capture' clause.
1011 SourceLocation EndLoc);
1012 /// Called on well-formed 'compare' clause.
1014 SourceLocation EndLoc);
1015 /// Called on well-formed 'fail' clause.
1017 SourceLocation EndLoc);
1019 SourceLocation KindLoc,
1020 SourceLocation StartLoc,
1021 SourceLocation LParenLoc,
1022 SourceLocation EndLoc);
1023
1024 /// Called on well-formed 'seq_cst' clause.
1026 SourceLocation EndLoc);
1027 /// Called on well-formed 'acq_rel' clause.
1029 SourceLocation EndLoc);
1030 /// Called on well-formed 'acquire' clause.
1032 SourceLocation EndLoc);
1033 /// Called on well-formed 'release' clause.
1035 SourceLocation EndLoc);
1036 /// Called on well-formed 'relaxed' clause.
1038 SourceLocation EndLoc);
1039 /// Called on well-formed 'weak' clause.
1041 SourceLocation EndLoc);
1042
1043 /// Called on well-formed 'init' clause.
1044 OMPClause *
1045 ActOnOpenMPInitClause(Expr *InteropVar, OMPInteropInfo &InteropInfo,
1046 SourceLocation StartLoc, SourceLocation LParenLoc,
1047 SourceLocation VarLoc, SourceLocation EndLoc);
1048
1049 /// Called on well-formed 'use' clause.
1050 OMPClause *ActOnOpenMPUseClause(Expr *InteropVar, SourceLocation StartLoc,
1051 SourceLocation LParenLoc,
1052 SourceLocation VarLoc, SourceLocation EndLoc);
1053
1054 /// Called on well-formed 'destroy' clause.
1056 SourceLocation LParenLoc,
1057 SourceLocation VarLoc,
1058 SourceLocation EndLoc);
1059 /// Called on well-formed 'novariants' clause.
1061 SourceLocation StartLoc,
1062 SourceLocation LParenLoc,
1063 SourceLocation EndLoc);
1064 /// Called on well-formed 'nocontext' clause.
1066 SourceLocation StartLoc,
1067 SourceLocation LParenLoc,
1068 SourceLocation EndLoc);
1069 /// Called on well-formed 'filter' clause.
1071 SourceLocation LParenLoc,
1072 SourceLocation EndLoc);
1073 /// Called on well-formed 'threads' clause.
1075 SourceLocation EndLoc);
1076 /// Called on well-formed 'simd' clause.
1078 SourceLocation EndLoc);
1079 /// Called on well-formed 'nogroup' clause.
1081 SourceLocation EndLoc);
1082 /// Called on well-formed 'unified_address' clause.
1084 SourceLocation EndLoc);
1085
1086 /// Called on well-formed 'unified_address' clause.
1088 SourceLocation EndLoc);
1089
1090 /// Called on well-formed 'reverse_offload' clause.
1092 SourceLocation EndLoc);
1093
1094 /// Called on well-formed 'dynamic_allocators' clause.
1096 SourceLocation EndLoc);
1097
1098 /// Called on well-formed 'atomic_default_mem_order' clause.
1101 SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc);
1102
1103 /// Called on well-formed 'at' clause.
1105 SourceLocation KindLoc,
1106 SourceLocation StartLoc,
1107 SourceLocation LParenLoc,
1108 SourceLocation EndLoc);
1109
1110 /// Called on well-formed 'severity' clause.
1112 SourceLocation KindLoc,
1113 SourceLocation StartLoc,
1114 SourceLocation LParenLoc,
1115 SourceLocation EndLoc);
1116
1117 /// Called on well-formed 'message' clause.
1118 /// passing string for message.
1120 SourceLocation LParenLoc,
1121 SourceLocation EndLoc);
1122
1123 /// Data used for processing a list of variables in OpenMP clauses.
1124 struct OpenMPVarListDataTy final {
1126 Expr *IteratorExpr = nullptr;
1131 int ExtraModifier = -1; ///< Additional modifier for linear, map, depend or
1132 ///< lastprivate clause.
1140 bool IsMapTypeImplicit = false;
1144 StepModifierLoc; /// 'step' modifier location for linear clause
1145 };
1146
1148 ArrayRef<Expr *> Vars,
1149 const OMPVarListLocTy &Locs,
1151 /// Called on well-formed 'inclusive' clause.
1153 SourceLocation StartLoc,
1154 SourceLocation LParenLoc,
1155 SourceLocation EndLoc);
1156 /// Called on well-formed 'exclusive' clause.
1158 SourceLocation StartLoc,
1159 SourceLocation LParenLoc,
1160 SourceLocation EndLoc);
1161 /// Called on well-formed 'allocate' clause.
1162 OMPClause *
1164 SourceLocation StartLoc, SourceLocation ColonLoc,
1165 SourceLocation LParenLoc, SourceLocation EndLoc);
1166 /// Called on well-formed 'private' clause.
1168 SourceLocation StartLoc,
1169 SourceLocation LParenLoc,
1170 SourceLocation EndLoc);
1171 /// Called on well-formed 'firstprivate' clause.
1173 SourceLocation StartLoc,
1174 SourceLocation LParenLoc,
1175 SourceLocation EndLoc);
1176 /// Called on well-formed 'lastprivate' clause.
1179 SourceLocation LPKindLoc, SourceLocation ColonLoc,
1180 SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc);
1181 /// Called on well-formed 'shared' clause.
1183 SourceLocation StartLoc,
1184 SourceLocation LParenLoc,
1185 SourceLocation EndLoc);
1186 /// Called on well-formed 'reduction' clause.
1189 SourceLocation StartLoc, SourceLocation LParenLoc,
1190 SourceLocation ModifierLoc, SourceLocation ColonLoc,
1191 SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec,
1192 const DeclarationNameInfo &ReductionId,
1193 ArrayRef<Expr *> UnresolvedReductions = std::nullopt);
1194 /// Called on well-formed 'task_reduction' clause.
1196 ArrayRef<Expr *> VarList, SourceLocation StartLoc,
1197 SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc,
1198 CXXScopeSpec &ReductionIdScopeSpec,
1199 const DeclarationNameInfo &ReductionId,
1200 ArrayRef<Expr *> UnresolvedReductions = std::nullopt);
1201 /// Called on well-formed 'in_reduction' clause.
1203 ArrayRef<Expr *> VarList, SourceLocation StartLoc,
1204 SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc,
1205 CXXScopeSpec &ReductionIdScopeSpec,
1206 const DeclarationNameInfo &ReductionId,
1207 ArrayRef<Expr *> UnresolvedReductions = std::nullopt);
1208 /// Called on well-formed 'linear' clause.
1210 ArrayRef<Expr *> VarList, Expr *Step, SourceLocation StartLoc,
1211 SourceLocation LParenLoc, OpenMPLinearClauseKind LinKind,
1212 SourceLocation LinLoc, SourceLocation ColonLoc,
1213 SourceLocation StepModifierLoc, SourceLocation EndLoc);
1214 /// Called on well-formed 'aligned' clause.
1216 SourceLocation StartLoc,
1217 SourceLocation LParenLoc,
1218 SourceLocation ColonLoc,
1219 SourceLocation EndLoc);
1220 /// Called on well-formed 'copyin' clause.
1222 SourceLocation StartLoc,
1223 SourceLocation LParenLoc,
1224 SourceLocation EndLoc);
1225 /// Called on well-formed 'copyprivate' clause.
1227 SourceLocation StartLoc,
1228 SourceLocation LParenLoc,
1229 SourceLocation EndLoc);
1230 /// Called on well-formed 'flush' pseudo clause.
1232 SourceLocation StartLoc,
1233 SourceLocation LParenLoc,
1234 SourceLocation EndLoc);
1235 /// Called on well-formed 'depobj' pseudo clause.
1237 SourceLocation LParenLoc,
1238 SourceLocation EndLoc);
1239 /// Called on well-formed 'depend' clause.
1241 Expr *DepModifier,
1242 ArrayRef<Expr *> VarList,
1243 SourceLocation StartLoc,
1244 SourceLocation LParenLoc,
1245 SourceLocation EndLoc);
1246 /// Called on well-formed 'device' clause.
1248 Expr *Device, SourceLocation StartLoc,
1249 SourceLocation LParenLoc,
1250 SourceLocation ModifierLoc,
1251 SourceLocation EndLoc);
1252 /// Called on well-formed 'map' clause.
1254 Expr *IteratorModifier, ArrayRef<OpenMPMapModifierKind> MapTypeModifiers,
1255 ArrayRef<SourceLocation> MapTypeModifiersLoc,
1256 CXXScopeSpec &MapperIdScopeSpec, DeclarationNameInfo &MapperId,
1257 OpenMPMapClauseKind MapType, bool IsMapTypeImplicit,
1258 SourceLocation MapLoc, SourceLocation ColonLoc, ArrayRef<Expr *> VarList,
1259 const OMPVarListLocTy &Locs, bool NoDiagnose = false,
1260 ArrayRef<Expr *> UnresolvedMappers = std::nullopt);
1261 /// Called on well-formed 'num_teams' clause.
1263 SourceLocation StartLoc,
1264 SourceLocation LParenLoc,
1265 SourceLocation EndLoc);
1266 /// Called on well-formed 'thread_limit' clause.
1268 SourceLocation StartLoc,
1269 SourceLocation LParenLoc,
1270 SourceLocation EndLoc);
1271 /// Called on well-formed 'priority' clause.
1273 SourceLocation LParenLoc,
1274 SourceLocation EndLoc);
1275 /// Called on well-formed 'dist_schedule' clause.
1278 SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation KindLoc,
1279 SourceLocation CommaLoc, SourceLocation EndLoc);
1280 /// Called on well-formed 'defaultmap' clause.
1283 SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation MLoc,
1284 SourceLocation KindLoc, SourceLocation EndLoc);
1285 /// Called on well-formed 'to' clause.
1286 OMPClause *
1288 ArrayRef<SourceLocation> MotionModifiersLoc,
1289 CXXScopeSpec &MapperIdScopeSpec,
1290 DeclarationNameInfo &MapperId, SourceLocation ColonLoc,
1291 ArrayRef<Expr *> VarList, const OMPVarListLocTy &Locs,
1292 ArrayRef<Expr *> UnresolvedMappers = std::nullopt);
1293 /// Called on well-formed 'from' clause.
1294 OMPClause *
1296 ArrayRef<SourceLocation> MotionModifiersLoc,
1297 CXXScopeSpec &MapperIdScopeSpec,
1298 DeclarationNameInfo &MapperId, SourceLocation ColonLoc,
1299 ArrayRef<Expr *> VarList, const OMPVarListLocTy &Locs,
1300 ArrayRef<Expr *> UnresolvedMappers = std::nullopt);
1301 /// Called on well-formed 'use_device_ptr' clause.
1303 const OMPVarListLocTy &Locs);
1304 /// Called on well-formed 'use_device_addr' clause.
1306 const OMPVarListLocTy &Locs);
1307 /// Called on well-formed 'is_device_ptr' clause.
1309 const OMPVarListLocTy &Locs);
1310 /// Called on well-formed 'has_device_addr' clause.
1312 const OMPVarListLocTy &Locs);
1313 /// Called on well-formed 'nontemporal' clause.
1315 SourceLocation StartLoc,
1316 SourceLocation LParenLoc,
1317 SourceLocation EndLoc);
1318
1319 /// Data for list of allocators.
1321 /// Allocator.
1322 Expr *Allocator = nullptr;
1323 /// Allocator traits.
1325 /// Locations of '(' and ')' symbols.
1327 };
1328 /// Called on well-formed 'uses_allocators' clause.
1330 SourceLocation LParenLoc,
1331 SourceLocation EndLoc,
1333 /// Called on well-formed 'affinity' clause.
1335 SourceLocation LParenLoc,
1336 SourceLocation ColonLoc,
1337 SourceLocation EndLoc, Expr *Modifier,
1338 ArrayRef<Expr *> Locators);
1339 /// Called on a well-formed 'bind' clause.
1341 SourceLocation KindLoc,
1342 SourceLocation StartLoc,
1343 SourceLocation LParenLoc,
1344 SourceLocation EndLoc);
1345
1346 /// Called on a well-formed 'ompx_dyn_cgroup_mem' clause.
1348 SourceLocation LParenLoc,
1349 SourceLocation EndLoc);
1350
1351 /// Called on well-formed 'doacross' clause.
1352 OMPClause *
1354 SourceLocation DepLoc, SourceLocation ColonLoc,
1355 ArrayRef<Expr *> VarList, SourceLocation StartLoc,
1356 SourceLocation LParenLoc, SourceLocation EndLoc);
1357
1358 /// Called on a well-formed 'ompx_attribute' clause.
1360 SourceLocation StartLoc,
1361 SourceLocation LParenLoc,
1362 SourceLocation EndLoc);
1363
1364 /// Called on a well-formed 'ompx_bare' clause.
1366 SourceLocation EndLoc);
1367
1369 Expr *LowerBound,
1370 SourceLocation ColonLocFirst,
1371 SourceLocation ColonLocSecond,
1372 Expr *Length, Expr *Stride,
1373 SourceLocation RBLoc);
1375 SourceLocation RParenLoc,
1376 ArrayRef<Expr *> Dims,
1377 ArrayRef<SourceRange> Brackets);
1378
1379 /// Data structure for iterator expression.
1388 };
1389
1391 SourceLocation LLoc, SourceLocation RLoc,
1393
1394 void handleOMPAssumeAttr(Decl *D, const ParsedAttr &AL);
1395
1396private:
1397 void *VarDataSharingAttributesStack;
1398
1399 /// Number of nested '#pragma omp declare target' directives.
1400 SmallVector<DeclareTargetContextInfo, 4> DeclareTargetNesting;
1401
1402 /// Initialization of data-sharing attributes stack.
1403 void InitDataSharingAttributesStack();
1404 void DestroyDataSharingAttributesStack();
1405
1406 /// Returns OpenMP nesting level for current directive.
1407 unsigned getOpenMPNestingLevel() const;
1408
1409 /// Adjusts the function scopes index for the target-based regions.
1410 void adjustOpenMPTargetScopeIndex(unsigned &FunctionScopesIndex,
1411 unsigned Level) const;
1412
1413 /// Returns the number of scopes associated with the construct on the given
1414 /// OpenMP level.
1415 int getNumberOfConstructScopes(unsigned Level) const;
1416
1417 /// Push new OpenMP function region for non-capturing function.
1418 void pushOpenMPFunctionRegion();
1419
1420 /// Pop OpenMP function region for non-capturing function.
1421 void popOpenMPFunctionRegion(const sema::FunctionScopeInfo *OldFSI);
1422
1423 /// Analyzes and checks a loop nest for use by a loop transformation.
1424 ///
1425 /// \param Kind The loop transformation directive kind.
1426 /// \param NumLoops How many nested loops the directive is expecting.
1427 /// \param AStmt Associated statement of the transformation directive.
1428 /// \param LoopHelpers [out] The loop analysis result.
1429 /// \param Body [out] The body code nested in \p NumLoops loop.
1430 /// \param OriginalInits [out] Collection of statements and declarations that
1431 /// must have been executed/declared before entering the
1432 /// loop.
1433 ///
1434 /// \return Whether there was any error.
1435 bool checkTransformableLoopNest(
1436 OpenMPDirectiveKind Kind, Stmt *AStmt, int NumLoops,
1438 Stmt *&Body, SmallVectorImpl<SmallVector<Stmt *, 0>> &OriginalInits);
1439
1440 /// Helper to keep information about the current `omp begin/end declare
1441 /// variant` nesting.
1442 struct OMPDeclareVariantScope {
1443 /// The associated OpenMP context selector.
1444 OMPTraitInfo *TI;
1445
1446 /// The associated OpenMP context selector mangling.
1447 std::string NameSuffix;
1448
1449 OMPDeclareVariantScope(OMPTraitInfo &TI);
1450 };
1451
1452 /// Return the OMPTraitInfo for the surrounding scope, if any.
1453 OMPTraitInfo *getOMPTraitInfoForSurroundingScope() {
1454 return OMPDeclareVariantScopes.empty() ? nullptr
1455 : OMPDeclareVariantScopes.back().TI;
1456 }
1457
1458 /// The current `omp begin/end declare variant` scopes.
1459 SmallVector<OMPDeclareVariantScope, 4> OMPDeclareVariantScopes;
1460
1461 /// The current `omp begin/end assumes` scopes.
1462 SmallVector<OMPAssumeAttr *, 4> OMPAssumeScoped;
1463
1464 /// All `omp assumes` we encountered so far.
1465 SmallVector<OMPAssumeAttr *, 4> OMPAssumeGlobal;
1466};
1467
1468} // namespace clang
1469
1470#endif // LLVM_CLANG_SEMA_SEMAOPENMP_H
#define V(N, I)
Definition: ASTContext.h:3341
const Decl * D
enum clang::sema::@1659::IndirectLocalPathEntry::EntryKind Kind
Expr * E
This file defines OpenMP nodes for declarative directives.
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:1143
SourceLocation Loc
Definition: SemaObjC.cpp:758
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.
C Language Family Type Representation.
Represents a C++ nested-name-specifier or a global scope specifier.
Definition: DeclSpec.h:74
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Definition: DeclBase.h:1435
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:86
The name of a declaration.
Information about one declarator, including the parsed type information and the identifier.
Definition: DeclSpec.h:1903
This represents one expression.
Definition: Expr.h:110
Represents a member of a struct/union/class.
Definition: Decl.h: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:110
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:245
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:242
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:54
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:55
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:370
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:430
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:535
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:302
DeclareTargetContextInfo(OpenMPDirectiveKind Kind, SourceLocation Loc)
Definition: SemaOpenMP.h:320
std::optional< Expr * > Indirect
The directive with indirect clause.
Definition: SemaOpenMP.h:315
OpenMPDirectiveKind Kind
The directive kind, begin declare target or declare target.
Definition: SemaOpenMP.h:312
OMPDeclareTargetDeclAttr::DevTypeTy DT
The 'device_type' as parsed from the clause.
Definition: SemaOpenMP.h:309
SourceLocation Loc
The directive location.
Definition: SemaOpenMP.h:318
llvm::DenseMap< NamedDecl *, MapInfo > ExplicitlyMapped
Explicitly listed variables and functions in a 'to' or 'link' clause.
Definition: SemaOpenMP.h:306
Data structure for iterator expression.
Definition: SemaOpenMP.h:1380
OMPIteratorExpr::IteratorRange Range
Definition: SemaOpenMP.h:1384
Data used for processing a list of variables in OpenMP clauses.
Definition: SemaOpenMP.h:1124
SmallVector< SourceLocation, NumberOfOMPMotionModifiers > MotionModifiersLoc
Definition: SemaOpenMP.h:1139
SmallVector< OpenMPMotionModifierKind, NumberOfOMPMotionModifiers > MotionModifiers
Definition: SemaOpenMP.h:1138
SmallVector< OpenMPMapModifierKind, NumberOfOMPMapClauseModifiers > MapTypeModifiers
Definition: SemaOpenMP.h:1134
SmallVector< SourceLocation, NumberOfOMPMapClauseModifiers > MapTypeModifiersLoc
Definition: SemaOpenMP.h:1136
DeclarationNameInfo ReductionOrMapperId
Definition: SemaOpenMP.h:1130
int ExtraModifier
Additional modifier for linear, map, depend or lastprivate clause.
Definition: SemaOpenMP.h:1131
Data for list of allocators.
Definition: SemaOpenMP.h:1320
Expr * AllocatorTraits
Allocator traits.
Definition: SemaOpenMP.h:1324
SourceLocation LParenLoc
Locations of '(' and ')' symbols.
Definition: SemaOpenMP.h:1326