MLIR
20.0.0git
|
This base class exposes generic asm parser hooks, usable across the various derived parsers. More...
#include "mlir/IR/OpImplementation.h"
Classes | |
class | CyclicParseReset |
Class used to automatically end a cyclic region on destruction. More... | |
class | KeywordSwitch |
This class represents a StringSwitch like class that is useful for parsing expected keywords. More... | |
Public Types | |
enum class | Delimiter { None , Paren , Square , LessGreater , Braces , OptionalParen , OptionalSquare , OptionalLessGreater , OptionalBraces } |
These are the supported delimiters around operand lists and region argument lists, used by parseOperandList. More... | |
template<typename AttrType > | |
using | has_parse_method = decltype(AttrType::parse(std::declval< AsmParser & >(), std::declval< Type >())) |
Trait to check if AttrType provides a parse method. More... | |
template<typename AttrType > | |
using | detect_has_parse_method = llvm::is_detected< has_parse_method, AttrType > |
template<typename TypeT > | |
using | type_has_parse_method = decltype(TypeT::parse(std::declval< AsmParser & >())) |
Trait to check if TypeT provides a parse method. More... | |
template<typename TypeT > | |
using | detect_type_has_parse_method = llvm::is_detected< type_has_parse_method, TypeT > |
Public Member Functions | |
AsmParser ()=default | |
virtual | ~AsmParser () |
MLIRContext * | getContext () const |
virtual SMLoc | getNameLoc () const =0 |
Return the location of the original name token. More... | |
virtual InFlightDiagnostic | emitError (SMLoc loc, const Twine &message={})=0 |
Emit a diagnostic at the specified location and return failure. More... | |
virtual Builder & | getBuilder () const =0 |
Return a builder which provides useful access to MLIRContext, global objects like types and attributes. More... | |
virtual SMLoc | getCurrentLocation ()=0 |
Get the location of the next token and store it into the argument. More... | |
ParseResult | getCurrentLocation (SMLoc *loc) |
virtual Location | getEncodedSourceLoc (SMLoc loc)=0 |
Re-encode the given source location as an MLIR location and return it. More... | |
virtual ParseResult | parseArrow ()=0 |
Parse a '->' token. More... | |
virtual ParseResult | parseOptionalArrow ()=0 |
Parse a '->' token if present. More... | |
virtual ParseResult | parseLBrace ()=0 |
Parse a { token. More... | |
virtual ParseResult | parseOptionalLBrace ()=0 |
Parse a { token if present. More... | |
virtual ParseResult | parseRBrace ()=0 |
Parse a } token. More... | |
virtual ParseResult | parseOptionalRBrace ()=0 |
Parse a } token if present. More... | |
virtual ParseResult | parseColon ()=0 |
Parse a : token. More... | |
virtual ParseResult | parseOptionalColon ()=0 |
Parse a : token if present. More... | |
virtual ParseResult | parseComma ()=0 |
Parse a , token. More... | |
virtual ParseResult | parseOptionalComma ()=0 |
Parse a , token if present. More... | |
virtual ParseResult | parseEqual ()=0 |
Parse a = token. More... | |
virtual ParseResult | parseOptionalEqual ()=0 |
Parse a = token if present. More... | |
virtual ParseResult | parseLess ()=0 |
Parse a '<' token. More... | |
virtual ParseResult | parseOptionalLess ()=0 |
Parse a '<' token if present. More... | |
virtual ParseResult | parseGreater ()=0 |
Parse a '>' token. More... | |
virtual ParseResult | parseOptionalGreater ()=0 |
Parse a '>' token if present. More... | |
virtual ParseResult | parseQuestion ()=0 |
Parse a '?' token. More... | |
virtual ParseResult | parseOptionalQuestion ()=0 |
Parse a '?' token if present. More... | |
virtual ParseResult | parsePlus ()=0 |
Parse a '+' token. More... | |
virtual ParseResult | parseOptionalPlus ()=0 |
Parse a '+' token if present. More... | |
virtual ParseResult | parseMinus ()=0 |
Parse a '-' token. More... | |
virtual ParseResult | parseOptionalMinus ()=0 |
Parse a '-' token if present. More... | |
virtual ParseResult | parseStar ()=0 |
Parse a '*' token. More... | |
virtual ParseResult | parseOptionalStar ()=0 |
Parse a '*' token if present. More... | |
virtual ParseResult | parseVerticalBar ()=0 |
Parse a '|' token. More... | |
virtual ParseResult | parseOptionalVerticalBar ()=0 |
Parse a '|' token if present. More... | |
ParseResult | parseString (std::string *string) |
Parse a quoted string token. More... | |
virtual ParseResult | parseOptionalString (std::string *string)=0 |
Parse a quoted string token if present. More... | |
virtual ParseResult | parseBase64Bytes (std::vector< char > *bytes)=0 |
Parses a Base64 encoded string of bytes. More... | |
virtual ParseResult | parseLParen ()=0 |
Parse a ( token. More... | |
virtual ParseResult | parseOptionalLParen ()=0 |
Parse a ( token if present. More... | |
virtual ParseResult | parseRParen ()=0 |
Parse a ) token. More... | |
virtual ParseResult | parseOptionalRParen ()=0 |
Parse a ) token if present. More... | |
virtual ParseResult | parseLSquare ()=0 |
Parse a [ token. More... | |
virtual ParseResult | parseOptionalLSquare ()=0 |
Parse a [ token if present. More... | |
virtual ParseResult | parseRSquare ()=0 |
Parse a ] token. More... | |
virtual ParseResult | parseOptionalRSquare ()=0 |
Parse a ] token if present. More... | |
virtual ParseResult | parseEllipsis ()=0 |
Parse a ... token. More... | |
virtual ParseResult | parseOptionalEllipsis ()=0 |
Parse a ... token if present;. More... | |
virtual ParseResult | parseFloat (double &result)=0 |
Parse a floating point value from the stream. More... | |
virtual ParseResult | parseFloat (const llvm::fltSemantics &semantics, APFloat &result)=0 |
Parse a floating point value into APFloat from the stream. More... | |
template<typename IntT > | |
ParseResult | parseInteger (IntT &result) |
Parse an integer value from the stream. More... | |
template<typename IntT > | |
ParseResult | parseDecimalInteger (IntT &result) |
Parse a decimal integer value from the stream. More... | |
virtual OptionalParseResult | parseOptionalInteger (APInt &result)=0 |
Parse an optional integer value from the stream. More... | |
virtual OptionalParseResult | parseOptionalDecimalInteger (APInt &result)=0 |
template<typename IntT > | |
OptionalParseResult | parseOptionalInteger (IntT &result) |
template<typename IntT > | |
OptionalParseResult | parseOptionalDecimalInteger (IntT &result) |
virtual ParseResult | parseCommaSeparatedList (Delimiter delimiter, function_ref< ParseResult()> parseElementFn, StringRef contextMessage=StringRef())=0 |
Parse a list of comma-separated items with an optional delimiter. More... | |
ParseResult | parseCommaSeparatedList (function_ref< ParseResult()> parseElementFn) |
Parse a comma separated list of elements that must have at least one entry in it. More... | |
ParseResult | parseKeyword (StringRef keyword) |
Parse a given keyword. More... | |
virtual ParseResult | parseKeyword (StringRef keyword, const Twine &msg)=0 |
ParseResult | parseKeyword (StringRef *keyword) |
Parse a keyword into 'keyword'. More... | |
virtual ParseResult | parseOptionalKeyword (StringRef keyword)=0 |
Parse the given keyword if present. More... | |
virtual ParseResult | parseOptionalKeyword (StringRef *keyword)=0 |
Parse a keyword, if present, into 'keyword'. More... | |
virtual ParseResult | parseOptionalKeyword (StringRef *keyword, ArrayRef< StringRef > allowedValues)=0 |
Parse a keyword, if present, and if one of the 'allowedValues', into 'keyword'. More... | |
ParseResult | parseKeywordOrString (std::string *result) |
Parse a keyword or a quoted string. More... | |
virtual ParseResult | parseOptionalKeywordOrString (std::string *result)=0 |
Parse an optional keyword or string. More... | |
template<typename T , typename... ParamsT> | |
auto | getChecked (SMLoc loc, ParamsT &&...params) |
Invoke the getChecked method of the given Attribute or Type class, using the provided location to emit errors in the case of failure. More... | |
template<typename T , typename... ParamsT> | |
auto | getChecked (ParamsT &&...params) |
A variant of getChecked that uses the result of getNameLoc to emit errors. More... | |
virtual ParseResult | parseAttribute (Attribute &result, Type type={})=0 |
Parse an arbitrary attribute of a given type and return it in result. More... | |
virtual ParseResult | parseCustomAttributeWithFallback (Attribute &result, Type type, function_ref< ParseResult(Attribute &result, Type type)> parseAttribute)=0 |
Parse a custom attribute with the provided callback, unless the next token is # , in which case the generic parser is invoked. More... | |
template<typename AttrType > | |
ParseResult | parseAttribute (AttrType &result, Type type={}) |
Parse an attribute of a specific kind and type. More... | |
ParseResult | parseAttribute (Attribute &result, StringRef attrName, NamedAttrList &attrs) |
Parse an arbitrary attribute and return it in result. More... | |
template<typename AttrType > | |
ParseResult | parseAttribute (AttrType &result, StringRef attrName, NamedAttrList &attrs) |
Parse an attribute of a specific kind and type. More... | |
template<typename AttrType > | |
ParseResult | parseAttribute (AttrType &result, Type type, StringRef attrName, NamedAttrList &attrs) |
Parse an arbitrary attribute of a given type and populate it in result . More... | |
template<typename AttrType > | |
std::enable_if_t< detect_has_parse_method< AttrType >::value, ParseResult > | parseCustomAttributeWithFallback (AttrType &result, Type type, StringRef attrName, NamedAttrList &attrs) |
Parse a custom attribute of a given type unless the next token is # , in which case the generic parser is invoked. More... | |
template<typename AttrType > | |
std::enable_if_t<!detect_has_parse_method< AttrType >::value, ParseResult > | parseCustomAttributeWithFallback (AttrType &result, Type type, StringRef attrName, NamedAttrList &attrs) |
SFINAE parsing method for Attribute that don't implement a parse method. More... | |
template<typename AttrType > | |
std::enable_if_t< detect_has_parse_method< AttrType >::value, ParseResult > | parseCustomAttributeWithFallback (AttrType &result, Type type={}) |
Parse a custom attribute of a given type unless the next token is # , in which case the generic parser is invoked. More... | |
template<typename AttrType > | |
std::enable_if_t<!detect_has_parse_method< AttrType >::value, ParseResult > | parseCustomAttributeWithFallback (AttrType &result, Type type={}) |
SFINAE parsing method for Attribute that don't implement a parse method. More... | |
virtual OptionalParseResult | parseOptionalAttribute (Attribute &result, Type type={})=0 |
Parse an arbitrary optional attribute of a given type and return it in result. More... | |
virtual OptionalParseResult | parseOptionalAttribute (ArrayAttr &result, Type type={})=0 |
Parse an optional array attribute and return it in result. More... | |
virtual OptionalParseResult | parseOptionalAttribute (StringAttr &result, Type type={})=0 |
Parse an optional string attribute and return it in result. More... | |
virtual OptionalParseResult | parseOptionalAttribute (SymbolRefAttr &result, Type type={})=0 |
Parse an optional symbol ref attribute and return it in result. More... | |
template<typename AttrType > | |
OptionalParseResult | parseOptionalAttribute (AttrType &result, StringRef attrName, NamedAttrList &attrs) |
Parse an optional attribute of a specific type and add it to the list with the specified name. More... | |
template<typename AttrType > | |
OptionalParseResult | parseOptionalAttribute (AttrType &result, Type type, StringRef attrName, NamedAttrList &attrs) |
Parse an optional attribute of a specific type and add it to the list with the specified name. More... | |
virtual ParseResult | parseOptionalAttrDict (NamedAttrList &result)=0 |
Parse a named dictionary into 'result' if it is present. More... | |
virtual ParseResult | parseOptionalAttrDictWithKeyword (NamedAttrList &result)=0 |
Parse a named dictionary into 'result' if the attributes keyword is present. More... | |
virtual ParseResult | parseAffineMap (AffineMap &map)=0 |
Parse an affine map instance into 'map'. More... | |
virtual ParseResult | parseAffineExpr (ArrayRef< std::pair< StringRef, AffineExpr >> symbolSet, AffineExpr &expr)=0 |
Parse an affine expr instance into 'expr' using the already computed mapping from symbols to affine expressions in 'symbolSet'. More... | |
virtual ParseResult | parseIntegerSet (IntegerSet &set)=0 |
Parse an integer set instance into 'set'. More... | |
ParseResult | parseSymbolName (StringAttr &result) |
Parse an -identifier and store it (without the '@' symbol) in a string attribute. More... | |
ParseResult | parseSymbolName (StringAttr &result, StringRef attrName, NamedAttrList &attrs) |
Parse an -identifier and store it (without the '@' symbol) in a string attribute named 'attrName'. More... | |
virtual ParseResult | parseOptionalSymbolName (StringAttr &result)=0 |
Parse an optional -identifier and store it (without the '@' symbol) in a string attribute. More... | |
ParseResult | parseOptionalSymbolName (StringAttr &result, StringRef attrName, NamedAttrList &attrs) |
Parse an optional -identifier and store it (without the '@' symbol) in a string attribute named 'attrName'. More... | |
template<typename ResourceT > | |
FailureOr< ResourceT > | parseResourceHandle () |
Parse a handle to a resource within the assembly format. More... | |
virtual ParseResult | parseType (Type &result)=0 |
Parse a type. More... | |
virtual ParseResult | parseCustomTypeWithFallback (Type &result, function_ref< ParseResult(Type &result)> parseType)=0 |
Parse a custom type with the provided callback, unless the next token is # , in which case the generic parser is invoked. More... | |
virtual OptionalParseResult | parseOptionalType (Type &result)=0 |
Parse an optional type. More... | |
template<typename TypeT > | |
ParseResult | parseType (TypeT &result) |
Parse a type of a specific type. More... | |
template<typename TypeT > | |
std::enable_if_t< detect_type_has_parse_method< TypeT >::value, ParseResult > | parseCustomTypeWithFallback (TypeT &result) |
Parse a custom Type of a given type unless the next token is # , in which case the generic parser is invoked. More... | |
template<typename TypeT > | |
std::enable_if_t<!detect_type_has_parse_method< TypeT >::value, ParseResult > | parseCustomTypeWithFallback (TypeT &result) |
SFINAE parsing method for Type that don't implement a parse method. More... | |
ParseResult | parseTypeList (SmallVectorImpl< Type > &result) |
Parse a type list. More... | |
virtual ParseResult | parseArrowTypeList (SmallVectorImpl< Type > &result)=0 |
Parse an arrow followed by a type list. More... | |
virtual ParseResult | parseOptionalArrowTypeList (SmallVectorImpl< Type > &result)=0 |
Parse an optional arrow followed by a type list. More... | |
virtual ParseResult | parseColonType (Type &result)=0 |
Parse a colon followed by a type. More... | |
template<typename TypeType > | |
ParseResult | parseColonType (TypeType &result) |
Parse a colon followed by a type of a specific kind, e.g. a FunctionType. More... | |
virtual ParseResult | parseColonTypeList (SmallVectorImpl< Type > &result)=0 |
Parse a colon followed by a type list, which must have at least one type. More... | |
virtual ParseResult | parseOptionalColonTypeList (SmallVectorImpl< Type > &result)=0 |
Parse an optional colon followed by a type list, which if present must have at least one type. More... | |
ParseResult | parseKeywordType (const char *keyword, Type &result) |
Parse a keyword followed by a type. More... | |
ParseResult | addTypeToList (Type type, SmallVectorImpl< Type > &result) |
Add the specified type to the end of the specified type list and return success. More... | |
ParseResult | addTypesToList (ArrayRef< Type > types, SmallVectorImpl< Type > &result) |
Add the specified types to the end of the specified type list and return success. More... | |
virtual ParseResult | parseDimensionList (SmallVectorImpl< int64_t > &dimensions, bool allowDynamic=true, bool withTrailingX=true)=0 |
Parse a dimension list of a tensor or memref type. More... | |
virtual ParseResult | parseXInDimensionList ()=0 |
Parse an 'x' token in a dimension list, handling the case where the x is juxtaposed with an element type, as in "xf32", leaving the "f32" as the next token. More... | |
template<class AttrOrTypeT > | |
FailureOr< CyclicParseReset > | tryStartCyclicParse (AttrOrTypeT attrOrType) |
Attempts to start a cyclic parsing region for attrOrType . More... | |
Protected Member Functions | |
virtual FailureOr< AsmDialectResourceHandle > | parseResourceHandle (Dialect *dialect)=0 |
Parse a handle to a resource within the assembly format for the given dialect. More... | |
virtual LogicalResult | pushCyclicParsing (const void *opaquePointer)=0 |
Pushes a new attribute or type in the form of a type erased pointer into an internal set. More... | |
virtual void | popCyclicParsing ()=0 |
Removes the element that was last inserted with a successful call to pushCyclicParsing . More... | |
virtual ParseResult | parseKeywordOrCompletion (StringRef *keyword)=0 |
Parse a keyword, or an empty string if the current location signals a code completion. More... | |
virtual void | codeCompleteExpectedTokens (ArrayRef< StringRef > tokens)=0 |
Signal the code completion of a set of expected tokens. More... | |
This base class exposes generic asm parser hooks, usable across the various derived parsers.
Definition at line 545 of file OpImplementation.h.
using mlir::AsmParser::detect_has_parse_method = llvm::is_detected<has_parse_method, AttrType> |
Definition at line 1018 of file OpImplementation.h.
using mlir::AsmParser::detect_type_has_parse_method = llvm::is_detected<type_has_parse_method, TypeT> |
Definition at line 1250 of file OpImplementation.h.
using mlir::AsmParser::has_parse_method = decltype(AttrType::parse(std::declval<AsmParser &>(), std::declval<Type>())) |
Trait to check if AttrType
provides a parse
method.
Definition at line 1015 of file OpImplementation.h.
using mlir::AsmParser::type_has_parse_method = decltype(TypeT::parse(std::declval<AsmParser &>())) |
Trait to check if TypeT
provides a parse
method.
Definition at line 1247 of file OpImplementation.h.
|
strong |
These are the supported delimiters around operand lists and region argument lists, used by parseOperandList.
Definition at line 775 of file OpImplementation.h.
|
default |
|
virtualdefault |
|
inline |
Add the specified types to the end of the specified type list and return success.
This is a helper designed to allow parse methods to be simple and chain through || operators.
Definition at line 1338 of file OpImplementation.h.
|
inline |
Add the specified type to the end of the specified type list and return success.
This is a helper designed to allow parse methods to be simple and chain through || operators.
Definition at line 1330 of file OpImplementation.h.
Referenced by parseAffineMinMaxOp(), and parseOneResultSameOperandTypeOp().
|
protectedpure virtual |
Signal the code completion of a set of expected tokens.
Referenced by mlir::AsmParser::KeywordSwitch< ResultT >::Case().
|
pure virtual |
Emit a diagnostic at the specified location and return failure.
Referenced by buildLLVMFunctionType(), mlir::sparse_tensor::ir_detail::VarEnv::emitErrorIfAnyUnbound(), mlir::DynamicOpDefinition::get(), getChecked(), getElementType(), mlir::AsmParser::KeywordSwitch< ResultT >::operator ResultT(), mlir::affine::AffineDmaStartOp::parse(), mlir::affine::AffineDmaWaitOp::parse(), mlir::OpState::parse(), parseAllReduceOperation(), parseAndVerify(), parseAndVerifyMatrixType(), parseAndVerifySampledImageType(), parseAndVerifyType(), parseAngleBracketedEntries(), parseArithmeticExtendedBinaryOp(), parseArrayType(), mlir::OpAsmParser::parseAssignmentList(), parseAsyncDependencies(), parseAttribute(), mlir::Dialect::parseAttribute(), mlir::DynamicDialect::parseAttribute(), parseBlockArgRegion(), parseBound(), parseCallTypeAndResolveOperands(), parseClauseAttr(), parseCmpOp(), parseColonType(), parseCombinedConstructsLoop(), parseContinuousTileSizeTypes(), parseCooperativeMatrixType(), parseCustomAttributeWithFallback(), parseCustomTypeWithFallback(), parseDecimalInteger(), mlir::parseDimensionList(), mlir::parseDynamicIndexList(), parseEmitCGlobalOpTypeAndInitialValue(), mlir::spirv::parseEnumStrAttr(), parseExpressedTypeAndRange(), parseExpressionArg(), parseExtTypeParams(), parseFunctionArgumentList(), mlir::function_interface_impl::parseFunctionOp(), parseGangClause(), parseGlobalMemrefOpTypeAndInitialValue(), parseInsertExtractValueElementType(), parseInteger(), parseInterfaceVarABIAttr(), parseKeyValuePair(), parseKeyword(), parseKeywordOrString(), parseLevelRange(), mlir::sparse_tensor::ir_detail::LvlTypeParser::parseLvlType(), parseMatrixType(), mlir::polynomial::parseMonomial(), parseMultitileSizesTypes(), parseNamedStructuredOpRegion(), parseOneOpBundle(), parseOneResultSameOperandTypeOp(), parseOptionalArrayStride(), parseOptionalDecimalInteger(), parseOptionalStaticSlice(), parseOrderClause(), parseOverflowFlags(), parsePDLType(), parsePointerType(), mlir::polynomial::parsePolynomialAttr(), parseResourceHandle(), parseScheduleClause(), parseSequenceOpOperands(), parseShuffleType(), parseStorageRange(), parseStorageType(), parseString(), parseStructMemberDecorations(), parseStructType(), parseSymbolName(), parseSynchronizationHint(), parseTargetEnvAttr(), mlir::Dialect::parseType(), mlir::DynamicDialect::parseType(), parseType(), mlir::tosa::parseTypeOrAttr(), parseUniformType(), parseVerCapExtAttr(), mlir::OpAsmParser::resolveOperands(), and verifyScheduleModifiers().
|
pure virtual |
Return a builder which provides useful access to MLIRContext, global objects like types and attributes.
Referenced by buildLLVMFunctionType(), deduplicateAndResolveOperands(), mlir::affine::AffineDmaStartOp::parse(), mlir::affine::AffineDmaWaitOp::parse(), parseAffineMapWithMinMax(), parseAffineMinMaxOp(), parseAsyncDependencies(), parseAttributesOp(), parseAttributions(), parseBound(), parseCmpOp(), parseCommonStructuredOpParts(), parseCreateOperationOpAttributes(), parseCreateOperationOpResults(), mlir::affine::parseDimAndSymbolList(), mlir::parseDynamicIndexList(), mlir::spirv::parseEnumStrAttr(), parseForeachMatchSymbols(), mlir::function_interface_impl::parseFunctionOp(), parseInterfaceVarABIAttr(), parseLevelRange(), parseMapClause(), parseMembersIndex(), parseOffloadingHandler(), parseOperationOpAttributes(), mlir::impl::parseOptionalVisibilityKeyword(), mlir::transform::parsePackedOrDynamicIndexList(), parseResultsValueType(), parseScheduleClause(), parseStorageType(), parseSwitchCases(), parseSynchronizationHint(), mlir::transform::parseTransformMatchDims(), parseValuesWithVariadicity(), parseValueWithVariadicity(), and parseVerCapExtAttr().
|
inline |
A variant of getChecked
that uses the result of getNameLoc
to emit errors.
Definition at line 941 of file OpImplementation.h.
References emitError(), and getNameLoc().
|
inline |
Invoke the getChecked
method of the given Attribute or Type class, using the provided location to emit errors in the case of failure.
Note that unlike OpBuilder::getType
, this method does not implicitly insert a context parameter.
Definition at line 934 of file OpImplementation.h.
References emitError().
Referenced by mlir::DynamicAttr::parse(), mlir::DynamicType::parse(), parseAnyType(), parseCalibratedType(), and parseUniformType().
MLIRContext * AsmParser::getContext | ( | ) | const |
Definition at line 73 of file AsmPrinter.cpp.
Referenced by addBodyWithPayloadOp(), deduplicateAndResolveOperands(), mlir::FieldParser< AttributeT, std::enable_if_t< std::is_base_of< Attribute, AttributeT >::value, AttributeT > >::parse(), mlir::FieldParser< std::optional< AttributeT >, std::enable_if_t< std::is_base_of< Attribute, AttributeT >::value, std::optional< AttributeT > > >::parse(), mlir::detail::DenseArrayAttrImpl< T >::parse(), parseAffineMapWithMinMax(), parseAllReduceOperation(), parseAngleBracketedEntries(), parseCaptureType(), parseClauseAttr(), parseClauseWithRegionArgs(), parseCombinedConstructsLoop(), parseCommonStructuredOpParts(), parseCopyprivate(), parseDependVarList(), parseDeviceTypeArrayAttr(), parseDeviceTypeOperandsWithKeywordOnly(), parseDeviceTypeOperandsWithSegment(), mlir::parseDimensionList(), parseGangClause(), parseGEPIndices(), parseGlobalMemrefOpTypeAndInitialValue(), mlir::spirv::parseImageOperands(), parseKeyValuePair(), parseLaunchDimType(), parseMembersIndex(), parseNamedStructuredOpRegion(), parseNumGangs(), parseOneOpBundle(), parseOpBundles(), parseOrderClause(), parseResourceHandle(), parseRoutineGangClause(), parseScheduleClause(), parseSymOperandList(), parseWaitClause(), and mlir::detail::DenseArrayAttrImpl< T >::parseWithoutBraces().
|
pure virtual |
Get the location of the next token and store it into the argument.
This always succeeds.
Referenced by mlir::DynamicOpDefinition::get(), getCurrentLocation(), parseAllReduceOperation(), parseAndVerify(), parseAndVerifyMatrixType(), parseAndVerifySampledImageType(), parseAndVerifyType(), parseArithmeticExtendedBinaryOp(), parseArrayType(), mlir::OpAsmParser::parseAssignmentList(), parseAsyncDependencies(), parseAttribute(), mlir::DynamicDialect::parseAttribute(), parseBlockArgRegion(), parseBound(), parseCallTypeAndResolveOperands(), parseClauseAttr(), parseCmpOp(), parseColonType(), parseCombinedConstructsLoop(), parseCommonStructuredOpParts(), parseContinuousTileSizeTypes(), parseCooperativeMatrixType(), parseCustomAttributeWithFallback(), parseCustomTypeWithFallback(), parseDecimalInteger(), mlir::parseDimensionList(), mlir::spirv::parseEnumStrAttr(), parseExpressedTypeAndRange(), parseExpressionArg(), parseExtTypeParams(), parseFunctionArgumentList(), mlir::function_interface_impl::parseFunctionOp(), parseGangClause(), parseInsertExtractValueElementType(), parseInteger(), parseInterfaceVarABIAttr(), parseKeyValuePair(), parseKeyword(), parseKeywordOrString(), mlir::sparse_tensor::ir_detail::LvlTypeParser::parseLvlType(), parseMatrixType(), mlir::polynomial::parseMonomial(), parseMultitileSizesTypes(), parseNamedStructuredOpRegion(), parseOneOpBundle(), parseOneResultSameOperandTypeOp(), parseOptionalArrayStride(), parseOptionalDecimalInteger(), parseOptionalStaticSlice(), parseOrderClause(), parseOverflowFlags(), parsePointerType(), mlir::polynomial::parsePolynomialAttr(), parseResourceHandle(), parseScheduleClause(), parseShuffleType(), parseStorageRange(), parseStorageType(), parseString(), parseStructMemberDecorations(), parseSymbolName(), parseSynchronizationHint(), parseTargetEnvAttr(), mlir::DynamicDialect::parseType(), parseType(), mlir::tosa::parseTypeOrAttr(), parseUniformType(), and parseVerCapExtAttr().
|
inline |
Definition at line 570 of file OpImplementation.h.
References getCurrentLocation().
|
pure virtual |
Re-encode the given source location as an MLIR location and return it.
Note: This method should only be used when a Location
is necessary, as the encoding process is not efficient.
Referenced by mlir::sparse_tensor::ir_detail::VarInfo::getLocation(), and minSMLoc().
|
pure virtual |
Return the location of the original name token.
Referenced by getChecked(), mlir::affine::AffineDmaStartOp::parse(), mlir::affine::AffineDmaWaitOp::parse(), mlir::OpState::parse(), parseAngleBracketedEntries(), mlir::Dialect::parseAttribute(), parseBound(), parseCallTypeAndResolveOperands(), mlir::parseDynamicIndexList(), parseEmitCGlobalOpTypeAndInitialValue(), parseGlobalMemrefOpTypeAndInitialValue(), parseLevelRange(), parsePDLType(), parseScheduleClause(), parseSequenceOpOperands(), parseStructType(), mlir::Dialect::parseType(), and verifyScheduleModifiers().
|
pure virtual |
Parse an affine expr instance into 'expr' using the already computed mapping from symbols to affine expressions in 'symbolSet'.
|
pure virtual |
Parse an affine map instance into 'map'.
Referenced by mlir::FieldParser< AffineMap >::parse().
|
pure virtual |
Parse a '->' token.
Referenced by parseAllocateAndAllocator(), mlir::sparse_tensor::ir_detail::DimLvlMapParser::parseDimLvlMap(), parseForeachMatchSymbols(), parseResultsValueType(), mlir::parseSemiFunctionType(), and parseTokenOrdering().
|
pure virtual |
Parse an arrow followed by a type list.
|
inline |
Parse an arbitrary attribute and return it in result.
This also adds the attribute to the specified attribute list with the specified name.
Definition at line 979 of file OpImplementation.h.
References parseAttribute().
|
pure virtual |
Parse an arbitrary attribute of a given type and return it in result.
Referenced by mlir::OpState::genericParseProperties(), parseAffineMinMaxOp(), parseAttribute(), parseAttributesOp(), parseBound(), parseCmpOp(), parseCommonStructuredOpParts(), parseCreateOperationOpAttributes(), parseCustomAttributeWithFallback(), parseDeviceTypeOperandsWithSegment(), parseEmitCGlobalOpTypeAndInitialValue(), mlir::spirv::parseEnumStrAttr(), parseGangClause(), parseGlobalMemrefOpTypeAndInitialValue(), parseKeyValuePair(), parseNumGangs(), parseOffloadingHandler(), parseOperationOpAttributes(), parseTargetEnvAttr(), parseTypedInitialValue(), mlir::tosa::parseTypeOrAttr(), parseWaitClause(), and typeOrAttrParser().
|
inline |
Parse an attribute of a specific kind and type.
Definition at line 986 of file OpImplementation.h.
References parseAttribute().
|
inline |
Parse an arbitrary attribute of a given type and populate it in result
.
This also adds the attribute to the specified attribute list with the specified name.
Definition at line 995 of file OpImplementation.h.
References mlir::NamedAttrList::append(), emitError(), getCurrentLocation(), and parseAttribute().
|
inline |
Parse an attribute of a specific kind and type.
Definition at line 962 of file OpImplementation.h.
|
pure virtual |
Parses a Base64 encoded string of bytes.
|
pure virtual |
Parse a :
token.
Referenced by parseArithmeticExtendedBinaryOp(), parseClauseWithRegionArgs(), parseCmpOp(), parseExpressedTypeAndRange(), parseOneOpBundle(), parseOneResultSameOperandTypeOp(), parseSequenceOpOperands(), parseStorageRange(), parseSwitchOpCases(), parseUniformType(), and parseWaitClause().
|
pure virtual |
Parse a colon followed by a type.
Referenced by mlir::affine::AffineDmaWaitOp::parse(), parseAllocateAndAllocator(), parseColonType(), mlir::parseDynamicIndexList(), parseGangValue(), parseLaunchFuncOperands(), parseLinearClause(), parseOneResultSameOperandTypeOp(), mlir::transform::parsePackedOrDynamicIndexList(), parseRangeType(), parseScheduleClause(), parseTypedInitialValue(), and mlir::tosa::parseTypeOrAttr().
|
inline |
Parse a colon followed by a type of a specific kind, e.g. a FunctionType.
Definition at line 1298 of file OpImplementation.h.
References emitError(), getCurrentLocation(), and parseColonType().
|
pure virtual |
Parse a colon followed by a type list, which must have at least one type.
Referenced by mlir::affine::AffineDmaStartOp::parse(), parseCallTypeAndResolveOperands(), parseCommonStructuredOpParts(), parseCreateOperationOpResults(), parseLoopControl(), and parseSwitchOpCases().
|
pure virtual |
Parse a ,
token.
Referenced by mlir::affine::AffineDmaStartOp::parse(), mlir::affine::AffineDmaWaitOp::parse(), parseCmpOp(), parseCooperativeMatrixType(), parseDeviceTypeOperandsWithKeywordOnly(), parseInterfaceVarABIAttr(), parsePointerType(), parseRoutineGangClause(), parseSequenceOpOperands(), parseSizeAssignment(), parseStructMemberDecorations(), parseStructType(), parseTargetEnvAttr(), parseUniformType(), parseVerCapExtAttr(), parseWaitClause(), and typeOrAttrParser().
|
pure virtual |
Parse a list of comma-separated items with an optional delimiter.
If a delimiter is provided, then an empty list is allowed. If not, then at least one element will be parsed.
contextMessage is an optional message appended to "expected '('" sorts of diagnostics when parsing the delimeters.
Referenced by mlir::FieldParser< ContainerT, std::enable_if_t< llvm::is_detected< detail::has_push_back_t, ContainerT >::value, ContainerT > >::parse(), parseAffineMapWithMinMax(), parseAlignedClause(), parseAllocateAndAllocator(), parseAngleBracketedEntries(), parseAttributesOp(), parseBindName(), parseClauseWithRegionArgs(), parseCommaSeparatedList(), parseCopyprivate(), parseCreateOperationOpAttributes(), parseDependVarList(), parseDeviceTypeArrayAttr(), parseDeviceTypeOperands(), parseDeviceTypeOperandsWithKeywordOnly(), parseDeviceTypeOperandsWithSegment(), mlir::parseDynamicIndexList(), parseExpressionArg(), parseExtTypeParams(), parseFunctionArgumentList(), parseFunctionResultList(), parseGangClause(), parseGEPIndices(), parseKeywordList(), parseLaunchFuncOperands(), parseLinearClause(), mlir::sparse_tensor::ir_detail::LvlTypeParser::parseLvlType(), parseMapClause(), parseMembersIndex(), parseNumGangs(), parseOpBundles(), parseOperationOpAttributes(), parseRoutineGangClause(), parseStructMemberDecorations(), parseSwitchOpCases(), parseSymOperandList(), parseSynchronizationHint(), mlir::transform::parseTransformMatchDims(), parseValuesWithVariadicity(), parseWaitClause(), and mlir::detail::DenseArrayAttrImpl< T >::parseWithoutBraces().
|
inline |
Parse a comma separated list of elements that must have at least one entry in it.
Definition at line 810 of file OpImplementation.h.
References None, and parseCommaSeparatedList().
|
pure virtual |
Parse a custom attribute with the provided callback, unless the next token is #
, in which case the generic parser is invoked.
Referenced by mlir::FieldParser< AttributeT, std::enable_if_t< std::is_base_of< Attribute, AttributeT >::value, AttributeT > >::parse(), and parseCustomAttributeWithFallback().
|
inline |
Parse a custom attribute of a given type unless the next token is #
, in which case the generic parser is invoked.
The parsed attribute is populated in result
and also added to the specified attribute list with the specified name.
Definition at line 1026 of file OpImplementation.h.
References mlir::NamedAttrList::append(), emitError(), getCurrentLocation(), mlir::query::parse(), and parseCustomAttributeWithFallback().
|
inline |
SFINAE parsing method for Attribute that don't implement a parse method.
Definition at line 1053 of file OpImplementation.h.
References parseAttribute().
|
inline |
Parse a custom attribute of a given type unless the next token is #
, in which case the generic parser is invoked.
The parsed attribute is populated in result
.
Definition at line 1063 of file OpImplementation.h.
|
inline |
SFINAE parsing method for Attribute that don't implement a parse method.
Definition at line 1085 of file OpImplementation.h.
|
pure virtual |
Parse a custom type with the provided callback, unless the next token is #
, in which case the generic parser is invoked.
Referenced by mlir::FieldParser< TypeT, std::enable_if_t< std::is_base_of< Type, TypeT >::value, TypeT > >::parse(), and parseCustomTypeWithFallback().
|
inline |
Parse a custom Type of a given type unless the next token is #
, in which case the generic parser is invoked.
The parsed Type is populated in result
.
Definition at line 1258 of file OpImplementation.h.
References emitError(), getCurrentLocation(), mlir::query::parse(), and parseCustomTypeWithFallback().
|
inline |
SFINAE parsing method for Type that don't implement a parse method.
Definition at line 1279 of file OpImplementation.h.
References parseType().
|
inline |
Parse a decimal integer value from the stream.
Definition at line 725 of file OpImplementation.h.
References emitError(), getCurrentLocation(), mlir::OptionalParseResult::has_value(), and parseOptionalDecimalInteger().
|
pure virtual |
Parse a dimension list of a tensor or memref type.
This populates the dimension list, using ShapedType::kDynamic for the ?
dimensions if allowDynamic
is set and errors out on ?
otherwise. Parsing the trailing x
is configurable.
dimension-list ::= eps | dimension (x
dimension)* dimension-list-with-trailing-x ::= (dimension x
)* dimension ::= ?
| decimal-literal
When allowDynamic
is not set, this is used to parse:
static-dimension-list ::= eps | decimal-literal (x
decimal-literal)* static-dimension-list-with-trailing-x ::= (dimension x
)*
Referenced by parseArrayType(), parseCooperativeMatrixType(), mlir::parseDimensionList(), and parseMatrixType().
|
pure virtual |
Parse a ...
token.
|
pure virtual |
Parse a =
token.
Referenced by parseAttributesOp(), parseCreateOperationOpAttributes(), parseDenseI64ArrayAttr(), parseGangValue(), parseKeyValuePair(), parseLinearClause(), parseLoopControl(), parseOperationOpAttributes(), parseOptionalArrayStride(), parseSizeAssignment(), and parseTargetEnvAttr().
|
pure virtual |
Parse a floating point value into APFloat from the stream.
|
pure virtual |
Parse a floating point value from the stream.
Referenced by parseExpressedTypeAndRange(), and parseQuantParams().
|
pure virtual |
Parse a '>' token.
Referenced by mlir::OpState::genericParseProperties(), parseAnyType(), parseArrayType(), parseCalibratedType(), parseCommonStructuredOpParts(), parseCooperativeMatrixType(), parseCreateOperationOpResults(), parseExpressedTypeAndRange(), parseImageType(), parseInterfaceVarABIAttr(), parseMatrixType(), parseOffloadingHandler(), parseOverflowFlags(), parsePointerType(), parseRuntimeArrayType(), parseSampledImageType(), parseStorageRange(), parseStructType(), parseTargetEnvAttr(), parseUniformType(), and parseVerCapExtAttr().
|
inline |
Parse an integer value from the stream.
Definition at line 715 of file OpImplementation.h.
References emitError(), getCurrentLocation(), mlir::OptionalParseResult::has_value(), and parseOptionalInteger().
Referenced by mlir::FieldParser< IntT, std::enable_if_t< std::is_integral< IntT >::value, IntT > >::parse(), parseAndVerify< unsigned >(), mlir::parseDynamicIndexList(), parseExpressionArg(), parseLevelRange(), parseMembersIndex(), mlir::polynomial::parseMonomial(), parseQuantParams(), parseStorageRange(), parseSwitchCases(), parseSwitchOpCases(), parseTargetEnvAttr(), mlir::transform::parseTransformMatchDims(), parseUniformType(), and mlir::detail::DenseArrayAttrImpl< int32_t >::printWithoutBraces().
|
pure virtual |
Parse an integer set instance into 'set'.
|
inline |
Parse a keyword into 'keyword'.
Definition at line 895 of file OpImplementation.h.
References emitError(), getCurrentLocation(), and parseOptionalKeyword().
|
inline |
Parse a given keyword.
Definition at line 889 of file OpImplementation.h.
Referenced by parseAndVerify(), mlir::DynamicDialect::parseAttribute(), parseCaptureType(), parseClauseAttr(), parseCreateOperationOpResults(), parseDenseI64ArrayAttr(), parseInterfaceVarABIAttr(), parseKeywordType(), parseLoopControl(), parseMapClause(), parseOptionalArrayStride(), parseOrderClause(), parseOverflowFlags(), parsePointerType(), parseScheduleClause(), parseSizeAssignment(), parseStorageType(), parseSwitchOpCases(), parseSynchronizationHint(), parseTargetEnvAttr(), mlir::DynamicDialect::parseType(), and parseVerCapExtAttr().
|
pure virtual |
|
protectedpure virtual |
Parse a keyword, or an empty string if the current location signals a code completion.
Referenced by mlir::AsmParser::KeywordSwitch< ResultT >::KeywordSwitch().
|
inline |
Parse a keyword or a quoted string.
Definition at line 915 of file OpImplementation.h.
References emitError(), getCurrentLocation(), and parseOptionalKeywordOrString().
|
inline |
Parse a keyword followed by a type.
Definition at line 1323 of file OpImplementation.h.
References parseKeyword(), and parseType().
|
pure virtual |
Parse a {
token.
Referenced by parseDeviceTypeOperandsWithSegment(), parseGangClause(), parseNumGangs(), parseUniformType(), and parseWaitClause().
|
pure virtual |
Parse a '<' token.
Referenced by parseAnyType(), parseArrayType(), parseCalibratedType(), parseCooperativeMatrixType(), parseExpressedTypeAndRange(), parseImageType(), parseInterfaceVarABIAttr(), parseMatrixType(), parseOverflowFlags(), parsePointerType(), parseRuntimeArrayType(), parseSampledImageType(), parseStructType(), parseTargetEnvAttr(), parseUniformType(), and parseVerCapExtAttr().
|
pure virtual |
Parse a (
token.
Referenced by parseAffineMapWithMinMax(), parseClauseWithRegionArgs(), parseCombinedConstructsLoop(), parseCommonStructuredOpParts(), parseCreateOperationOpResults(), parseInterfaceVarABIAttr(), parseLoopControl(), parseOneOpBundle(), mlir::transform::parsePackedOrDynamicIndexList(), mlir::parseSemiFunctionType(), parseSizeAssignment(), parseStructType(), parseTokenOrdering(), and mlir::transform::parseTransformMatchDims().
|
pure virtual |
Parse a [
token.
Referenced by mlir::detail::DenseArrayAttrImpl< T >::parse(), parseKeywordList(), parseMembersIndex(), and parseSwitchOpCases().
|
pure virtual |
Parse a '-' token.
|
pure virtual |
Parse a '->' token if present.
Referenced by parseCreateOperationOpResults(), and mlir::function_interface_impl::parseFunctionSignature().
|
pure virtual |
Parse an optional arrow followed by a type list.
Referenced by parseNamedStructuredOpResults().
|
pure virtual |
Parse a named dictionary into 'result' if it is present.
Referenced by parseAffineMinMaxOp(), parseArithmeticExtendedBinaryOp(), parseCmpOp(), parseCommonStructuredOpParts(), parseDstStyleOp(), parseNamedStructuredOp(), and parseOneResultSameOperandTypeOp().
|
pure virtual |
Parse a named dictionary into 'result' if the attributes
keyword is present.
Referenced by mlir::function_interface_impl::parseFunctionOp().
|
pure virtual |
Parse an optional array attribute and return it in result.
|
pure virtual |
Parse an arbitrary optional attribute of a given type and return it in result.
Referenced by mlir::FieldParser< std::optional< AttributeT >, std::enable_if_t< std::is_base_of< Attribute, AttributeT >::value, std::optional< AttributeT > > >::parse(), and parseOptionalAttribute().
|
inline |
Parse an optional attribute of a specific type and add it to the list with the specified name.
Definition at line 1109 of file OpImplementation.h.
References parseOptionalAttribute().
|
inline |
Parse an optional attribute of a specific type and add it to the list with the specified name.
Definition at line 1118 of file OpImplementation.h.
References mlir::NamedAttrList::append(), mlir::OptionalParseResult::has_value(), and parseOptionalAttribute().
|
pure virtual |
Parse an optional string attribute and return it in result.
|
pure virtual |
Parse an optional symbol ref attribute and return it in result.
|
pure virtual |
Parse a :
token if present.
Referenced by parseAnyType(), parseLaunchDimType(), parseOrderClause(), parseQuantParams(), parseTargetEnvAttr(), and parseUniformType().
|
pure virtual |
Parse an optional colon followed by a type list, which if present must have at least one type.
|
pure virtual |
Parse a ,
token if present.
Referenced by parseDeviceTypeOperandsWithSegment(), parseForeachMatchSymbols(), parseFunctionTypes(), parseGangClause(), parseInterfaceVarABIAttr(), parseMembersIndex(), parseNumGangs(), parseOptionalArrayStride(), parseOverflowFlags(), parseScheduleClause(), parseSequenceOpOperands(), parseStructType(), parseSwitchOpCases(), mlir::OpAsmParser::parseTrailingOperandList(), parseUniformType(), and parseWaitClause().
|
pure virtual |
References emitError(), getCurrentLocation(), and mlir::OptionalParseResult::has_value().
Referenced by parseDecimalInteger(), and parseOptionalDecimalInteger().
|
inline |
Definition at line 767 of file OpImplementation.h.
References parseOptionalDecimalInteger().
|
pure virtual |
Parse a ...
token if present;.
Referenced by parseFunctionArgumentList(), and parseFunctionTypes().
|
pure virtual |
Parse a =
token if present.
Referenced by parseEmitCGlobalOpTypeAndInitialValue(), parseGlobalMemrefOpTypeAndInitialValue(), parseScheduleClause(), parseStructMemberDecorations(), and mlir::tosa::parseTypeOrAttr().
|
pure virtual |
Parse a '>' token if present.
Referenced by mlir::polynomial::parsePolynomialAttr(), parseStructType(), and typeOrAttrParser().
|
pure virtual |
Parse an optional integer value from the stream.
Referenced by mlir::FieldParser< std::optional< IntT >, std::enable_if_t< std::is_integral< IntT >::value, std::optional< IntT > > >::parse(), parseExtTypeParams(), parseGEPIndices(), parseInteger(), parseInterfaceVarABIAttr(), parseOptionalInteger(), parseOptionalStaticSlice(), and parseStructMemberDecorations().
|
inline |
Definition at line 761 of file OpImplementation.h.
References parseOptionalInteger().
|
pure virtual |
Parse a keyword, if present, into 'keyword'.
|
pure virtual |
Parse a keyword, if present, and if one of the 'allowedValues', into 'keyword'.
|
pure virtual |
Parse the given keyword if present.
Referenced by parseAffineMapWithMinMax(), parseAllReduceOperation(), parseAsyncDependencies(), parseAttributions(), parseBlockArgClause(), parseBound(), parseCombinedConstructsLoop(), parseCommonStructuredOpParts(), parseExpressionArg(), parseGangValue(), parseGlobalMemrefOpTypeAndInitialValue(), parseKeyword(), parseLaunchFuncOperands(), parseLevelRange(), parseLoopControl(), mlir::sparse_tensor::ir_detail::LvlTypeParser::parseLvlType(), mlir::polynomial::parseMonomial(), parseOptionalKeywordAlternative(), mlir::impl::parseOptionalVisibilityKeyword(), parseOverflowFlags(), parseStructType(), parseSwitchCases(), parseSymbolVisibility(), parseSynchronizationHint(), parseTargetEnvAttr(), parseTokenOrdering(), mlir::transform::parseTransformMatchDims(), parseValueWithVariadicity(), and parseWaitClause().
|
pure virtual |
Parse an optional keyword or string.
Referenced by parseKeywordOrString().
|
pure virtual |
Parse a {
token if present.
Referenced by parseAttributesOp(), parseCreateOperationOpAttributes(), and parseOperationOpAttributes().
|
pure virtual |
Parse a '<' token if present.
Referenced by mlir::OpState::genericParseProperties(), parseCommonStructuredOpParts(), parseCreateOperationOpResults(), parseOffloadingHandler(), parseStorageRange(), and typeOrAttrParser().
|
pure virtual |
Parse a (
token if present.
Referenced by parseDeviceTypeArrayAttr(), parseDeviceTypeOperandsWithKeywordOnly(), parseFunctionResultList(), parseGangClause(), parseOneResultSameOperandTypeOp(), parseRoutineGangClause(), mlir::parseSemiFunctionType(), parseSequenceOpOperands(), parseSwitchOpCases(), parseTokenOrdering(), parseTypedInitialValue(), and parseWaitClause().
|
pure virtual |
Parse a [
token if present.
Referenced by parseDeviceTypeArrayAttr(), parseDeviceTypeOperandsWithKeywordOnly(), parseDeviceTypeOperandsWithSegment(), mlir::parseDimensionList(), mlir::parseDynamicIndexList(), parseGangClause(), mlir::spirv::parseImageOperands(), parseNumGangs(), parseOpBundles(), parseRoutineGangClause(), parseStructType(), and parseWaitClause().
|
pure virtual |
Parse a '-' token if present.
|
pure virtual |
Parse a '+' token if present.
Referenced by mlir::polynomial::parseMonomial().
|
pure virtual |
Parse a '?' token if present.
|
pure virtual |
Parse a }
token if present.
|
pure virtual |
Parse a )
token if present.
Referenced by parseAffineMapWithMinMax(), parseFunctionResultList(), parseFunctionTypes(), parseOneOpBundle(), parseSequenceOpOperands(), and parseStructType().
|
pure virtual |
Parse a ]
token if present.
Referenced by mlir::detail::DenseArrayAttrImpl< T >::parse(), mlir::parseDynamicIndexList(), parseKeywordList(), parseOpBundles(), parseStructMemberDecorations(), and parseSwitchOpCases().
|
pure virtual |
Parse a '*' token if present.
Referenced by mlir::polynomial::parseMonomial(), and mlir::transform::parsePackedOrDynamicIndexList().
|
pure virtual |
Parse a quoted string token if present.
Referenced by parseKeyValuePair(), and parseString().
|
pure virtual |
Parse an optional -identifier and store it (without the '@' symbol) in a string attribute.
Referenced by parseOptionalSymbolName(), and parseSymbolName().
|
inline |
Parse an optional -identifier and store it (without the '@' symbol) in a string attribute named 'attrName'.
Definition at line 1176 of file OpImplementation.h.
References mlir::NamedAttrList::append(), and parseOptionalSymbolName().
|
pure virtual |
Parse an optional type.
Referenced by parseKeyValuePair(), and parseStorageType().
|
pure virtual |
Parse a '|' token if present.
|
pure virtual |
Parse a '+' token.
|
pure virtual |
Parse a '?' token.
Referenced by parseOptionalStaticSlice().
|
pure virtual |
Parse a }
token.
Referenced by parseAttributesOp(), parseCreateOperationOpAttributes(), parseDeviceTypeOperandsWithSegment(), parseGangClause(), parseNumGangs(), parseOperationOpAttributes(), parseUniformType(), and parseWaitClause().
|
inline |
Parse a handle to a resource within the assembly format.
Definition at line 1191 of file OpImplementation.h.
References emitError(), getContext(), getCurrentLocation(), and mlir::MLIRContext::getOrLoadDialect().
|
protectedpure virtual |
Parse a handle to a resource within the assembly format for the given dialect.
|
pure virtual |
Parse a )
token.
Referenced by parseAffineMapWithMinMax(), parseClauseWithRegionArgs(), parseCombinedConstructsLoop(), parseCommonStructuredOpParts(), parseCreateOperationOpResults(), parseDeviceTypeArrayAttr(), parseFunctionResultList(), parseFunctionTypes(), parseGangClause(), parseInterfaceVarABIAttr(), parseLoopControl(), parseOneOpBundle(), parseOneResultSameOperandTypeOp(), mlir::transform::parsePackedOrDynamicIndexList(), mlir::parseSemiFunctionType(), parseSizeAssignment(), parseStructType(), parseSwitchOpCases(), parseTokenOrdering(), mlir::transform::parseTransformMatchDims(), parseTypedInitialValue(), and parseWaitClause().
|
pure virtual |
Parse a ]
token.
Referenced by mlir::detail::DenseArrayAttrImpl< T >::parse(), parseDeviceTypeArrayAttr(), parseDeviceTypeOperandsWithKeywordOnly(), parseDeviceTypeOperandsWithSegment(), mlir::parseDimensionList(), parseGangClause(), mlir::spirv::parseImageOperands(), parseKeywordList(), parseMembersIndex(), parseNumGangs(), parseOpBundles(), parseRoutineGangClause(), parseStructMemberDecorations(), parseSwitchOpCases(), and parseWaitClause().
|
pure virtual |
Parse a '*' token.
Referenced by mlir::polynomial::parseMonomial().
|
inline |
Parse a quoted string token.
Definition at line 663 of file OpImplementation.h.
References emitError(), getCurrentLocation(), and parseOptionalString().
Referenced by mlir::FieldParser< std::string >::parse(), and parseOneOpBundle().
|
inline |
Parse an -identifier and store it (without the '@' symbol) in a string attribute.
Definition at line 1153 of file OpImplementation.h.
References emitError(), getCurrentLocation(), and parseOptionalSymbolName().
Referenced by parseForeachMatchSymbols(), mlir::function_interface_impl::parseFunctionOp(), and parseSymbolName().
|
inline |
Parse an -identifier and store it (without the '@' symbol) in a string attribute named 'attrName'.
Definition at line 1162 of file OpImplementation.h.
References mlir::NamedAttrList::append(), and parseSymbolName().
|
pure virtual |
Parse a type.
Referenced by parseAndVerifyMatrixType(), parseAndVerifySampledImageType(), parseAndVerifyType(), parseAnyType(), parseArithmeticExtendedBinaryOp(), parseAwaitResultType(), parseCmpOp(), parseContinuousTileSizeTypes(), parseCustomTypeWithFallback(), parseEmitCGlobalOpTypeAndInitialValue(), parseExpressedTypeAndRange(), parseFunctionResultList(), parseGlobalMemrefOpTypeAndInitialValue(), parseKeywordType(), parseLaunchDimType(), parseMultitileSizesTypes(), parseOneResultSameOperandTypeOp(), parseResultsValueType(), mlir::parseSemiFunctionType(), parseSequenceOpOperands(), parseStructType(), parseTokenOrdering(), parseType(), and parseUniformType().
|
inline |
Parse a type of a specific type.
Definition at line 1229 of file OpImplementation.h.
References emitError(), getCurrentLocation(), and parseType().
ParseResult AsmParser::parseTypeList | ( | SmallVectorImpl< Type > & | result | ) |
Parse a type list.
This is out-of-line to work-around https://github.com/llvm/llvm-project/issues/62918
Definition at line 77 of file AsmPrinter.cpp.
References mlir::detail::pass_options::parseCommaSeparatedList(), and mlir::parseType().
Referenced by parseOneOpBundle(), mlir::parseSemiFunctionType(), and parseSequenceOpOperands().
|
pure virtual |
Parse a '|' token.
|
pure virtual |
Parse an 'x' token in a dimension list, handling the case where the x is juxtaposed with an element type, as in "xf32", leaving the "f32" as the next token.
|
protectedpure virtual |
Removes the element that was last inserted with a successful call to pushCyclicParsing
.
There must be exactly one popCyclicParsing
call in reverse order of all successful pushCyclicParsing
.
Referenced by mlir::AsmParser::CyclicParseReset::~CyclicParseReset().
|
protectedpure virtual |
Pushes a new attribute or type in the form of a type erased pointer into an internal set.
Returns success if the type or attribute was inserted in the set or failure if it was already contained.
Referenced by tryStartCyclicParse().
|
inline |
Attempts to start a cyclic parsing region for attrOrType
.
A cyclic parsing region starts with this call and ends with the destruction of the returned CyclicParseReset
. During this time, calling tryStartCyclicParse
with the same attribute in any parser will lead to returning failure.
This makes it possible to parse cyclic attributes or types by parsing a short from if nested within itself.
Definition at line 1398 of file OpImplementation.h.
References pushCyclicParsing().
Referenced by parseStructType().