29static ::mlir::LogicalResult __mlir_ods_local_type_constraint_Ops0(
30 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
31 unsigned valueIndex) {
32 if (!((::llvm::isa<::mlir::IndexType>(type)))) {
33 return op->emitOpError(valueKind) <<
" #" << valueIndex
34 <<
" must be variadic of index, but got " << type;
36 return ::mlir::success();
39static ::mlir::LogicalResult __mlir_ods_local_type_constraint_Ops1(
40 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
41 unsigned valueIndex) {
42 if (!((::llvm::isa<::mlir::IndexType>(type)))) {
43 return op->emitOpError(valueKind) <<
" #" << valueIndex
44 <<
" must be index, but got " << type;
46 return ::mlir::success();
49static ::mlir::LogicalResult __mlir_ods_local_type_constraint_Ops2(
50 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
51 unsigned valueIndex) {
53 return op->emitOpError(valueKind) <<
" #" << valueIndex
54 <<
" must be integral, felt, or typevar type, but got " << type;
56 return ::mlir::success();
59static ::mlir::LogicalResult __mlir_ods_local_type_constraint_Ops3(
60 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
61 unsigned valueIndex) {
63 return op->emitOpError(valueKind) <<
" #" << valueIndex
64 <<
" must be a valid LLZK type, but got " << type;
66 return ::mlir::success();
69static ::mlir::LogicalResult __mlir_ods_local_attr_constraint_Ops0(
70 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
71 if (attr && !((::llvm::isa<::mlir::AffineMapAttr>(attr))))
72 return emitError() <<
"attribute '" << attrName
73 <<
"' failed to satisfy constraint: AffineMap attribute";
74 return ::mlir::success();
76static ::mlir::LogicalResult __mlir_ods_local_attr_constraint_Ops0(
77 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
78 return __mlir_ods_local_attr_constraint_Ops0(attr, attrName, [op]() {
79 return op->emitOpError();
83static ::mlir::LogicalResult __mlir_ods_local_attr_constraint_Ops1(
84 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
85 if (attr && !(((::llvm::isa<::mlir::IntegerAttr>(attr))) && ((::llvm::isa<::mlir::IndexType>(::llvm::cast<::mlir::IntegerAttr>(attr).getType())))))
86 return emitError() <<
"attribute '" << attrName
87 <<
"' failed to satisfy constraint: index attribute";
88 return ::mlir::success();
90static ::mlir::LogicalResult __mlir_ods_local_attr_constraint_Ops1(
91 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
92 return __mlir_ods_local_attr_constraint_Ops1(attr, attrName, [op]() {
93 return op->emitOpError();
97static ::mlir::LogicalResult __mlir_ods_local_attr_constraint_Ops2(
98 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
99 if (attr && !((::llvm::isa<::mlir::FlatSymbolRefAttr>(attr))))
100 return emitError() <<
"attribute '" << attrName
101 <<
"' failed to satisfy constraint: flat symbol reference attribute";
102 return ::mlir::success();
104static ::mlir::LogicalResult __mlir_ods_local_attr_constraint_Ops2(
105 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
106 return __mlir_ods_local_attr_constraint_Ops2(attr, attrName, [op]() {
107 return op->emitOpError();
127 bool isVariadic[] = {
true};
128 int prevVariadicCount = 0;
129 for (
unsigned i = 0; i < index; ++i)
130 if (isVariadic[i]) ++prevVariadicCount;
134 int variadicSize = (odsOperandsSize - 0) / 1;
139 int start = index + (variadicSize - 1) * prevVariadicCount;
140 int size = isVariadic[index] ? variadicSize : 1;
141 return {start, size};
149 auto attr = ::llvm::cast<::mlir::AffineMapAttr>(
getProperties().map);
155 return attr.getValue();
159 auto attr = ::llvm::cast<::mlir::IntegerAttr>(
getProperties().numDims);
165 return attr.getValue();
173 if (!tblgen_map)
return emitError(loc,
"'poly.applymap' op ""requires attribute 'map'");
175 if (!tblgen_numDims)
return emitError(loc,
"'poly.applymap' op ""requires attribute 'numDims'");
177 if (tblgen_map && !((::llvm::isa<::mlir::AffineMapAttr>(tblgen_map))))
178 return emitError(loc,
"'poly.applymap' op ""attribute 'map' failed to satisfy constraint: AffineMap attribute");
180 if (tblgen_numDims && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_numDims))) && ((::llvm::isa<::mlir::IndexType>(::llvm::cast<::mlir::IntegerAttr>(tblgen_numDims).getType())))))
181 return emitError(loc,
"'poly.applymap' op ""attribute 'numDims' failed to satisfy constraint: index attribute");
182 return ::mlir::success();
186 bool isVariadic[] = {
true};
187 int prevVariadicCount = 0;
188 for (
unsigned i = 0; i < index; ++i)
189 if (isVariadic[i]) ++prevVariadicCount;
193 int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
198 int start = index + (variadicSize - 1) * prevVariadicCount;
199 int size = isVariadic[index] ? variadicSize : 1;
200 return {start, size};
205 return {std::next(getOperation()->operand_begin(), valueRange.first),
206 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
215 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
225 return {std::next(getOperation()->result_begin(), valueRange.first),
226 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
230 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
232 emitError() <<
"expected DictionaryAttr to set properties";
233 return ::mlir::failure();
237 auto &propStorage = prop.
map;
238 auto attr = dict.get(
"map");
241 emitError() <<
"expected key entry for map in DictionaryAttr to set "
243 return ::mlir::failure();
245 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
247 propStorage = convertedAttr;
249 emitError() <<
"Invalid attribute `map` in property conversion: " << attr;
250 return ::mlir::failure();
256 auto &propStorage = prop.
numDims;
257 auto attr = dict.get(
"numDims");
260 emitError() <<
"expected key entry for numDims in DictionaryAttr to set "
262 return ::mlir::failure();
264 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
266 propStorage = convertedAttr;
268 emitError() <<
"Invalid attribute `numDims` in property conversion: " << attr;
269 return ::mlir::failure();
273 return ::mlir::success();
277 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
278 ::mlir::Builder odsBuilder{ctx};
281 const auto &propStorage = prop.
map;
283 attrs.push_back(odsBuilder.getNamedAttr(
"map",
288 const auto &propStorage = prop.
numDims;
290 attrs.push_back(odsBuilder.getNamedAttr(
"numDims",
295 return odsBuilder.getDictionaryAttr(attrs);
300 return llvm::hash_combine(
301 llvm::hash_value(prop.
map.getAsOpaquePointer()),
302 llvm::hash_value(prop.
numDims.getAsOpaquePointer()));
309 if (name ==
"numDims")
316 prop.
map = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
map)>>(value);
320 if (name ==
"numDims") {
321 prop.
numDims = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
numDims)>>(value);
327 if (prop.
map) attrs.append(
"map", prop.
map);
332::mlir::LogicalResult
ApplyMapOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
335 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops0(attr,
"map", emitError)))
336 return ::mlir::failure();
341 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(attr,
"numDims", emitError)))
342 return ::mlir::failure();
344 return ::mlir::success();
348 auto &prop = state.getOrAddProperties<
Properties>(); (void)prop;
349 if (::mlir::failed(reader.readAttribute(prop.
map)))
350 return ::mlir::failure();
352 if (::mlir::failed(reader.readAttribute(prop.
numDims)))
353 return ::mlir::failure();
354 return ::mlir::success();
358 auto &prop = getProperties(); (void)prop;
359 writer.writeAttribute(prop.
map);
360 writer.writeAttribute(prop.
numDims);
364 return ::llvm::cast<::mlir::AffineMapAttr>(getProperties().map);
369 return attr.getValue();
373 return ::llvm::cast<::mlir::IntegerAttr>(getProperties().numDims);
378 return attr.getValue();
386 (*this)->setAttr(
getMapAttrName(), ::mlir::AffineMapAttr::get(attrValue));
394 (*this)->setAttr(
getNumDimsAttrName(), ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIndexType(), attrValue));
397void ApplyMapOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::AffineMapAttr map, ::mlir::ValueRange mapOperands) {
398 odsState.addOperands(mapOperands);
401 props.
setNumDims(odsBuilder.getIntegerAttr(odsBuilder.getIndexType(),
402 map.getAffineMap().getNumDims()));
403 odsState.addTypes(odsBuilder.getIndexType());
407void ApplyMapOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::AffineMap map, ::mlir::ValueRange mapOperands) {
408 build(odsBuilder, odsState, ::mlir::AffineMapAttr::get(map), mapOperands);
412void ApplyMapOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::AffineExpr expr, ::mlir::ValueRange mapOperands) {
413 auto map = ::mlir::AffineMap::inferFromExprList({expr}).front();
414 build(odsBuilder, odsState, map, mapOperands);
419 auto tblgen_map = getProperties().map; (void)tblgen_map;
420 if (!tblgen_map)
return emitOpError(
"requires attribute 'map'");
421 auto tblgen_numDims = getProperties().numDims; (void)tblgen_numDims;
422 if (!tblgen_numDims)
return emitOpError(
"requires attribute 'numDims'");
424 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops0(*
this, tblgen_map,
"map")))
425 return ::mlir::failure();
427 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(*
this, tblgen_numDims,
"numDims")))
428 return ::mlir::failure();
430 unsigned index = 0; (void)index;
433 for (
auto v : valueGroup0) {
434 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops0(*
this, v.getType(),
"operand", index++)))
435 return ::mlir::failure();
439 unsigned index = 0; (void)index;
442 for (
auto v : valueGroup0) {
443 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"result", index++)))
444 return ::mlir::failure();
447 return ::mlir::success();
452 return ::mlir::success();
453 return ::mlir::failure();
456::mlir::ParseResult
ApplyMapOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
457 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> mapOperandsOperands;
458 ::llvm::SMLoc mapOperandsOperandsLoc;
459 (void)mapOperandsOperandsLoc;
460 ::mlir::IntegerAttr numDimsAttr;
461 ::mlir::AffineMapAttr mapAttr;
463 mapOperandsOperandsLoc = parser.getCurrentLocation();
465 if (odsResult) return ::mlir::failure();
469 if (parser.parseCustomAttributeWithFallback(mapAttr, parser.getBuilder().getIndexType())) {
470 return ::mlir::failure();
474 auto loc = parser.getCurrentLocation();(void)loc;
475 if (parser.parseOptionalAttrDict(result.attributes))
476 return ::mlir::failure();
478 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
480 return ::mlir::failure();
482 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIndexType();
483 result.addTypes(odsBuildableType0);
484 if (parser.resolveOperands(mapOperandsOperands, odsBuildableType0, mapOperandsOperandsLoc, result.operands))
485 return ::mlir::failure();
486 return ::mlir::success();
493 _odsPrinter.printAttributeWithoutType(
getMapAttr());
494 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
495 elidedAttrs.push_back(
"numDims");
496 elidedAttrs.push_back(
"map");
497 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
500void ApplyMapOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
508namespace polymorphic {
530 auto attr = ::llvm::cast<::mlir::FlatSymbolRefAttr>(
getProperties().const_name);
536 return attr.getValue();
544 if (!tblgen_const_name)
return emitError(loc,
"'poly.read_const' op ""requires attribute 'const_name'");
546 if (tblgen_const_name && !((::llvm::isa<::mlir::FlatSymbolRefAttr>(tblgen_const_name))))
547 return emitError(loc,
"'poly.read_const' op ""attribute 'const_name' failed to satisfy constraint: flat symbol reference attribute");
548 return ::mlir::success();
557 return {std::next(getOperation()->operand_begin(), valueRange.first),
558 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
567 return {std::next(getOperation()->result_begin(), valueRange.first),
568 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
572 return ::llvm::cast<::mlir::Value>(*
getODSResults(0).begin());
576 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
578 emitError() <<
"expected DictionaryAttr to set properties";
579 return ::mlir::failure();
584 auto attr = dict.get(
"const_name");
587 emitError() <<
"expected key entry for const_name in DictionaryAttr to set "
589 return ::mlir::failure();
591 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
593 propStorage = convertedAttr;
595 emitError() <<
"Invalid attribute `const_name` in property conversion: " << attr;
596 return ::mlir::failure();
600 return ::mlir::success();
604 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
605 ::mlir::Builder odsBuilder{ctx};
610 attrs.push_back(odsBuilder.getNamedAttr(
"const_name",
615 return odsBuilder.getDictionaryAttr(attrs);
620 return llvm::hash_combine(
621 llvm::hash_value(prop.
const_name.getAsOpaquePointer()));
625 if (name ==
"const_name")
631 if (name ==
"const_name") {
632 prop.
const_name = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
const_name)>>(value);
641::mlir::LogicalResult
ConstReadOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
644 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(attr,
"const_name", emitError)))
645 return ::mlir::failure();
647 return ::mlir::success();
651 auto &prop = state.getOrAddProperties<
Properties>(); (void)prop;
652 if (::mlir::failed(reader.readAttribute(prop.
const_name)))
653 return ::mlir::failure();
654 return ::mlir::success();
658 auto &prop = getProperties(); (void)prop;
663 return ::llvm::cast<::mlir::FlatSymbolRefAttr>(getProperties().const_name);
668 return attr.getValue();
676 (*this)->setAttr(
getConstNameAttrName(), ::mlir::SymbolRefAttr::get(::mlir::Builder((*this)->getContext()).getContext(), attrValue));
679void ConstReadOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type val, ::mlir::FlatSymbolRefAttr const_name) {
680 odsState.getOrAddProperties<
Properties>().const_name = const_name;
681 odsState.addTypes(val);
684void ConstReadOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::FlatSymbolRefAttr const_name) {
685 odsState.getOrAddProperties<
Properties>().const_name = const_name;
686 assert(resultTypes.size() == 1u &&
"mismatched number of results");
687 odsState.addTypes(resultTypes);
690void ConstReadOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type val, ::llvm::StringRef const_name) {
691 odsState.getOrAddProperties<
Properties>().const_name = ::mlir::SymbolRefAttr::get(odsBuilder.getContext(), const_name);
692 odsState.addTypes(val);
695void ConstReadOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llvm::StringRef const_name) {
696 odsState.getOrAddProperties<
Properties>().const_name = ::mlir::SymbolRefAttr::get(odsBuilder.getContext(), const_name);
697 assert(resultTypes.size() == 1u &&
"mismatched number of results");
698 odsState.addTypes(resultTypes);
701void ConstReadOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
702 assert(operands.size() == 0u &&
"mismatched number of parameters");
703 odsState.addOperands(operands);
704 odsState.addAttributes(attributes);
705 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
706 odsState.addTypes(resultTypes);
710 auto tblgen_const_name = getProperties().const_name; (void)tblgen_const_name;
711 if (!tblgen_const_name)
return emitOpError(
"requires attribute 'const_name'");
713 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(*
this, tblgen_const_name,
"const_name")))
714 return ::mlir::failure();
716 unsigned index = 0; (void)index;
719 for (
auto v : valueGroup0) {
720 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
721 return ::mlir::failure();
724 return ::mlir::success();
732 ::mlir::FlatSymbolRefAttr const_nameAttr;
733 ::mlir::Type valRawTypes[1];
734 ::llvm::ArrayRef<::mlir::Type> valTypes(valRawTypes);
736 if (parser.parseCustomAttributeWithFallback(const_nameAttr, parser.getBuilder().getType<::mlir::NoneType>())) {
737 return ::mlir::failure();
740 if (parser.parseColon())
741 return ::mlir::failure();
745 if (parser.parseCustomTypeWithFallback(type))
746 return ::mlir::failure();
747 valRawTypes[0] = type;
750 auto loc = parser.getCurrentLocation();(void)loc;
751 if (parser.parseOptionalAttrDict(result.attributes))
752 return ::mlir::failure();
754 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
756 return ::mlir::failure();
758 result.addTypes(valTypes);
759 return ::mlir::success();
765 _odsPrinter <<
' ' <<
":";
768 auto type =
getVal().getType();
769 if (
auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
770 _odsPrinter.printStrippedAttrOrType(validType);
774 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
775 elidedAttrs.push_back(
"const_name");
776 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
784namespace polymorphic {
809 return ::mlir::success();
818 return {std::next(getOperation()->operand_begin(), valueRange.first),
819 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
828 return getOperation()->getOpOperand(range.first);
837 return {std::next(getOperation()->result_begin(), valueRange.first),
838 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
842 return ::llvm::cast<::mlir::Value>(*
getODSResults(0).begin());
845void UnifiableCastOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input) {
846 odsState.addOperands(input);
847 odsState.addTypes(result);
850void UnifiableCastOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value input) {
851 odsState.addOperands(input);
852 assert(resultTypes.size() == 1u &&
"mismatched number of results");
853 odsState.addTypes(resultTypes);
856void UnifiableCastOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
857 assert(operands.size() == 1u &&
"mismatched number of parameters");
858 odsState.addOperands(operands);
859 odsState.addAttributes(attributes);
860 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
861 odsState.addTypes(resultTypes);
866 unsigned index = 0; (void)index;
869 for (
auto v : valueGroup0) {
870 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*
this, v.getType(),
"operand", index++)))
871 return ::mlir::failure();
875 unsigned index = 0; (void)index;
878 for (
auto v : valueGroup0) {
879 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*
this, v.getType(),
"result", index++)))
880 return ::mlir::failure();
883 return ::mlir::success();
888 return ::mlir::success();
889 return ::mlir::failure();
893 ::mlir::OpAsmParser::UnresolvedOperand inputRawOperands[1];
894 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> inputOperands(inputRawOperands); ::llvm::SMLoc inputOperandsLoc;
895 (void)inputOperandsLoc;
896 ::llvm::ArrayRef<::mlir::Type> inputTypes;
897 ::llvm::ArrayRef<::mlir::Type> allResultTypes;
899 inputOperandsLoc = parser.getCurrentLocation();
900 if (parser.parseOperand(inputRawOperands[0]))
901 return ::mlir::failure();
902 if (parser.parseColon())
903 return ::mlir::failure();
905 ::mlir::FunctionType input__allResult_functionType;
906 if (parser.parseType(input__allResult_functionType))
907 return ::mlir::failure();
908 inputTypes = input__allResult_functionType.getInputs();
909 allResultTypes = input__allResult_functionType.getResults();
911 auto loc = parser.getCurrentLocation();(void)loc;
912 if (parser.parseOptionalAttrDict(result.attributes))
913 return ::mlir::failure();
915 result.addTypes(allResultTypes);
916 if (parser.resolveOperands(inputOperands, inputTypes, inputOperandsLoc, result.operands))
917 return ::mlir::failure();
918 return ::mlir::success();
924 _odsPrinter <<
' ' <<
":";
926 _odsPrinter.printFunctionalType(::llvm::ArrayRef<::mlir::Type>(
getInput().getType()), getOperation()->getResultTypes());
927 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
928 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
ApplyMapOpAdaptor(ApplyMapOp op)
::mlir::LogicalResult verify(::mlir::Location loc)
ApplyMapOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
::mlir::ValueRange getOperands()
::mlir::LogicalResult verifyInvariants()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::llvm::APInt getNumDims()
::mlir::LogicalResult verify()
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
static llvm::hash_code computePropertiesHash(const Properties &prop)
FoldAdaptor::Properties Properties
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::LogicalResult verifyInvariantsImpl()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::AffineMapAttr map, ::mlir::ValueRange mapOperands={})
::mlir::StringAttr getMapAttrName()
::mlir::Operation::operand_range getMapOperands()
::mlir::AffineMap getMap()
::mlir::Operation::operand_range getODSOperands(unsigned index)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::mlir::AffineMapAttr getMapAttr()
void writeProperties(::mlir::DialectBytecodeWriter &writer)
void setMap(::mlir::AffineMap attrValue)
void setNumDimsAttr(::mlir::IntegerAttr attr)
::mlir::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::mlir::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
::mlir::StringAttr getNumDimsAttrName()
::mlir::MutableOperandRange getMapOperandsMutable()
void setMapAttr(::mlir::AffineMapAttr attr)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
::mlir::IntegerAttr getNumDimsAttr()
void setNumDims(::llvm::APInt attrValue)
::mlir::LogicalResult verify(::mlir::Location loc)
ConstReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
ConstReadOpAdaptor(ConstReadOp op)
::mlir::ValueRange getOperands()
void writeProperties(::mlir::DialectBytecodeWriter &writer)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::FlatSymbolRefAttr getConstNameAttr()
void print(::mlir::OpAsmPrinter &_odsPrinter)
FoldAdaptor::Properties Properties
::mlir::LogicalResult verifyInvariantsImpl()
::mlir::StringAttr getConstNameAttrName()
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::mlir::Operation::operand_range getODSOperands(unsigned index)
static llvm::hash_code computePropertiesHash(const Properties &prop)
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
void setConstName(::llvm::StringRef attrValue)
::mlir::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
void setConstNameAttr(::mlir::FlatSymbolRefAttr attr)
::mlir::LogicalResult verifyInvariants()
::mlir::Operation::result_range getODSResults(unsigned index)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type val, ::mlir::FlatSymbolRefAttr const_name)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::mlir::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
::mlir::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::llvm::StringRef getConstName()
UnifiableCastOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
UnifiableCastOpAdaptor(UnifiableCastOp op)
::mlir::LogicalResult verify(::mlir::Location loc)
::mlir::ValueRange getOperands()
::mlir::LogicalResult verify()
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
::mlir::LogicalResult verifyInvariantsImpl()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::mlir::OpOperand & getInputMutable()
::mlir::Operation::operand_range getODSOperands(unsigned index)
::mlir::Value getResult()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::mlir::LogicalResult verifyInvariants()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::Operation::result_range getODSResults(unsigned index)
void print(::mlir::OpAsmPrinter &_odsPrinter)
const Properties & getProperties()
::mlir::AffineMap getMap()
::mlir::DictionaryAttr getAttributes()
::mlir::IntegerAttr getNumDimsAttr()
::mlir::DictionaryAttr odsAttrs
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::AffineMapAttr getMapAttr()
ApplyMapOpGenericAdaptorBase(::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
::llvm::APInt getNumDims()
::mlir::RegionRange odsRegions
::std::optional<::mlir::OperationName > odsOpName
::mlir::DictionaryAttr getAttributes()
const Properties & getProperties()
::mlir::FlatSymbolRefAttr getConstNameAttr()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
ConstReadOpGenericAdaptorBase(::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
::std::optional<::mlir::OperationName > odsOpName
::mlir::RegionRange odsRegions
::llvm::StringRef getConstName()
::mlir::DictionaryAttr odsAttrs
::mlir::DictionaryAttr getAttributes()
::std::optional<::mlir::OperationName > odsOpName
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::RegionRange odsRegions
UnifiableCastOpGenericAdaptorBase(::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::mlir::DictionaryAttr odsAttrs
void printDimAndSymbolList(mlir::OpAsmPrinter &printer, mlir::Operation *op, mlir::OperandRange mapOperands, mlir::IntegerAttr numDims)
bool isValidType(Type type)
mlir::ParseResult parseDimAndSymbolList(mlir::OpAsmParser &parser, mlir::SmallVector< mlir::OpAsmParser::UnresolvedOperand, N > &mapOperands, mlir::IntegerAttr &numDims)
bool isValidConstReadType(Type type)
void setMap(const ::mlir::AffineMapAttr &propValue)
void setNumDims(const ::mlir::IntegerAttr &propValue)