Lines Matching +full:compound +full:- +full:device

1 //===--- ParseOpenACC.cpp - OpenACC-specific parsing support --------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 //===----------------------------------------------------------------------===//
36 // Translate single-token string representations to the OpenACC Directive Kind.
37 // This doesn't completely comprehend 'Compound Constructs' (as it just
46 Tok.getIdentifierInfo()->getName()) in getOpenACCDirectiveKind()
68 Tok.getIdentifierInfo()->getName()) in getOpenACCDirectiveKind()
74 // Translate single-token string representations to the OpenCC Clause Kind.
97 Tok.getIdentifierInfo()->getName()) in getOpenACCClauseKind()
119 .Case("device", OpenACCClauseKind::Device) in getOpenACCClauseKind()
151 // Since 'atomic' is effectively a compound directive, this will decode the
157 Tok.getIdentifierInfo()->getName()) in getOpenACCAtomicKind()
170 Tok.getIdentifierInfo()->getName()) in getOpenACCDefaultClauseKind()
197 return Tok.getIdentifierInfo()->isStr("readonly"); in isOpenACCSpecialToken()
199 return Tok.getIdentifierInfo()->isStr("devnum"); in isOpenACCSpecialToken()
201 return Tok.getIdentifierInfo()->isStr("queues"); in isOpenACCSpecialToken()
203 return Tok.getIdentifierInfo()->isStr("zero"); in isOpenACCSpecialToken()
205 return Tok.getIdentifierInfo()->isStr("force"); in isOpenACCSpecialToken()
207 return Tok.getIdentifierInfo()->isStr("num"); in isOpenACCSpecialToken()
209 return Tok.getIdentifierInfo()->isStr("length"); in isOpenACCSpecialToken()
211 return Tok.getIdentifierInfo()->isStr("dim"); in isOpenACCSpecialToken()
213 return Tok.getIdentifierInfo()->isStr("static"); in isOpenACCSpecialToken()
219 /// 'identifier-like' token, but don't want to give awkward error messages in
226 Tok.getIdentifierInfo()->isKeyword(P.getLangOpts())) in isTokenIdentifierOrKeyword()
241 // If this is an identifier-like thing followed by ':', it is one of the in tryParseAndConsumeSpecialTokenKind()
266 return Tok.getIdentifierInfo()->isStr("parallel"); in isOpenACCDirectiveKind()
268 return Tok.getIdentifierInfo()->isStr("serial"); in isOpenACCDirectiveKind()
270 return Tok.getIdentifierInfo()->isStr("kernels"); in isOpenACCDirectiveKind()
272 return Tok.getIdentifierInfo()->isStr("data"); in isOpenACCDirectiveKind()
274 return Tok.getIdentifierInfo()->isStr("host_data"); in isOpenACCDirectiveKind()
276 return Tok.getIdentifierInfo()->isStr("loop"); in isOpenACCDirectiveKind()
278 return Tok.getIdentifierInfo()->isStr("cache"); in isOpenACCDirectiveKind()
288 return Tok.getIdentifierInfo()->isStr("atomic"); in isOpenACCDirectiveKind()
290 return Tok.getIdentifierInfo()->isStr("routine"); in isOpenACCDirectiveKind()
292 return Tok.getIdentifierInfo()->isStr("declare"); in isOpenACCDirectiveKind()
294 return Tok.getIdentifierInfo()->isStr("init"); in isOpenACCDirectiveKind()
296 return Tok.getIdentifierInfo()->isStr("shutdown"); in isOpenACCDirectiveKind()
298 return Tok.getIdentifierInfo()->isStr("set"); in isOpenACCDirectiveKind()
300 return Tok.getIdentifierInfo()->isStr("update"); in isOpenACCDirectiveKind()
302 return Tok.getIdentifierInfo()->isStr("wait"); in isOpenACCDirectiveKind()
338 if (ReductionKindTok.getIdentifierInfo()->isStr("max")) in ParseReductionOperator()
340 if (ReductionKindTok.getIdentifierInfo()->isStr("min")) in ParseReductionOperator()
350 /// Used for cases where we expect an identifier-like token, but don't want to
382 << 1 << FirstTok.getIdentifierInfo()->getName() in ParseOpenACCEnterExitDataDirective()
383 << SecondTok.getIdentifierInfo()->getName(); in ParseOpenACCEnterExitDataDirective()
520 case OpenACCClauseKind::Device: in getClauseParensKind()
577 llvm_unreachable("Unhandled directive->assoc stmt"); in doesDirectiveHaveAssociatedStmt()
622 getActions().ActOnCondition(getCurScope(), ER.get()->getExprLoc(), in ParseOpenACCConditionExpr()
630 // a pqr-list is a comma-separated list of pdr items. The one exception is a
631 // clause-list, which is a list of one or more clauses optionally separated by
638 // Comma is optional in a clause-list. in ParseOpenACCClauseList()
707 /// The argument to the device_type clause is a comma-separated list of one or
708 /// more device architecture name identifiers, or an asterisk.
712 /// device_type( device-type-list )
741 /// size-expr is one of:
743 // int-expr
744 // Note that this is specified under 'gang-arg-list', but also applies to 'tile'
749 // The size-expr ends up being ambiguous when only looking at the current in ParseOpenACCSizeExpr()
784 /// where gang-arg is one of:
785 /// [num:]int-expr
786 /// dim:int-expr
787 /// static:size-expr
792 // 'static' just takes a size-expr, which is an int-expr or an asterisk. in ParseOpenACCGangArg()
811 // Fallthrough to the 'int-expr' handling for when 'num' is omitted. in ParseOpenACCGangArg()
838 // The OpenACC Clause List is a comma or space-delimited list of clauses (see
841 // However, they all are named with a single-identifier (or auto/default!)
942 // If we're missing a clause-kind (or it is invalid), see if we can parse in ParseOpenACCClauseParams()
943 // the var-list anyway. in ParseOpenACCClauseParams()
949 // The 'self' clause is a var-list instead of a 'condition' in the case of in ParseOpenACCClauseParams()
956 case OpenACCClauseKind::Device: in ParseOpenACCClauseParams()
1131 // If we have optional parens, make sure we set the end-location to the in ParseOpenACCClauseParams()
1143 /// In this section and throughout the specification, the term async-argument
1147 /// values are negative values, so as not to conflict with a user-specified
1148 /// nonnegative async-argument.
1156 /// In this section and throughout the specification, the term wait-argument
1158 /// [ devnum : int-expr : ] [ queues : ] async-argument-list
1162 // [devnum : int-expr : ] in ParseOpenACCWaitArgument()
1199 // the term 'async-argument' means a nonnegative scalar integer expression, or in ParseOpenACCWaitArgument()
1263 // device other than the host. If the name is specified as an identifier, it in ParseOpenACCBindClauseArgument()
1281 /// - a variable name (a scalar, array, or composite variable name)
1282 /// - a subarray specification with subscript ranges
1283 /// - an array element
1284 /// - a member of a composite variable
1285 /// - a common block name between slashes (fortran only)
1331 /// #pragma acc cache ([readonly:]var-list) new-line
1348 // ParseOpenACCVarList should leave us before a r-paren, so no need to skip in ParseOpenACCCacheVarList()
1362 // specifiers that need to be taken care of. Atomic has an 'atomic-clause' in ParseOpenACCDirective()
1379 // Routine has an optional paren-wrapped name of a function in the local in ParseOpenACCDirective()
1397 // OpenACC has an optional paren-wrapped 'wait-argument'. in ParseOpenACCDirective()
1405 // Cache's paren var-list is required, so error here if it isn't provided. in ParseOpenACCDirective()
1406 // We know that the consumeOpen above left the first non-paren here, so in ParseOpenACCDirective()