76 return new (Mem)
OpenACCIfClause(BeginLoc, LParenLoc, ConditionExpr, EndLoc);
83 ConditionExpr, EndLoc) {
84 assert(ConditionExpr &&
"if clause requires condition expr");
85 assert((ConditionExpr->isInstantiationDependent() ||
86 ConditionExpr->getType()->isScalarType()) &&
87 "Condition expression type not scalar/dependent");
95 void *Mem =
C.Allocate(OpenACCSelfClause::totalSizeToAlloc<Expr *>(1));
97 OpenACCSelfClause(BeginLoc, LParenLoc, ConditionExpr, EndLoc);
106 C.Allocate(OpenACCSelfClause::totalSizeToAlloc<Expr *>(VarList.size()));
107 return new (Mem) OpenACCSelfClause(BeginLoc, LParenLoc, VarList, EndLoc);
116 HasConditionExpr(
std::nullopt), NumExprs(VarList.size()) {
117 llvm::uninitialized_copy(VarList, getTrailingObjects());
125 HasConditionExpr(ConditionExpr !=
nullptr), NumExprs(1) {
128 "Condition expression type not scalar/dependent");
129 llvm::uninitialized_copy(
ArrayRef(ConditionExpr), getTrailingObjects());
135 assert(
false &&
"Clause children function not implemented");
137#define VISIT_CLAUSE(CLAUSE_NAME) \
138 case OpenACCClauseKind::CLAUSE_NAME: \
139 return cast<OpenACC##CLAUSE_NAME##Clause>(this)->children();
140#define CLAUSE_ALIAS(ALIAS_NAME, CLAUSE_NAME, DEPRECATED) \
141 case OpenACCClauseKind::ALIAS_NAME: \
142 return cast<OpenACC##CLAUSE_NAME##Clause>(this)->children();
144#include "clang/Basic/OpenACCClauses.def"
149OpenACCNumWorkersClause::OpenACCNumWorkersClause(
SourceLocation BeginLoc,
154 LParenLoc, IntExpr, EndLoc) {
157 "Condition expression type not scalar/dependent");
167 assert(GangKinds.size() == IntExprs.size() &&
"Mismatch exprs/kind?");
168 setExprs(getTrailingObjects<Expr *>(IntExprs.size()), IntExprs);
169 llvm::uninitialized_copy(GangKinds, getTrailingObjects<OpenACCGangKind>());
176 void *Mem =
C.Allocate(
sizeof(OpenACCNumWorkersClause),
177 alignof(OpenACCNumWorkersClause));
179 OpenACCNumWorkersClause(BeginLoc, LParenLoc, IntExpr, EndLoc);
182OpenACCCollapseClause::OpenACCCollapseClause(
SourceLocation BeginLoc,
184 bool HasForce,
Expr *LoopCount,
187 LParenLoc, LoopCount, EndLoc),
188 HasForce(HasForce) {}
196 "Loop count not constant expression");
198 C.Allocate(
sizeof(OpenACCCollapseClause),
alignof(OpenACCCollapseClause));
200 OpenACCCollapseClause(BeginLoc, LParenLoc, HasForce, LoopCount, EndLoc);
203OpenACCVectorLengthClause::OpenACCVectorLengthClause(
SourceLocation BeginLoc,
208 LParenLoc, IntExpr, EndLoc) {
211 "Condition expression type not scalar/dependent");
218 void *Mem =
C.Allocate(
sizeof(OpenACCVectorLengthClause),
219 alignof(OpenACCVectorLengthClause));
221 OpenACCVectorLengthClause(BeginLoc, LParenLoc, IntExpr, EndLoc);
228 LParenLoc, IntExpr, EndLoc) {
231 "Condition expression type not scalar/dependent");
240 C.Allocate(
sizeof(OpenACCAsyncClause),
alignof(OpenACCAsyncClause));
241 return new (Mem) OpenACCAsyncClause(BeginLoc, LParenLoc, IntExpr, EndLoc);
244OpenACCDeviceNumClause::OpenACCDeviceNumClause(
SourceLocation BeginLoc,
248 LParenLoc, IntExpr, EndLoc) {
251 "device_num expression type not scalar/dependent");
260 C.Allocate(
sizeof(OpenACCDeviceNumClause),
alignof(OpenACCDeviceNumClause));
261 return new (Mem) OpenACCDeviceNumClause(BeginLoc, LParenLoc, IntExpr, EndLoc);
264OpenACCDefaultAsyncClause::OpenACCDefaultAsyncClause(
SourceLocation BeginLoc,
269 LParenLoc, IntExpr, EndLoc) {
272 "default_async expression type not scalar/dependent");
279 void *Mem =
C.Allocate(
sizeof(OpenACCDefaultAsyncClause),
280 alignof(OpenACCDefaultAsyncClause));
282 OpenACCDefaultAsyncClause(BeginLoc, LParenLoc, IntExpr, EndLoc);
291 void *Mem =
C.Allocate(
292 OpenACCWaitClause::totalSizeToAlloc<Expr *>(QueueIdExprs.size() + 1));
293 return new (Mem) OpenACCWaitClause(BeginLoc, LParenLoc, DevNumExpr, QueuesLoc,
294 QueueIdExprs, EndLoc);
302 void *Mem =
C.Allocate(
303 OpenACCNumGangsClause::totalSizeToAlloc<Expr *>(IntExprs.size()));
304 return new (Mem) OpenACCNumGangsClause(BeginLoc, LParenLoc, IntExprs, EndLoc);
313 C.Allocate(OpenACCTileClause::totalSizeToAlloc<Expr *>(SizeExprs.size()));
314 return new (Mem) OpenACCTileClause(BeginLoc, LParenLoc, SizeExprs, EndLoc);
322 assert(VarList.size() == InitRecipes.size());
323 void *Mem =
C.Allocate(
324 OpenACCPrivateClause::totalSizeToAlloc<Expr *, OpenACCPrivateRecipe>(
325 VarList.size(), InitRecipes.size()));
327 OpenACCPrivateClause(BeginLoc, LParenLoc, VarList, InitRecipes, EndLoc);
334 void *Mem =
C.Allocate(
335 OpenACCFirstPrivateClause::totalSizeToAlloc<
Expr *,
337 VarList.size(), InitRecipes.size()));
338 return new (Mem) OpenACCFirstPrivateClause(BeginLoc, LParenLoc, VarList,
339 InitRecipes, EndLoc);
348 C.Allocate(OpenACCAttachClause::totalSizeToAlloc<Expr *>(VarList.size()));
349 return new (Mem) OpenACCAttachClause(BeginLoc, LParenLoc, VarList, EndLoc);
358 C.Allocate(OpenACCDetachClause::totalSizeToAlloc<Expr *>(VarList.size()));
359 return new (Mem) OpenACCDetachClause(BeginLoc, LParenLoc, VarList, EndLoc);
368 C.Allocate(OpenACCDeleteClause::totalSizeToAlloc<Expr *>(VarList.size()));
369 return new (Mem) OpenACCDeleteClause(BeginLoc, LParenLoc, VarList, EndLoc);
377 void *Mem =
C.Allocate(
378 OpenACCUseDeviceClause::totalSizeToAlloc<Expr *>(VarList.size()));
379 return new (Mem) OpenACCUseDeviceClause(BeginLoc, LParenLoc, VarList, EndLoc);
387 void *Mem =
C.Allocate(
388 OpenACCDevicePtrClause::totalSizeToAlloc<Expr *>(VarList.size()));
389 return new (Mem) OpenACCDevicePtrClause(BeginLoc, LParenLoc, VarList, EndLoc);
397 void *Mem =
C.Allocate(
398 OpenACCNoCreateClause::totalSizeToAlloc<Expr *>(VarList.size()));
399 return new (Mem) OpenACCNoCreateClause(BeginLoc, LParenLoc, VarList, EndLoc);
407 void *Mem =
C.Allocate(
408 OpenACCPresentClause::totalSizeToAlloc<Expr *>(VarList.size()));
409 return new (Mem) OpenACCPresentClause(BeginLoc, LParenLoc, VarList, EndLoc);
418 C.Allocate(OpenACCHostClause::totalSizeToAlloc<Expr *>(VarList.size()));
419 return new (Mem) OpenACCHostClause(BeginLoc, LParenLoc, VarList, EndLoc);
428 C.Allocate(OpenACCDeviceClause::totalSizeToAlloc<Expr *>(VarList.size()));
429 return new (Mem) OpenACCDeviceClause(BeginLoc, LParenLoc, VarList, EndLoc);
438 C.Allocate(OpenACCCopyClause::totalSizeToAlloc<Expr *>(VarList.size()));
440 OpenACCCopyClause(Spelling, BeginLoc, LParenLoc, Mods, VarList, EndLoc);
449 C.Allocate(OpenACCLinkClause::totalSizeToAlloc<Expr *>(VarList.size()));
450 return new (Mem) OpenACCLinkClause(BeginLoc, LParenLoc, VarList, EndLoc);
456 void *Mem =
C.Allocate(
457 OpenACCDeviceResidentClause::totalSizeToAlloc<Expr *>(VarList.size()));
459 OpenACCDeviceResidentClause(BeginLoc, LParenLoc, VarList, EndLoc);
468 C.Allocate(OpenACCCopyInClause::totalSizeToAlloc<Expr *>(VarList.size()));
470 OpenACCCopyInClause(Spelling, BeginLoc, LParenLoc, Mods, VarList, EndLoc);
478 void *Mem =
C.Allocate(
479 OpenACCCopyOutClause::totalSizeToAlloc<Expr *>(VarList.size()));
480 return new (Mem) OpenACCCopyOutClause(Spelling, BeginLoc, LParenLoc, Mods,
490 C.Allocate(OpenACCCreateClause::totalSizeToAlloc<Expr *>(VarList.size()));
492 OpenACCCreateClause(Spelling, BeginLoc, LParenLoc, Mods, VarList, EndLoc);
500 C.Allocate(OpenACCDeviceTypeClause::totalSizeToAlloc<DeviceTypeArgument>(
503 OpenACCDeviceTypeClause(K, BeginLoc, LParenLoc, Archs, EndLoc);
511 size_t NumCombiners = llvm::accumulate(
516 void *Mem =
C.Allocate(OpenACCReductionClause::totalSizeToAlloc<
519 VarList.size(), Recipes.size(), NumCombiners));
520 return new (Mem) OpenACCReductionClause(BeginLoc, LParenLoc, Operator,
521 VarList, Recipes, EndLoc);
558 C.Allocate(OpenACCGangClause::totalSizeToAlloc<Expr *, OpenACCGangKind>(
559 IntExprs.size(), GangKinds.size()));
568 LParenLoc, IntExpr, EndLoc) {
569 assert((!IntExpr || IntExpr->isInstantiationDependent() ||
570 IntExpr->getType()->isIntegerType()) &&
571 "Int expression type not scalar/dependent");
588 LParenLoc, IntExpr, EndLoc) {
589 assert((!IntExpr || IntExpr->isInstantiationDependent() ||
590 IntExpr->getType()->isIntegerType()) &&
591 "Int expression type not scalar/dependent");
625 void *Mem =
C.Allocate(
sizeof(OpenACCBindClause),
alignof(OpenACCBindClause));
626 return new (Mem) OpenACCBindClause(BeginLoc, LParenLoc, SL, EndLoc);
634 void *Mem =
C.Allocate(
sizeof(OpenACCBindClause),
alignof(OpenACCBindClause));
635 return new (Mem) OpenACCBindClause(BeginLoc, LParenLoc, ID, EndLoc);
654void OpenACCClausePrinter::printExpr(
const Expr *E) {
659 OS <<
"default(" <<
C.getDefaultClauseKind() <<
")";
664 printExpr(
C.getConditionExpr());
671 if (
C.isConditionExprClause()) {
672 if (
const Expr *CondExpr =
C.getConditionExpr()) {
679 llvm::interleaveComma(
C.getVarList(), OS,
680 [&](
const Expr *E) { printExpr(E); });
687 llvm::interleaveComma(
C.getIntExprs(), OS,
688 [&](
const Expr *E) { printExpr(E); });
694 llvm::interleaveComma(
C.getSizeExprs(), OS,
695 [&](
const Expr *E) { printExpr(E); });
699void OpenACCClausePrinter::VisitNumWorkersClause(
701 OS <<
"num_workers(";
702 printExpr(
C.getIntExpr());
706void OpenACCClausePrinter::VisitVectorLengthClause(
708 OS <<
"vector_length(";
709 printExpr(
C.getIntExpr());
713void OpenACCClausePrinter::VisitDeviceNumClause(
716 printExpr(
C.getIntExpr());
720void OpenACCClausePrinter::VisitDefaultAsyncClause(
722 OS <<
"default_async(";
723 printExpr(
C.getIntExpr());
729 if (
C.hasIntExpr()) {
731 printExpr(
C.getIntExpr());
738 llvm::interleaveComma(
C.getVarList(), OS,
739 [&](
const Expr *E) { printExpr(E); });
743void OpenACCClausePrinter::VisitFirstPrivateClause(
745 OS <<
"firstprivate(";
746 llvm::interleaveComma(
C.getVarList(), OS,
747 [&](
const Expr *E) { printExpr(E); });
753 llvm::interleaveComma(
C.getVarList(), OS,
754 [&](
const Expr *E) { printExpr(E); });
760 llvm::interleaveComma(
C.getVarList(), OS,
761 [&](
const Expr *E) { printExpr(E); });
767 llvm::interleaveComma(
C.getVarList(), OS,
768 [&](
const Expr *E) { printExpr(E); });
772void OpenACCClausePrinter::VisitUseDeviceClause(
775 llvm::interleaveComma(
C.getVarList(), OS,
776 [&](
const Expr *E) { printExpr(E); });
780void OpenACCClausePrinter::VisitDevicePtrClause(
783 llvm::interleaveComma(
C.getVarList(), OS,
784 [&](
const Expr *E) { printExpr(E); });
790 llvm::interleaveComma(
C.getVarList(), OS,
791 [&](
const Expr *E) { printExpr(E); });
797 llvm::interleaveComma(
C.getVarList(), OS,
798 [&](
const Expr *E) { printExpr(E); });
804 llvm::interleaveComma(
C.getVarList(), OS,
805 [&](
const Expr *E) { printExpr(E); });
811 llvm::interleaveComma(
C.getVarList(), OS,
812 [&](
const Expr *E) { printExpr(E); });
817 OS <<
C.getClauseKind() <<
'(';
819 OS <<
C.getModifierList() <<
": ";
820 llvm::interleaveComma(
C.getVarList(), OS,
821 [&](
const Expr *E) { printExpr(E); });
827 llvm::interleaveComma(
C.getVarList(), OS,
828 [&](
const Expr *E) { printExpr(E); });
832void OpenACCClausePrinter::VisitDeviceResidentClause(
834 OS <<
"device_resident(";
835 llvm::interleaveComma(
C.getVarList(), OS,
836 [&](
const Expr *E) { printExpr(E); });
841 OS <<
C.getClauseKind() <<
'(';
843 OS <<
C.getModifierList() <<
": ";
844 llvm::interleaveComma(
C.getVarList(), OS,
845 [&](
const Expr *E) { printExpr(E); });
850 OS <<
C.getClauseKind() <<
'(';
852 OS <<
C.getModifierList() <<
": ";
853 llvm::interleaveComma(
C.getVarList(), OS,
854 [&](
const Expr *E) { printExpr(E); });
859 OS <<
C.getClauseKind() <<
'(';
861 OS <<
C.getModifierList() <<
": ";
862 llvm::interleaveComma(
C.getVarList(), OS,
863 [&](
const Expr *E) { printExpr(E); });
867void OpenACCClausePrinter::VisitReductionClause(
869 OS <<
"reduction(" <<
C.getReductionOp() <<
": ";
870 llvm::interleaveComma(
C.getVarList(), OS,
871 [&](
const Expr *E) { printExpr(E); });
879 if (
C.hasDevNumExpr()) {
881 printExpr(
C.getDevNumExpr());
885 if (
C.hasQueuesTag())
888 llvm::interleaveComma(
C.getQueueIdExprs(), OS,
889 [&](
const Expr *E) { printExpr(E); });
894void OpenACCClausePrinter::VisitDeviceTypeClause(
896 OS <<
C.getClauseKind();
898 llvm::interleaveComma(
C.getArchitectures(), OS,
900 if (Arch.getIdentifierInfo() == nullptr)
903 OS << Arch.getIdentifierInfo()->getName();
912void OpenACCClausePrinter::VisitIndependentClause(
929 printExpr(
C.getLoopCount());
936 if (
C.getNumExprs() > 0) {
939 for (
unsigned I = 0; I <
C.getNumExprs(); ++I) {
944 OS <<
C.getExpr(I).first <<
": ";
945 printExpr(
C.getExpr(I).second);
954 if (
C.hasIntExpr()) {
956 printExpr(
C.getIntExpr());
964 if (
C.hasIntExpr()) {
966 printExpr(
C.getIntExpr());
975void OpenACCClausePrinter::VisitIfPresentClause(
982 if (
C.isStringArgument())
983 OS <<
'"' <<
C.getStringArgument()->getString() <<
'"';
985 OS <<
C.getIdentifierArgument()->getName();
Defines the clang::ASTContext interface.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
This represents one expression.
bool isInstantiationDependent() const
Whether this expression is instantiation-dependent, meaning that it depends in some way on.
One of these records is kept for each identifier that is lexed.
StringRef getName() const
Return the actual identifier string.
static bool classof(const OpenACCClause *C)
static OpenACCAsyncClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *IntExpr, SourceLocation EndLoc)
static OpenACCAttachClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
OpenACCAutoClause(SourceLocation BeginLoc, SourceLocation EndLoc)
static OpenACCAutoClause * Create(const ASTContext &Ctx, SourceLocation BeginLoc, SourceLocation EndLoc)
const IdentifierInfo * getIdentifierArgument() const
const StringLiteral * getStringArgument() const
static bool classof(const OpenACCClause *C)
static OpenACCBindClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, const IdentifierInfo *ID, SourceLocation EndLoc)
bool isStringArgument() const
static bool classof(const OpenACCClause *C)
OpenACCClauseWithCondition(OpenACCClauseKind K, SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *ConditionExpr, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
OpenACCClauseWithExprs(OpenACCClauseKind K, SourceLocation BeginLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
void setExprs(MutableArrayRef< Expr * > NewExprs)
Used only for initialization, the leaf class can initialize this to trailing storage.
Represents a clause that has a list of parameters.
static bool classof(const OpenACCClause *C)
Represents one of a handful of clauses that have a single integer expression.
OpenACCClauseWithSingleIntExpr(OpenACCClauseKind K, SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *IntExpr, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static bool classof(const OpenACCClause *C)
This is the base type for all OpenACC Clauses.
StmtIterator child_iterator
OpenACCClauseKind getClauseKind() const
llvm::iterator_range< child_iterator > child_range
OpenACCClause(OpenACCClauseKind K, SourceLocation BeginLoc, SourceLocation EndLoc)
Represents a 'collapse' clause on a 'loop' construct.
static OpenACCCollapseClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, bool HasForce, Expr *LoopCount, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCCopyClause * Create(const ASTContext &C, OpenACCClauseKind Spelling, SourceLocation BeginLoc, SourceLocation LParenLoc, OpenACCModifierKind Mods, ArrayRef< Expr * > VarList, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static bool classof(const OpenACCClause *C)
static OpenACCCopyInClause * Create(const ASTContext &C, OpenACCClauseKind Spelling, SourceLocation BeginLoc, SourceLocation LParenLoc, OpenACCModifierKind Mods, ArrayRef< Expr * > VarList, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCCopyOutClause * Create(const ASTContext &C, OpenACCClauseKind Spelling, SourceLocation BeginLoc, SourceLocation LParenLoc, OpenACCModifierKind Mods, ArrayRef< Expr * > VarList, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCCreateClause * Create(const ASTContext &C, OpenACCClauseKind Spelling, SourceLocation BeginLoc, SourceLocation LParenLoc, OpenACCModifierKind Mods, ArrayRef< Expr * > VarList, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCDefaultAsyncClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *IntExpr, SourceLocation EndLoc)
A 'default' clause, has the optional 'none' or 'present' argument.
OpenACCDefaultClause(OpenACCDefaultClauseKind K, SourceLocation BeginLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
static OpenACCDefaultClause * Create(const ASTContext &C, OpenACCDefaultClauseKind K, SourceLocation BeginLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
static OpenACCDeleteClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCDetachClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static bool classof(const OpenACCClause *C)
static OpenACCDeviceClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)
static OpenACCDeviceNumClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *IntExpr, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCDevicePtrClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCDeviceResidentClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
A 'device_type' or 'dtype' clause, takes a list of either an 'asterisk' or an identifier.
static OpenACCDeviceTypeClause * Create(const ASTContext &C, OpenACCClauseKind K, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< DeviceTypeArgument > Archs, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
OpenACCFinalizeClause(SourceLocation BeginLoc, SourceLocation EndLoc)
static OpenACCFinalizeClause * Create(const ASTContext &Ctx, SourceLocation BeginLoc, SourceLocation EndLoc)
static OpenACCFirstPrivateClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, ArrayRef< OpenACCFirstPrivateRecipe > InitRecipes, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCGangClause * Create(const ASTContext &Ctx, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< OpenACCGangKind > GangKinds, ArrayRef< Expr * > IntExprs, SourceLocation EndLoc)
OpenACCGangClause(SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< OpenACCGangKind > GangKinds, ArrayRef< Expr * > IntExprs, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCHostClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
An 'if' clause, which has a required condition expression.
OpenACCIfClause(SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *ConditionExpr, SourceLocation EndLoc)
static OpenACCIfClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *ConditionExpr, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCIfPresentClause * Create(const ASTContext &Ctx, SourceLocation BeginLoc, SourceLocation EndLoc)
OpenACCIfPresentClause(SourceLocation BeginLoc, SourceLocation EndLoc)
OpenACCIndependentClause(SourceLocation BeginLoc, SourceLocation EndLoc)
static OpenACCIndependentClause * Create(const ASTContext &Ctx, SourceLocation BeginLoc, SourceLocation EndLoc)
static OpenACCLinkClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static bool classof(const OpenACCClause *C)
static OpenACCNoCreateClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)
OpenACCNoHostClause(SourceLocation BeginLoc, SourceLocation EndLoc)
static OpenACCNoHostClause * Create(const ASTContext &Ctx, SourceLocation BeginLoc, SourceLocation EndLoc)
static OpenACCNumGangsClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > IntExprs, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCNumWorkersClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *IntExpr, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static bool classof(const OpenACCClause *C)
static OpenACCPresentClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCPrivateClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, ArrayRef< OpenACCPrivateRecipe > InitRecipes, SourceLocation EndLoc)
static OpenACCReductionClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, OpenACCReductionOperator Operator, ArrayRef< Expr * > VarList, ArrayRef< OpenACCReductionRecipeWithStorage > Recipes, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
A 'self' clause, which has an optional condition expression, or, in the event of an 'update' directiv...
static bool classof(const OpenACCClause *C)
static OpenACCSelfClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *ConditionExpr, SourceLocation EndLoc)
static OpenACCSeqClause * Create(const ASTContext &Ctx, SourceLocation BeginLoc, SourceLocation EndLoc)
OpenACCSeqClause(SourceLocation BeginLoc, SourceLocation EndLoc)
static OpenACCTileClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > SizeExprs, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCUseDeviceClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< Expr * > VarList, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCVectorClause * Create(const ASTContext &Ctx, SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *IntExpr, SourceLocation EndLoc)
OpenACCVectorClause(SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *IntExpr, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCVectorLengthClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *IntExpr, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static OpenACCWaitClause * Create(const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *DevNumExpr, SourceLocation QueuesLoc, ArrayRef< Expr * > QueueIdExprs, SourceLocation EndLoc)
static bool classof(const OpenACCClause *C)
static bool classof(const OpenACCClause *C)
static OpenACCWorkerClause * Create(const ASTContext &Ctx, SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *IntExpr, SourceLocation EndLoc)
OpenACCWorkerClause(SourceLocation BeginLoc, SourceLocation LParenLoc, Expr *IntExpr, SourceLocation EndLoc)
Encodes a location in the source.
void printPretty(raw_ostream &OS, PrinterHelper *Helper, const PrintingPolicy &Policy, unsigned Indentation=0, StringRef NewlineSymbol="\n", const ASTContext *Context=nullptr) const
StringLiteral - This represents a string literal expression, e.g.
StringRef getString() const
bool isIntegerType() const
isIntegerType() does not include complex integers (a GCC extension).
bool isScalarType() const
The JSON file list parser is used to communicate input to InstallAPI.
bool isa(CodeGen::Address addr)
OpenACCClauseKind
Represents the kind of an OpenACC clause.
@ Gang
'gang' clause, allowed on 'loop' and Combined constructs.
@ VectorLength
'vector_length' clause, allowed on 'parallel', 'kernels', 'parallel loop', and 'kernels loop' constru...
@ Async
'async' clause, allowed on Compute, Data, 'update', 'wait', and Combined constructs.
@ Collapse
'collapse' clause, allowed on 'loop' and Combined constructs.
@ DeviceNum
'device_num' clause, allowed on 'init', 'shutdown', and 'set' constructs.
@ Vector
'vector' clause, allowed on 'loop', Combined, and 'routine' directives.
@ Worker
'worker' clause, allowed on 'loop', Combined, and 'routine' directives.
@ DefaultAsync
'default_async' clause, allowed on 'set' construct.
@ If
'if' clause, allowed on all the Compute Constructs, Data Constructs, Executable Constructs,...
@ Self
'self' clause, allowed on Compute and Combined Constructs, plus 'update'.
@ NumWorkers
'num_workers' clause, allowed on 'parallel', 'kernels', parallel loop', and 'kernels loop' constructs...
bool operator==(const CallGraphNode::CallRecord &LHS, const CallGraphNode::CallRecord &RHS)
nullptr
This class represents a compute construct, representing a 'Kind' of ‘parallel’, 'serial',...
IdentifierLoc DeviceTypeArgument
llvm::SmallVector< OpenACCReductionRecipe::CombinerRecipe, 1 > CombinerRecipes