31static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops1(
32 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
33 unsigned valueIndex) {
34 if (!((::llvm::isa<::mlir::IndexType>(type)))) {
35 return op->emitOpError(valueKind) <<
" #" << valueIndex
36 <<
" must be variadic of index, but got " << type;
38 return ::mlir::success();
41static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops2(
42 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
43 unsigned valueIndex) {
44 if (!((::llvm::isa<::mlir::IndexType>(type)))) {
45 return op->emitOpError(valueKind) <<
" #" << valueIndex
46 <<
" must be index, but got " << type;
48 return ::mlir::success();
51static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops3(
52 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
53 unsigned valueIndex) {
55 return op->emitOpError(valueKind) <<
" #" << valueIndex
56 <<
" must be integral, felt, or typevar type, but got " << type;
58 return ::mlir::success();
61static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops4(
62 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
63 unsigned valueIndex) {
65 return op->emitOpError(valueKind) <<
" #" << valueIndex
66 <<
" must be a valid LLZK type, but got " << type;
68 return ::mlir::success();
71static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops1(
72 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
73 if (attr && !((::llvm::isa<::mlir::AffineMapAttr>(attr))))
74 return emitError() <<
"attribute '" << attrName
75 <<
"' failed to satisfy constraint: AffineMap attribute";
76 return ::mlir::success();
78static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops1(
79 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
80 return __mlir_ods_local_attr_constraint_Ops1(attr, attrName, [op]() {
81 return op->emitOpError();
85static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops2(
86 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
87 if (attr && !(((::llvm::isa<::mlir::IntegerAttr>(attr))) && ((::llvm::isa<::mlir::IndexType>(::llvm::cast<::mlir::IntegerAttr>(attr).getType())))))
88 return emitError() <<
"attribute '" << attrName
89 <<
"' failed to satisfy constraint: index attribute";
90 return ::mlir::success();
92static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops2(
93 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
94 return __mlir_ods_local_attr_constraint_Ops2(attr, attrName, [op]() {
95 return op->emitOpError();
99static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops3(
100 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
101 if (attr && !((::llvm::isa<::mlir::FlatSymbolRefAttr>(attr))))
102 return emitError() <<
"attribute '" << attrName
103 <<
"' failed to satisfy constraint: flat symbol reference attribute";
104 return ::mlir::success();
106static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops3(
107 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
108 return __mlir_ods_local_attr_constraint_Ops3(attr, attrName, [op]() {
109 return op->emitOpError();
113static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops4(
114 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
115 if (attr && !((::llvm::isa<::mlir::StringAttr>(attr))))
116 return emitError() <<
"attribute '" << attrName
117 <<
"' failed to satisfy constraint: string attribute";
118 return ::mlir::success();
120static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops4(
121 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
122 return __mlir_ods_local_attr_constraint_Ops4(attr, attrName, [op]() {
123 return op->emitOpError();
127static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops5(
128 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
129 if (attr && !(((::llvm::isa<::mlir::TypeAttr>(attr))) && ((::llvm::isa<::mlir::Type>(::llvm::cast<::mlir::TypeAttr>(attr).getValue()))) && ((
::llzk::isValidConstReadType(::llvm::cast<::mlir::TypeAttr>(attr).getValue())))))
130 return emitError() <<
"attribute '" << attrName
131 <<
"' failed to satisfy constraint: type attribute of integral, felt, or typevar type";
132 return ::mlir::success();
134static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops5(
135 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
136 return __mlir_ods_local_attr_constraint_Ops5(attr, attrName, [op]() {
137 return op->emitOpError();
141static ::llvm::LogicalResult __mlir_ods_local_region_constraint_Ops1(
142 ::mlir::Operation *op, ::mlir::Region ®ion, ::llvm::StringRef regionName,
143 unsigned regionIndex) {
144 if (!((::llvm::hasNItems(region, 1)))) {
145 return op->emitOpError(
"region #") << regionIndex
146 << (regionName.empty() ?
" " :
" ('" + regionName +
"') ")
147 <<
"failed to verify constraint: region with 1 blocks";
149 return ::mlir::success();
163 bool isVariadic[] = {
true};
164 int prevVariadicCount = 0;
165 for (
unsigned i = 0; i < index; ++i)
166 if (isVariadic[i]) ++prevVariadicCount;
170 int variadicSize = (odsOperandsSize - 0) / 1;
175 int start = index + (variadicSize - 1) * prevVariadicCount;
176 int size = isVariadic[index] ? variadicSize : 1;
177 return {start, size};
182 return attr.getValue();
187 return attr.getValue();
196 if (!tblgen_map)
return emitError(loc,
"'poly.applymap' op requires attribute 'map'");
198 if (!tblgen_numDims)
return emitError(loc,
"'poly.applymap' op requires attribute 'numDims'");
200 if (tblgen_map && !((::llvm::isa<::mlir::AffineMapAttr>(tblgen_map))))
201 return emitError(loc,
"'poly.applymap' op attribute 'map' failed to satisfy constraint: AffineMap attribute");
203 if (tblgen_numDims && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_numDims))) && ((::llvm::isa<::mlir::IndexType>(::llvm::cast<::mlir::IntegerAttr>(tblgen_numDims).getType())))))
204 return emitError(loc,
"'poly.applymap' op attribute 'numDims' failed to satisfy constraint: index attribute");
205 return ::mlir::success();
209 bool isVariadic[] = {
true};
210 int prevVariadicCount = 0;
211 for (
unsigned i = 0; i < index; ++i)
212 if (isVariadic[i]) ++prevVariadicCount;
216 int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
221 int start = index + (variadicSize - 1) * prevVariadicCount;
222 int size = isVariadic[index] ? variadicSize : 1;
223 return {start, size};
228 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
233 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
235 emitError() <<
"expected DictionaryAttr to set properties";
236 return ::mlir::failure();
240 auto &propStorage = prop.
map;
241 auto attr = dict.get(
"map");
243 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
245 propStorage = convertedAttr;
247 emitError() <<
"Invalid attribute `map` in property conversion: " << attr;
248 return ::mlir::failure();
254 auto &propStorage = prop.
numDims;
255 auto attr = dict.get(
"numDims");
257 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
259 propStorage = convertedAttr;
261 emitError() <<
"Invalid attribute `numDims` in property conversion: " << attr;
262 return ::mlir::failure();
266 return ::mlir::success();
270 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
271 ::mlir::Builder odsBuilder{ctx};
274 const auto &propStorage = prop.
map;
276 attrs.push_back(odsBuilder.getNamedAttr(
"map",
281 const auto &propStorage = prop.
numDims;
283 attrs.push_back(odsBuilder.getNamedAttr(
"numDims",
288 return odsBuilder.getDictionaryAttr(attrs);
293 using llvm::hash_value;
294 return llvm::hash_combine(
295 llvm::hash_value(prop.
map.getAsOpaquePointer()),
296 llvm::hash_value(prop.
numDims.getAsOpaquePointer()));
303 if (name ==
"numDims")
310 prop.
map = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
map)>>(value);
314 if (name ==
"numDims") {
315 prop.
numDims = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
numDims)>>(value);
321 if (prop.
map) attrs.append(
"map", prop.
map);
326::llvm::LogicalResult
ApplyMapOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
329 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(attr,
"map", emitError)))
330 return ::mlir::failure();
335 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(attr,
"numDims", emitError)))
336 return ::mlir::failure();
338 return ::mlir::success();
342 auto &prop = state.getOrAddProperties<
Properties>(); (void)prop;
343 if (::mlir::failed(reader.readAttribute(prop.
map)))
344 return ::mlir::failure();
346 if (::mlir::failed(reader.readAttribute(prop.
numDims)))
347 return ::mlir::failure();
348 return ::mlir::success();
352 auto &prop = getProperties(); (void)prop;
353 writer.writeAttribute(prop.
map);
354 writer.writeAttribute(prop.
numDims);
359 return attr.getValue();
364 return attr.getValue();
368 getProperties().map = ::mlir::AffineMapAttr::get(attrValue);
372 getProperties().numDims = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIndexType(), attrValue);
375void ApplyMapOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::AffineMapAttr map, ::mlir::ValueRange mapOperands) {
376 odsState.addOperands(mapOperands);
379 props.
setNumDims(odsBuilder.getIntegerAttr(odsBuilder.getIndexType(),
380 map.getAffineMap().getNumDims()));
381 odsState.addTypes(odsBuilder.getIndexType());
387 build(builder, __state__, std::forward<
decltype(map)>(map), std::forward<
decltype(mapOperands)>(mapOperands));
388 auto __res__ = ::llvm::dyn_cast<ApplyMapOp>(builder.create(__state__));
389 assert(__res__ &&
"builder didn't return the right type");
394 return create(builder, builder.getLoc(), std::forward<
decltype(map)>(map), std::forward<
decltype(mapOperands)>(mapOperands));
397void ApplyMapOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::AffineMap map, ::mlir::ValueRange mapOperands) {
398 build(odsBuilder, odsState, ::mlir::AffineMapAttr::get(map), mapOperands);
404 build(builder, __state__, std::forward<
decltype(map)>(map), std::forward<
decltype(mapOperands)>(mapOperands));
405 auto __res__ = ::llvm::dyn_cast<ApplyMapOp>(builder.create(__state__));
406 assert(__res__ &&
"builder didn't return the right type");
411 return create(builder, builder.getLoc(), std::forward<
decltype(map)>(map), std::forward<
decltype(mapOperands)>(mapOperands));
414void ApplyMapOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::AffineExpr expr, ::mlir::ValueRange mapOperands) {
415 auto map = ::mlir::AffineMap::inferFromExprList({expr}, odsBuilder.getContext()).front();
416 build(odsBuilder, odsState, map, mapOperands);
422 build(builder, __state__, std::forward<
decltype(expr)>(expr), std::forward<
decltype(mapOperands)>(mapOperands));
423 auto __res__ = ::llvm::dyn_cast<ApplyMapOp>(builder.create(__state__));
424 assert(__res__ &&
"builder didn't return the right type");
429 return create(builder, builder.getLoc(), std::forward<
decltype(expr)>(expr), std::forward<
decltype(mapOperands)>(mapOperands));
433 auto tblgen_map = getProperties().map; (void)tblgen_map;
434 if (!tblgen_map)
return emitOpError(
"requires attribute 'map'");
435 auto tblgen_numDims = getProperties().numDims; (void)tblgen_numDims;
436 if (!tblgen_numDims)
return emitOpError(
"requires attribute 'numDims'");
438 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(*
this, tblgen_map,
"map")))
439 return ::mlir::failure();
441 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(*
this, tblgen_numDims,
"numDims")))
442 return ::mlir::failure();
444 unsigned index = 0; (void)index;
447 for (
auto v : valueGroup0) {
448 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
449 return ::mlir::failure();
453 unsigned index = 0; (void)index;
456 for (
auto v : valueGroup0) {
457 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
458 return ::mlir::failure();
461 return ::mlir::success();
466 return ::mlir::success();
467 return ::mlir::failure();
470::llvm::LogicalResult
ApplyMapOp::inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes) {
471 inferredReturnTypes.resize(1);
472 ::mlir::Builder odsBuilder(context);
473 ::mlir::Type odsInferredType0 = odsBuilder.getIndexType();
474 inferredReturnTypes[0] = odsInferredType0;
475 return ::mlir::success();
478::mlir::ParseResult
ApplyMapOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
479 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> mapOperandsOperands;
480 ::llvm::SMLoc mapOperandsOperandsLoc;
481 (void)mapOperandsOperandsLoc;
482 ::mlir::IntegerAttr numDimsAttr;
483 ::mlir::AffineMapAttr mapAttr;
485 mapOperandsOperandsLoc = parser.getCurrentLocation();
487 if (odsResult) return ::mlir::failure();
491 if (parser.parseCustomAttributeWithFallback(mapAttr, parser.getBuilder().getIndexType())) {
492 return ::mlir::failure();
496 auto loc = parser.getCurrentLocation();(void)loc;
497 if (parser.parseOptionalAttrDict(result.attributes))
498 return ::mlir::failure();
500 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
502 return ::mlir::failure();
504 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIndexType();
505 result.addTypes(odsBuildableType0);
506 if (parser.resolveOperands(mapOperandsOperands, odsBuildableType0, mapOperandsOperandsLoc, result.operands))
507 return ::mlir::failure();
508 return ::mlir::success();
515 _odsPrinter.printAttributeWithoutType(
getMapAttr());
516 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
517 elidedAttrs.push_back(
"numDims");
518 elidedAttrs.push_back(
"map");
519 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
522void ApplyMapOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
543 return attr.getValue();
552 if (!tblgen_const_name)
return emitError(loc,
"'poly.read_const' op requires attribute 'const_name'");
554 if (tblgen_const_name && !((::llvm::isa<::mlir::FlatSymbolRefAttr>(tblgen_const_name))))
555 return emitError(loc,
"'poly.read_const' op attribute 'const_name' failed to satisfy constraint: flat symbol reference attribute");
556 return ::mlir::success();
560 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
562 emitError() <<
"expected DictionaryAttr to set properties";
563 return ::mlir::failure();
568 auto attr = dict.get(
"const_name");
570 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
572 propStorage = convertedAttr;
574 emitError() <<
"Invalid attribute `const_name` in property conversion: " << attr;
575 return ::mlir::failure();
579 return ::mlir::success();
583 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
584 ::mlir::Builder odsBuilder{ctx};
589 attrs.push_back(odsBuilder.getNamedAttr(
"const_name",
594 return odsBuilder.getDictionaryAttr(attrs);
599 using llvm::hash_value;
600 return llvm::hash_combine(
601 llvm::hash_value(prop.
const_name.getAsOpaquePointer()));
605 if (name ==
"const_name")
611 if (name ==
"const_name") {
612 prop.
const_name = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
const_name)>>(value);
621::llvm::LogicalResult
ConstReadOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
624 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops3(attr,
"const_name", emitError)))
625 return ::mlir::failure();
627 return ::mlir::success();
631 auto &prop = state.getOrAddProperties<
Properties>(); (void)prop;
632 if (::mlir::failed(reader.readAttribute(prop.
const_name)))
633 return ::mlir::failure();
634 return ::mlir::success();
638 auto &prop = getProperties(); (void)prop;
644 return attr.getValue();
648 getProperties().const_name = ::mlir::SymbolRefAttr::get(::mlir::Builder((*this)->getContext()).getContext(), attrValue);
651void ConstReadOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type val, ::mlir::FlatSymbolRefAttr const_name) {
652 odsState.getOrAddProperties<
Properties>().const_name = const_name;
653 odsState.addTypes(val);
658 build(builder, __state__, std::forward<
decltype(val)>(val), std::forward<
decltype(const_name)>(const_name));
659 auto __res__ = ::llvm::dyn_cast<ConstReadOp>(builder.create(__state__));
660 assert(__res__ &&
"builder didn't return the right type");
665 return create(builder, builder.getLoc(), std::forward<
decltype(val)>(val), std::forward<
decltype(const_name)>(const_name));
668void ConstReadOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::FlatSymbolRefAttr const_name) {
669 odsState.getOrAddProperties<
Properties>().const_name = const_name;
670 assert(resultTypes.size() == 1u &&
"mismatched number of results");
671 odsState.addTypes(resultTypes);
676 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(const_name)>(const_name));
677 auto __res__ = ::llvm::dyn_cast<ConstReadOp>(builder.create(__state__));
678 assert(__res__ &&
"builder didn't return the right type");
683 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(const_name)>(const_name));
686void ConstReadOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type val, ::llvm::StringRef const_name) {
687 odsState.getOrAddProperties<
Properties>().const_name = ::mlir::SymbolRefAttr::get(odsBuilder.getContext(), const_name);
688 odsState.addTypes(val);
693 build(builder, __state__, std::forward<
decltype(val)>(val), std::forward<
decltype(const_name)>(const_name));
694 auto __res__ = ::llvm::dyn_cast<ConstReadOp>(builder.create(__state__));
695 assert(__res__ &&
"builder didn't return the right type");
700 return create(builder, builder.getLoc(), std::forward<
decltype(val)>(val), std::forward<
decltype(const_name)>(const_name));
703void ConstReadOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llvm::StringRef const_name) {
704 odsState.getOrAddProperties<
Properties>().const_name = ::mlir::SymbolRefAttr::get(odsBuilder.getContext(), const_name);
705 assert(resultTypes.size() == 1u &&
"mismatched number of results");
706 odsState.addTypes(resultTypes);
711 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(const_name)>(const_name));
712 auto __res__ = ::llvm::dyn_cast<ConstReadOp>(builder.create(__state__));
713 assert(__res__ &&
"builder didn't return the right type");
718 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(const_name)>(const_name));
721void ConstReadOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
722 assert(operands.size() == 0u &&
"mismatched number of parameters");
723 odsState.addOperands(operands);
724 odsState.addAttributes(attributes);
725 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
726 odsState.addTypes(resultTypes);
728 if (!attributes.empty()) {
730 ::mlir::PropertyRef properties = odsState.getRawProperties();
731 std::optional<::mlir::RegisteredOperationName> info =
732 odsState.name.getRegisteredInfo();
733 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
734 odsState.attributes.getDictionary(odsState.getContext()),
nullptr)))
735 ::llvm::report_fatal_error(
"Property conversion failed.");
739ConstReadOp ConstReadOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
741 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
742 auto __res__ = ::llvm::dyn_cast<ConstReadOp>(builder.create(__state__));
743 assert(__res__ &&
"builder didn't return the right type");
747ConstReadOp ConstReadOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
748 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
751void ConstReadOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
752 assert(operands.size() == 0u &&
"mismatched number of parameters");
753 odsState.addOperands(operands);
754 odsState.useProperties(
const_cast<Properties&
>(properties));
755 odsState.addAttributes(discardableAttributes);
756 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
757 odsState.addTypes(resultTypes);
760ConstReadOp ConstReadOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
762 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
763 auto __res__ = ::llvm::dyn_cast<ConstReadOp>(builder.create(__state__));
764 assert(__res__ &&
"builder didn't return the right type");
768ConstReadOp ConstReadOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
769 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
773 auto tblgen_const_name = getProperties().const_name; (void)tblgen_const_name;
774 if (!tblgen_const_name)
return emitOpError(
"requires attribute 'const_name'");
776 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops3(*
this, tblgen_const_name,
"const_name")))
777 return ::mlir::failure();
779 unsigned index = 0; (void)index;
782 for (
auto v : valueGroup0) {
783 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*
this, v.getType(),
"result", index++)))
784 return ::mlir::failure();
787 return ::mlir::success();
795 ::mlir::FlatSymbolRefAttr const_nameAttr;
796 ::mlir::Type valRawType{};
797 ::llvm::ArrayRef<::mlir::Type> valTypes(&valRawType, 1);
799 if (parser.parseCustomAttributeWithFallback(const_nameAttr, parser.getBuilder().getType<::mlir::NoneType>())) {
800 return ::mlir::failure();
803 if (parser.parseColon())
804 return ::mlir::failure();
808 if (parser.parseCustomTypeWithFallback(type))
809 return ::mlir::failure();
813 auto loc = parser.getCurrentLocation();(void)loc;
814 if (parser.parseOptionalAttrDict(result.attributes))
815 return ::mlir::failure();
817 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
819 return ::mlir::failure();
821 result.addTypes(valTypes);
822 return ::mlir::success();
828 _odsPrinter <<
' ' <<
":";
831 auto type =
getVal().getType();
832 if (
auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
833 _odsPrinter.printStrippedAttrOrType(validType);
837 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
838 elidedAttrs.push_back(
"const_name");
839 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
842void ConstReadOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
863 return attr.getValue();
872 if (!tblgen_sym_name)
return emitError(loc,
"'poly.expr' op requires attribute 'sym_name'");
874 if (tblgen_sym_name && !((::llvm::isa<::mlir::StringAttr>(tblgen_sym_name))))
875 return emitError(loc,
"'poly.expr' op attribute 'sym_name' failed to satisfy constraint: string attribute");
876 return ::mlir::success();
880 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
882 emitError() <<
"expected DictionaryAttr to set properties";
883 return ::mlir::failure();
888 auto attr = dict.get(
"sym_name");
890 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
892 propStorage = convertedAttr;
894 emitError() <<
"Invalid attribute `sym_name` in property conversion: " << attr;
895 return ::mlir::failure();
899 return ::mlir::success();
903 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
904 ::mlir::Builder odsBuilder{ctx};
907 const auto &propStorage = prop.
sym_name;
909 attrs.push_back(odsBuilder.getNamedAttr(
"sym_name",
914 return odsBuilder.getDictionaryAttr(attrs);
919 using llvm::hash_value;
920 return llvm::hash_combine(
921 llvm::hash_value(prop.
sym_name.getAsOpaquePointer()));
925 if (name ==
"sym_name")
931 if (name ==
"sym_name") {
932 prop.
sym_name = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
sym_name)>>(value);
944 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops4(attr,
"sym_name", emitError)))
945 return ::mlir::failure();
947 return ::mlir::success();
951 auto &prop = state.getOrAddProperties<
Properties>(); (void)prop;
952 if (::mlir::failed(reader.readAttribute(prop.
sym_name)))
953 return ::mlir::failure();
954 return ::mlir::success();
958 auto &prop = getProperties(); (void)prop;
959 writer.writeAttribute(prop.
sym_name);
964 return attr.getValue();
968 getProperties().sym_name = ::mlir::Builder((*this)->getContext()).getStringAttr(attrValue);
971void TemplateExprOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name) {
972 odsState.getOrAddProperties<
Properties>().sym_name = sym_name;
973 (void)odsState.addRegion();
978 build(builder, __state__, std::forward<
decltype(sym_name)>(sym_name));
979 auto __res__ = ::llvm::dyn_cast<TemplateExprOp>(builder.create(__state__));
980 assert(__res__ &&
"builder didn't return the right type");
985 return create(builder, builder.getLoc(), std::forward<
decltype(sym_name)>(sym_name));
988void TemplateExprOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name) {
989 odsState.getOrAddProperties<
Properties>().sym_name = sym_name;
990 (void)odsState.addRegion();
991 assert(resultTypes.size() == 0u &&
"mismatched number of results");
992 odsState.addTypes(resultTypes);
997 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(sym_name)>(sym_name));
998 auto __res__ = ::llvm::dyn_cast<TemplateExprOp>(builder.create(__state__));
999 assert(__res__ &&
"builder didn't return the right type");
1004 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(sym_name)>(sym_name));
1007void TemplateExprOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name) {
1008 odsState.getOrAddProperties<
Properties>().sym_name = odsBuilder.getStringAttr(sym_name);
1009 (void)odsState.addRegion();
1014 build(builder, __state__, std::forward<
decltype(sym_name)>(sym_name));
1015 auto __res__ = ::llvm::dyn_cast<TemplateExprOp>(builder.create(__state__));
1016 assert(__res__ &&
"builder didn't return the right type");
1021 return create(builder, builder.getLoc(), std::forward<
decltype(sym_name)>(sym_name));
1024void TemplateExprOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name) {
1025 odsState.getOrAddProperties<
Properties>().sym_name = odsBuilder.getStringAttr(sym_name);
1026 (void)odsState.addRegion();
1027 assert(resultTypes.size() == 0u &&
"mismatched number of results");
1028 odsState.addTypes(resultTypes);
1033 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(sym_name)>(sym_name));
1034 auto __res__ = ::llvm::dyn_cast<TemplateExprOp>(builder.create(__state__));
1035 assert(__res__ &&
"builder didn't return the right type");
1040 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(sym_name)>(sym_name));
1043void TemplateExprOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1044 assert(operands.size() == 0u &&
"mismatched number of parameters");
1045 odsState.addOperands(operands);
1046 odsState.addAttributes(attributes);
1047 for (
unsigned i = 0; i != 1; ++i)
1048 (
void)odsState.addRegion();
1049 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
1050 odsState.addTypes(resultTypes);
1052 if (!attributes.empty()) {
1054 ::mlir::PropertyRef properties = odsState.getRawProperties();
1055 std::optional<::mlir::RegisteredOperationName> info =
1056 odsState.name.getRegisteredInfo();
1057 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
1058 odsState.attributes.getDictionary(odsState.getContext()),
nullptr)))
1059 ::llvm::report_fatal_error(
"Property conversion failed.");
1063TemplateExprOp TemplateExprOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1065 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
1066 auto __res__ = ::llvm::dyn_cast<TemplateExprOp>(builder.create(__state__));
1067 assert(__res__ &&
"builder didn't return the right type");
1072 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
1075void TemplateExprOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1076 assert(operands.size() == 0u &&
"mismatched number of parameters");
1077 odsState.addOperands(operands);
1078 odsState.useProperties(
const_cast<Properties&
>(properties));
1079 odsState.addAttributes(discardableAttributes);
1080 for (
unsigned i = 0; i != 1; ++i)
1081 (
void)odsState.addRegion();
1082 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
1083 odsState.addTypes(resultTypes);
1086TemplateExprOp TemplateExprOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1088 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
1089 auto __res__ = ::llvm::dyn_cast<TemplateExprOp>(builder.create(__state__));
1090 assert(__res__ &&
"builder didn't return the right type");
1095 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
1099 auto tblgen_sym_name = getProperties().sym_name; (void)tblgen_sym_name;
1100 if (!tblgen_sym_name)
return emitOpError(
"requires attribute 'sym_name'");
1102 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops4(*
this, tblgen_sym_name,
"sym_name")))
1103 return ::mlir::failure();
1105 unsigned index = 0; (void)index;
1107 for (
auto ®ion : ::llvm::MutableArrayRef((*this)->getRegion(0)))
1108 if (::mlir::failed(__mlir_ods_local_region_constraint_Ops1(*
this, region,
"initializerRegion", index++)))
1109 return ::mlir::failure();
1111 return ::mlir::success();
1119 ::mlir::StringAttr sym_nameAttr;
1120 std::unique_ptr<::mlir::Region> initializerRegionRegion = std::make_unique<::mlir::Region>();
1122 if (parser.parseSymbolName(sym_nameAttr))
1123 return ::mlir::failure();
1126 if (parser.parseRegion(*initializerRegionRegion))
1127 return ::mlir::failure();
1129 if (initializerRegionRegion->empty()) initializerRegionRegion->emplaceBlock();
1131 auto loc = parser.getCurrentLocation();(void)loc;
1132 if (parser.parseOptionalAttrDict(result.attributes))
1133 return ::mlir::failure();
1135 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
1137 return ::mlir::failure();
1139 result.addRegion(std::move(initializerRegionRegion));
1140 return ::mlir::success();
1148 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1149 elidedAttrs.push_back(
"sym_name");
1150 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1171 return attr.getValue();
1180 if (!tblgen_sym_name)
return emitError(loc,
"'poly.template' op requires attribute 'sym_name'");
1182 if (tblgen_sym_name && !((::llvm::isa<::mlir::StringAttr>(tblgen_sym_name))))
1183 return emitError(loc,
"'poly.template' op attribute 'sym_name' failed to satisfy constraint: string attribute");
1184 return ::mlir::success();
1188 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
1190 emitError() <<
"expected DictionaryAttr to set properties";
1191 return ::mlir::failure();
1196 auto attr = dict.get(
"sym_name");
1198 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
1199 if (convertedAttr) {
1200 propStorage = convertedAttr;
1202 emitError() <<
"Invalid attribute `sym_name` in property conversion: " << attr;
1203 return ::mlir::failure();
1207 return ::mlir::success();
1211 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
1212 ::mlir::Builder odsBuilder{ctx};
1215 const auto &propStorage = prop.
sym_name;
1217 attrs.push_back(odsBuilder.getNamedAttr(
"sym_name",
1222 return odsBuilder.getDictionaryAttr(attrs);
1227 using llvm::hash_value;
1228 return llvm::hash_combine(
1229 llvm::hash_value(prop.
sym_name.getAsOpaquePointer()));
1233 if (name ==
"sym_name")
1235 return std::nullopt;
1239 if (name ==
"sym_name") {
1240 prop.
sym_name = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
sym_name)>>(value);
1249::llvm::LogicalResult
TemplateOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1252 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops4(attr,
"sym_name", emitError)))
1253 return ::mlir::failure();
1255 return ::mlir::success();
1259 auto &prop = state.getOrAddProperties<
Properties>(); (void)prop;
1260 if (::mlir::failed(reader.readAttribute(prop.
sym_name)))
1261 return ::mlir::failure();
1262 return ::mlir::success();
1266 auto &prop = getProperties(); (void)prop;
1267 writer.writeAttribute(prop.
sym_name);
1272 return attr.getValue();
1276 getProperties().sym_name = ::mlir::Builder((*this)->getContext()).getStringAttr(attrValue);
1279void TemplateOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name) {
1280 odsState.getOrAddProperties<
Properties>().sym_name = sym_name;
1281 (void)odsState.addRegion();
1286 build(builder, __state__, std::forward<
decltype(sym_name)>(sym_name));
1287 auto __res__ = ::llvm::dyn_cast<TemplateOp>(builder.create(__state__));
1288 assert(__res__ &&
"builder didn't return the right type");
1293 return create(builder, builder.getLoc(), std::forward<
decltype(sym_name)>(sym_name));
1296void TemplateOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name) {
1297 odsState.getOrAddProperties<
Properties>().sym_name = sym_name;
1298 (void)odsState.addRegion();
1299 assert(resultTypes.size() == 0u &&
"mismatched number of results");
1300 odsState.addTypes(resultTypes);
1305 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(sym_name)>(sym_name));
1306 auto __res__ = ::llvm::dyn_cast<TemplateOp>(builder.create(__state__));
1307 assert(__res__ &&
"builder didn't return the right type");
1312 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(sym_name)>(sym_name));
1315void TemplateOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name) {
1316 odsState.getOrAddProperties<
Properties>().sym_name = odsBuilder.getStringAttr(sym_name);
1317 (void)odsState.addRegion();
1322 build(builder, __state__, std::forward<
decltype(sym_name)>(sym_name));
1323 auto __res__ = ::llvm::dyn_cast<TemplateOp>(builder.create(__state__));
1324 assert(__res__ &&
"builder didn't return the right type");
1329 return create(builder, builder.getLoc(), std::forward<
decltype(sym_name)>(sym_name));
1332void TemplateOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name) {
1333 odsState.getOrAddProperties<
Properties>().sym_name = odsBuilder.getStringAttr(sym_name);
1334 (void)odsState.addRegion();
1335 assert(resultTypes.size() == 0u &&
"mismatched number of results");
1336 odsState.addTypes(resultTypes);
1341 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(sym_name)>(sym_name));
1342 auto __res__ = ::llvm::dyn_cast<TemplateOp>(builder.create(__state__));
1343 assert(__res__ &&
"builder didn't return the right type");
1348 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(sym_name)>(sym_name));
1351void TemplateOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1352 assert(operands.size() == 0u &&
"mismatched number of parameters");
1353 odsState.addOperands(operands);
1354 odsState.addAttributes(attributes);
1355 for (
unsigned i = 0; i != 1; ++i)
1356 (
void)odsState.addRegion();
1357 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
1358 odsState.addTypes(resultTypes);
1360 if (!attributes.empty()) {
1362 ::mlir::PropertyRef properties = odsState.getRawProperties();
1363 std::optional<::mlir::RegisteredOperationName> info =
1364 odsState.name.getRegisteredInfo();
1365 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
1366 odsState.attributes.getDictionary(odsState.getContext()),
nullptr)))
1367 ::llvm::report_fatal_error(
"Property conversion failed.");
1371TemplateOp TemplateOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1373 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
1374 auto __res__ = ::llvm::dyn_cast<TemplateOp>(builder.create(__state__));
1375 assert(__res__ &&
"builder didn't return the right type");
1379TemplateOp TemplateOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1380 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
1383void TemplateOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1384 assert(operands.size() == 0u &&
"mismatched number of parameters");
1385 odsState.addOperands(operands);
1386 odsState.useProperties(
const_cast<Properties&
>(properties));
1387 odsState.addAttributes(discardableAttributes);
1388 for (
unsigned i = 0; i != 1; ++i)
1389 (
void)odsState.addRegion();
1390 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
1391 odsState.addTypes(resultTypes);
1394TemplateOp TemplateOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1396 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
1397 auto __res__ = ::llvm::dyn_cast<TemplateOp>(builder.create(__state__));
1398 assert(__res__ &&
"builder didn't return the right type");
1402TemplateOp TemplateOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1403 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
1407 auto tblgen_sym_name = getProperties().sym_name; (void)tblgen_sym_name;
1408 if (!tblgen_sym_name)
return emitOpError(
"requires attribute 'sym_name'");
1410 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops4(*
this, tblgen_sym_name,
"sym_name")))
1411 return ::mlir::failure();
1413 unsigned index = 0; (void)index;
1415 for (
auto ®ion : ::llvm::MutableArrayRef((*this)->getRegion(0)))
1416 if (::mlir::failed(__mlir_ods_local_region_constraint_Ops1(*
this, region,
"bodyRegion", index++)))
1417 return ::mlir::failure();
1419 return ::mlir::success();
1424 return ::mlir::success();
1425 return ::mlir::failure();
1429 ::mlir::StringAttr sym_nameAttr;
1430 std::unique_ptr<::mlir::Region> bodyRegionRegion = std::make_unique<::mlir::Region>();
1432 if (parser.parseSymbolName(sym_nameAttr))
1433 return ::mlir::failure();
1436 if (parser.parseRegion(*bodyRegionRegion))
1437 return ::mlir::failure();
1439 if (bodyRegionRegion->empty()) bodyRegionRegion->emplaceBlock();
1441 auto loc = parser.getCurrentLocation();(void)loc;
1442 if (parser.parseOptionalAttrDict(result.attributes))
1443 return ::mlir::failure();
1445 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
1447 return ::mlir::failure();
1449 result.addRegion(std::move(bodyRegionRegion));
1450 return ::mlir::success();
1458 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1459 elidedAttrs.push_back(
"sym_name");
1460 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1481 return attr.getValue();
1486 return attr ? ::std::optional<::mlir::Type>(::llvm::cast<::mlir::Type>(attr.getValue())) : (::std::nullopt);
1495 if (!tblgen_sym_name)
return emitError(loc,
"'poly.param' op requires attribute 'sym_name'");
1498 if (tblgen_sym_name && !((::llvm::isa<::mlir::StringAttr>(tblgen_sym_name))))
1499 return emitError(loc,
"'poly.param' op attribute 'sym_name' failed to satisfy constraint: string attribute");
1501 if (tblgen_type_opt && !(((::llvm::isa<::mlir::TypeAttr>(tblgen_type_opt))) && ((::llvm::isa<::mlir::Type>(::llvm::cast<::mlir::TypeAttr>(tblgen_type_opt).getValue()))) && ((
::llzk::isValidConstReadType(::llvm::cast<::mlir::TypeAttr>(tblgen_type_opt).getValue())))))
1502 return emitError(loc,
"'poly.param' op attribute 'type_opt' failed to satisfy constraint: type attribute of integral, felt, or typevar type");
1503 return ::mlir::success();
1507 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
1509 emitError() <<
"expected DictionaryAttr to set properties";
1510 return ::mlir::failure();
1515 auto attr = dict.get(
"sym_name");
1517 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
1518 if (convertedAttr) {
1519 propStorage = convertedAttr;
1521 emitError() <<
"Invalid attribute `sym_name` in property conversion: " << attr;
1522 return ::mlir::failure();
1529 auto attr = dict.get(
"type_opt");
1531 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
1532 if (convertedAttr) {
1533 propStorage = convertedAttr;
1535 emitError() <<
"Invalid attribute `type_opt` in property conversion: " << attr;
1536 return ::mlir::failure();
1540 return ::mlir::success();
1544 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
1545 ::mlir::Builder odsBuilder{ctx};
1548 const auto &propStorage = prop.
sym_name;
1550 attrs.push_back(odsBuilder.getNamedAttr(
"sym_name",
1555 const auto &propStorage = prop.
type_opt;
1557 attrs.push_back(odsBuilder.getNamedAttr(
"type_opt",
1562 return odsBuilder.getDictionaryAttr(attrs);
1567 using llvm::hash_value;
1568 return llvm::hash_combine(
1569 llvm::hash_value(prop.
sym_name.getAsOpaquePointer()),
1570 llvm::hash_value(prop.
type_opt.getAsOpaquePointer()));
1574 if (name ==
"sym_name")
1577 if (name ==
"type_opt")
1579 return std::nullopt;
1583 if (name ==
"sym_name") {
1584 prop.
sym_name = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
sym_name)>>(value);
1588 if (name ==
"type_opt") {
1589 prop.
type_opt = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
type_opt)>>(value);
1603 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops4(attr,
"sym_name", emitError)))
1604 return ::mlir::failure();
1609 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops5(attr,
"type_opt", emitError)))
1610 return ::mlir::failure();
1612 return ::mlir::success();
1616 auto &prop = state.getOrAddProperties<
Properties>(); (void)prop;
1617 if (::mlir::failed(reader.readAttribute(prop.
sym_name)))
1618 return ::mlir::failure();
1620 if (::mlir::failed(reader.readOptionalAttribute(prop.
type_opt)))
1621 return ::mlir::failure();
1622 return ::mlir::success();
1626 auto &prop = getProperties(); (void)prop;
1627 writer.writeAttribute(prop.
sym_name);
1629 writer.writeOptionalAttribute(prop.
type_opt);
1634 return attr.getValue();
1639 return attr ? ::std::optional<::mlir::Type>(::llvm::cast<::mlir::Type>(attr.getValue())) : (::std::nullopt);
1643 getProperties().sym_name = ::mlir::Builder((*this)->getContext()).getStringAttr(attrValue);
1647 auto &odsProp = getProperties().type_opt;
1649 odsProp = ::mlir::TypeAttr::get(*attrValue);
1654void TemplateParamOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, ::mlir::TypeAttr type_opt) {
1655 odsState.getOrAddProperties<
Properties>().sym_name = sym_name;
1657 odsState.getOrAddProperties<
Properties>().type_opt = type_opt;
1663 build(builder, __state__, std::forward<
decltype(sym_name)>(sym_name), std::forward<
decltype(type_opt)>(type_opt));
1664 auto __res__ = ::llvm::dyn_cast<TemplateParamOp>(builder.create(__state__));
1665 assert(__res__ &&
"builder didn't return the right type");
1670 return create(builder, builder.getLoc(), std::forward<
decltype(sym_name)>(sym_name), std::forward<
decltype(type_opt)>(type_opt));
1673void TemplateParamOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name, ::mlir::TypeAttr type_opt) {
1674 odsState.getOrAddProperties<
Properties>().sym_name = sym_name;
1676 odsState.getOrAddProperties<
Properties>().type_opt = type_opt;
1678 assert(resultTypes.size() == 0u &&
"mismatched number of results");
1679 odsState.addTypes(resultTypes);
1684 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(sym_name)>(sym_name), std::forward<
decltype(type_opt)>(type_opt));
1685 auto __res__ = ::llvm::dyn_cast<TemplateParamOp>(builder.create(__state__));
1686 assert(__res__ &&
"builder didn't return the right type");
1691 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(sym_name)>(sym_name), std::forward<
decltype(type_opt)>(type_opt));
1694void TemplateParamOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name, ::mlir::TypeAttr type_opt) {
1695 odsState.getOrAddProperties<
Properties>().sym_name = odsBuilder.getStringAttr(sym_name);
1697 odsState.getOrAddProperties<
Properties>().type_opt = type_opt;
1703 build(builder, __state__, std::forward<
decltype(sym_name)>(sym_name), std::forward<
decltype(type_opt)>(type_opt));
1704 auto __res__ = ::llvm::dyn_cast<TemplateParamOp>(builder.create(__state__));
1705 assert(__res__ &&
"builder didn't return the right type");
1710 return create(builder, builder.getLoc(), std::forward<
decltype(sym_name)>(sym_name), std::forward<
decltype(type_opt)>(type_opt));
1713void TemplateParamOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name, ::mlir::TypeAttr type_opt) {
1714 odsState.getOrAddProperties<
Properties>().sym_name = odsBuilder.getStringAttr(sym_name);
1716 odsState.getOrAddProperties<
Properties>().type_opt = type_opt;
1718 assert(resultTypes.size() == 0u &&
"mismatched number of results");
1719 odsState.addTypes(resultTypes);
1724 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(sym_name)>(sym_name), std::forward<
decltype(type_opt)>(type_opt));
1725 auto __res__ = ::llvm::dyn_cast<TemplateParamOp>(builder.create(__state__));
1726 assert(__res__ &&
"builder didn't return the right type");
1731 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(sym_name)>(sym_name), std::forward<
decltype(type_opt)>(type_opt));
1734void TemplateParamOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1735 assert(operands.size() == 0u &&
"mismatched number of parameters");
1736 odsState.addOperands(operands);
1737 odsState.addAttributes(attributes);
1738 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
1739 odsState.addTypes(resultTypes);
1741 if (!attributes.empty()) {
1743 ::mlir::PropertyRef properties = odsState.getRawProperties();
1744 std::optional<::mlir::RegisteredOperationName> info =
1745 odsState.name.getRegisteredInfo();
1746 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
1747 odsState.attributes.getDictionary(odsState.getContext()),
nullptr)))
1748 ::llvm::report_fatal_error(
"Property conversion failed.");
1752TemplateParamOp TemplateParamOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1754 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
1755 auto __res__ = ::llvm::dyn_cast<TemplateParamOp>(builder.create(__state__));
1756 assert(__res__ &&
"builder didn't return the right type");
1761 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
1764void TemplateParamOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1765 assert(operands.size() == 0u &&
"mismatched number of parameters");
1766 odsState.addOperands(operands);
1767 odsState.useProperties(
const_cast<Properties&
>(properties));
1768 odsState.addAttributes(discardableAttributes);
1769 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
1770 odsState.addTypes(resultTypes);
1775 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
1776 auto __res__ = ::llvm::dyn_cast<TemplateParamOp>(builder.create(__state__));
1777 assert(__res__ &&
"builder didn't return the right type");
1782 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
1786 auto tblgen_sym_name = getProperties().sym_name; (void)tblgen_sym_name;
1787 if (!tblgen_sym_name)
return emitOpError(
"requires attribute 'sym_name'");
1788 auto tblgen_type_opt = getProperties().type_opt; (void)tblgen_type_opt;
1790 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops4(*
this, tblgen_sym_name,
"sym_name")))
1791 return ::mlir::failure();
1793 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops5(*
this, tblgen_type_opt,
"type_opt")))
1794 return ::mlir::failure();
1795 return ::mlir::success();
1803 ::mlir::StringAttr sym_nameAttr;
1804 ::mlir::TypeAttr type_optAttr;
1806 if (parser.parseSymbolName(sym_nameAttr))
1807 return ::mlir::failure();
1809 if (::mlir::succeeded(parser.parseOptionalColon())) {
1811 if (parser.parseCustomAttributeWithFallback(type_optAttr, parser.getBuilder().getType<::mlir::NoneType>())) {
1812 return ::mlir::failure();
1817 auto loc = parser.getCurrentLocation();(void)loc;
1818 if (parser.parseOptionalAttrDict(result.attributes))
1819 return ::mlir::failure();
1821 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
1823 return ::mlir::failure();
1825 return ::mlir::success();
1832 _odsPrinter <<
' ' <<
":";
1836 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1837 elidedAttrs.push_back(
"sym_name");
1838 elidedAttrs.push_back(
"type_opt");
1839 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1863 return ::mlir::success();
1867 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
1869 emitError() <<
"expected DictionaryAttr to set properties";
1870 return ::mlir::failure();
1872 return ::mlir::success();
1876 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
1877 ::mlir::Builder odsBuilder{ctx};
1880 return odsBuilder.getDictionaryAttr(attrs);
1885 using llvm::hash_value;
1886 return llvm::hash_combine();
1890 return std::nullopt;
1900 return ::mlir::success();
1903void UnifiableCastOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input) {
1904 odsState.addOperands(input);
1905 odsState.addTypes(result);
1910 build(builder, __state__, std::forward<
decltype(result)>(result), std::forward<
decltype(input)>(input));
1911 auto __res__ = ::llvm::dyn_cast<UnifiableCastOp>(builder.create(__state__));
1912 assert(__res__ &&
"builder didn't return the right type");
1917 return create(builder, builder.getLoc(), std::forward<
decltype(result)>(result), std::forward<
decltype(input)>(input));
1920void UnifiableCastOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value input) {
1921 odsState.addOperands(input);
1922 assert(resultTypes.size() == 1u &&
"mismatched number of results");
1923 odsState.addTypes(resultTypes);
1928 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(input)>(input));
1929 auto __res__ = ::llvm::dyn_cast<UnifiableCastOp>(builder.create(__state__));
1930 assert(__res__ &&
"builder didn't return the right type");
1935 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(input)>(input));
1938void UnifiableCastOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1939 assert(operands.size() == 1u &&
"mismatched number of parameters");
1940 odsState.addOperands(operands);
1941 odsState.addAttributes(attributes);
1942 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
1943 odsState.addTypes(resultTypes);
1946UnifiableCastOp UnifiableCastOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1948 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
1949 auto __res__ = ::llvm::dyn_cast<UnifiableCastOp>(builder.create(__state__));
1950 assert(__res__ &&
"builder didn't return the right type");
1955 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
1958void UnifiableCastOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
1959 assert(operands.size() == 1u &&
"mismatched number of parameters");
1960 odsState.addOperands(operands);
1961 odsState.useProperties(
const_cast<Properties&
>(properties));
1962 odsState.addAttributes(discardableAttributes);
1963 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
1964 odsState.addTypes(resultTypes);
1969 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
1970 auto __res__ = ::llvm::dyn_cast<UnifiableCastOp>(builder.create(__state__));
1971 assert(__res__ &&
"builder didn't return the right type");
1976 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
1981 unsigned index = 0; (void)index;
1984 for (
auto v : valueGroup0) {
1985 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops4(*
this, v.getType(),
"operand", index++)))
1986 return ::mlir::failure();
1990 unsigned index = 0; (void)index;
1993 for (
auto v : valueGroup0) {
1994 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops4(*
this, v.getType(),
"result", index++)))
1995 return ::mlir::failure();
1998 return ::mlir::success();
2003 return ::mlir::success();
2004 return ::mlir::failure();
2008 ::mlir::OpAsmParser::UnresolvedOperand inputRawOperand{};
2009 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> inputOperands(&inputRawOperand, 1); ::llvm::SMLoc inputOperandsLoc;
2010 (void)inputOperandsLoc;
2011 ::llvm::ArrayRef<::mlir::Type> inputTypes;
2012 ::llvm::ArrayRef<::mlir::Type> allResultTypes;
2014 inputOperandsLoc = parser.getCurrentLocation();
2015 if (parser.parseOperand(inputRawOperand))
2016 return ::mlir::failure();
2017 if (parser.parseColon())
2018 return ::mlir::failure();
2020 ::mlir::FunctionType input__allResult_functionType;
2021 if (parser.parseType(input__allResult_functionType))
2022 return ::mlir::failure();
2023 inputTypes = input__allResult_functionType.getInputs();
2024 allResultTypes = input__allResult_functionType.getResults();
2026 auto loc = parser.getCurrentLocation();(void)loc;
2027 if (parser.parseOptionalAttrDict(result.attributes))
2028 return ::mlir::failure();
2030 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
2032 return ::mlir::failure();
2034 result.addTypes(allResultTypes);
2035 if (parser.resolveOperands(inputOperands, inputTypes, inputOperandsLoc, result.operands))
2036 return ::mlir::failure();
2037 return ::mlir::success();
2043 _odsPrinter <<
' ' <<
":";
2045 _odsPrinter.printFunctionalType(::llvm::ArrayRef<::mlir::Type>(
getInput().getType()), getOperation()->getResultTypes());
2046 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2047 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
2073 return ::mlir::success();
2077 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
2079 emitError() <<
"expected DictionaryAttr to set properties";
2080 return ::mlir::failure();
2082 return ::mlir::success();
2086 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
2087 ::mlir::Builder odsBuilder{ctx};
2090 return odsBuilder.getDictionaryAttr(attrs);
2095 using llvm::hash_value;
2096 return llvm::hash_combine();
2100 return std::nullopt;
2109::llvm::LogicalResult
YieldOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
2110 return ::mlir::success();
2113void YieldOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value val) {
2114 odsState.addOperands(val);
2119 build(builder, __state__, std::forward<
decltype(val)>(val));
2120 auto __res__ = ::llvm::dyn_cast<YieldOp>(builder.create(__state__));
2121 assert(__res__ &&
"builder didn't return the right type");
2126 return create(builder, builder.getLoc(), std::forward<
decltype(val)>(val));
2129void YieldOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value val) {
2130 odsState.addOperands(val);
2131 assert(resultTypes.size() == 0u &&
"mismatched number of results");
2132 odsState.addTypes(resultTypes);
2135YieldOp YieldOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value val) {
2137 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(val)>(val));
2138 auto __res__ = ::llvm::dyn_cast<YieldOp>(builder.create(__state__));
2139 assert(__res__ &&
"builder didn't return the right type");
2144 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(val)>(val));
2147void YieldOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2148 assert(operands.size() == 1u &&
"mismatched number of parameters");
2149 odsState.addOperands(operands);
2150 odsState.addAttributes(attributes);
2151 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
2152 odsState.addTypes(resultTypes);
2155YieldOp YieldOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2157 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
2158 auto __res__ = ::llvm::dyn_cast<YieldOp>(builder.create(__state__));
2159 assert(__res__ &&
"builder didn't return the right type");
2163YieldOp YieldOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2164 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(attributes)>(attributes));
2167void YieldOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2168 assert(operands.size() == 1u &&
"mismatched number of parameters");
2169 odsState.addOperands(operands);
2170 odsState.useProperties(
const_cast<Properties&
>(properties));
2171 odsState.addAttributes(discardableAttributes);
2172 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
2173 odsState.addTypes(resultTypes);
2176YieldOp YieldOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2178 build(builder, __state__, std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
2179 auto __res__ = ::llvm::dyn_cast<YieldOp>(builder.create(__state__));
2180 assert(__res__ &&
"builder didn't return the right type");
2184YieldOp YieldOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
2185 return create(builder, builder.getLoc(), std::forward<
decltype(resultTypes)>(resultTypes), std::forward<
decltype(operands)>(operands), std::forward<
decltype(properties)>(properties), std::forward<
decltype(discardableAttributes)>(discardableAttributes));
2190 unsigned index = 0; (void)index;
2193 for (
auto v : valueGroup0) {
2194 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*
this, v.getType(),
"operand", index++)))
2195 return ::mlir::failure();
2198 return ::mlir::success();
2205::mlir::ParseResult
YieldOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
2206 ::mlir::OpAsmParser::UnresolvedOperand valRawOperand{};
2207 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> valOperands(&valRawOperand, 1); ::llvm::SMLoc valOperandsLoc;
2208 (void)valOperandsLoc;
2209 ::mlir::Type valRawType{};
2210 ::llvm::ArrayRef<::mlir::Type> valTypes(&valRawType, 1);
2212 valOperandsLoc = parser.getCurrentLocation();
2213 if (parser.parseOperand(valRawOperand))
2214 return ::mlir::failure();
2215 if (parser.parseColon())
2216 return ::mlir::failure();
2220 if (parser.parseCustomTypeWithFallback(type))
2221 return ::mlir::failure();
2225 auto loc = parser.getCurrentLocation();(void)loc;
2226 if (parser.parseOptionalAttrDict(result.attributes))
2227 return ::mlir::failure();
2229 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
2231 return ::mlir::failure();
2233 if (parser.resolveOperands(valOperands, valTypes, valOperandsLoc, result.operands))
2234 return ::mlir::failure();
2235 return ::mlir::success();
2241 _odsPrinter <<
' ' <<
":";
2244 auto type =
getVal().getType();
2245 if (
auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
2246 _odsPrinter.printStrippedAttrOrType(validType);
2248 _odsPrinter << type;
2250 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2251 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
ApplyMapOpAdaptor(ApplyMapOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
ApplyMapOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::ValueRange getOperands()
::mlir::AffineMapAttr getMapAttr()
::mlir::IntegerAttr getNumDimsAttr()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::mlir::Operation::result_range getODSResults(unsigned index)
::llvm::APInt getNumDims()
::mlir::Operation::operand_range getMapOperands()
::llvm::LogicalResult verify()
void print(::mlir::OpAsmPrinter &_odsPrinter)
static constexpr ::llvm::StringLiteral getOperationName()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::llvm::LogicalResult verifyInvariants()
static llvm::hash_code computePropertiesHash(const Properties &prop)
static ApplyMapOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::AffineMapAttr map, ::mlir::ValueRange mapOperands={})
FoldAdaptor::Properties Properties
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
::mlir::Operation::operand_range getODSOperands(unsigned index)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::AffineMapAttr map, ::mlir::ValueRange mapOperands={})
::mlir::StringAttr getMapAttrName()
::mlir::AffineMap getMap()
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
void setMap(::mlir::AffineMap attrValue)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::mlir::StringAttr getNumDimsAttrName()
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::MutableOperandRange getMapOperandsMutable()
::llvm::LogicalResult verifyInvariantsImpl()
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
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)
void setNumDims(::llvm::APInt attrValue)
::llvm::LogicalResult verify(::mlir::Location loc)
ConstReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
ConstReadOpAdaptor(ConstReadOp op)
::mlir::ValueRange getOperands()
void writeProperties(::mlir::DialectBytecodeWriter &writer)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
static constexpr ::llvm::StringLiteral getOperationName()
void print(::mlir::OpAsmPrinter &_odsPrinter)
FoldAdaptor::Properties Properties
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::TypedValue<::mlir::Type > getVal()
::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::result_range getODSResults(unsigned index)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static llvm::hash_code computePropertiesHash(const Properties &prop)
void setConstName(::llvm::StringRef attrValue)
::llvm::LogicalResult verifyInvariantsImpl()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::mlir::FlatSymbolRefAttr getConstNameAttr()
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)
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
::llvm::LogicalResult verifyInvariants()
static ConstReadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type val, ::mlir::FlatSymbolRefAttr const_name)
::llvm::StringRef getConstName()
::llvm::LogicalResult verify(::mlir::Location loc)
TemplateExprOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
TemplateExprOpAdaptor(TemplateExprOp op)
::mlir::ValueRange getOperands()
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::mlir::StringAttr getSymNameAttr()
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::mlir::Region & getInitializerRegion()
static llvm::hash_code computePropertiesHash(const Properties &prop)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::llvm::LogicalResult verifyInvariantsImpl()
::llvm::StringRef getSymName()
void setSymName(::llvm::StringRef attrValue)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
FoldAdaptor::Properties Properties
static TemplateExprOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::StringAttr sym_name)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name)
static constexpr ::llvm::StringLiteral getOperationName()
::mlir::StringAttr getSymNameAttrName()
::llvm::LogicalResult verifyInvariants()
void print(::mlir::OpAsmPrinter &_odsPrinter)
TemplateOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
TemplateOpAdaptor(TemplateOp op)
::mlir::ValueRange getOperands()
::mlir::Region & getBodyRegion()
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::StringAttr getSymNameAttrName()
static llvm::hash_code computePropertiesHash(const Properties &prop)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
FoldAdaptor::Properties Properties
::mlir::StringAttr getSymNameAttr()
::llvm::LogicalResult verifyInvariantsImpl()
::llvm::LogicalResult verify()
Verify the optional transform-carried name pattern against current parameters.
void setSymName(::llvm::StringRef attrValue)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
static constexpr ::llvm::StringLiteral getOperationName()
::llvm::StringRef getSymName()
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::llvm::LogicalResult verifyInvariants()
static TemplateOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::StringAttr sym_name)
::llvm::LogicalResult verify(::mlir::Location loc)
TemplateParamOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
TemplateParamOpAdaptor(TemplateParamOp op)
::mlir::ValueRange getOperands()
::llvm::LogicalResult verifyInvariants()
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
void setSymName(::llvm::StringRef attrValue)
::mlir::StringAttr getTypeOptAttrName()
void setTypeOpt(::std::optional<::mlir::Type > attrValue)
::mlir::TypeAttr getTypeOptAttr()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, ::mlir::TypeAttr type_opt)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
static TemplateParamOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::StringAttr sym_name, ::mlir::TypeAttr type_opt)
FoldAdaptor::Properties Properties
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::StringAttr getSymNameAttrName()
::mlir::StringAttr getSymNameAttr()
static constexpr ::llvm::StringLiteral getOperationName()
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::llvm::LogicalResult verifyInvariantsImpl()
::std::optional<::mlir::Type > getTypeOpt()
::llvm::StringRef getSymName()
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
static llvm::hash_code computePropertiesHash(const Properties &prop)
UnifiableCastOpAdaptor(UnifiableCastOp op)
UnifiableCastOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
::mlir::ValueRange getOperands()
::llvm::LogicalResult verify()
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)
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::Operation::operand_range getODSOperands(unsigned index)
static constexpr ::llvm::StringLiteral getOperationName()
::mlir::TypedValue<::mlir::Type > getInput()
::llvm::LogicalResult verifyInvariantsImpl()
::llvm::LogicalResult verifyInvariants()
FoldAdaptor::Properties Properties
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::mlir::Operation::result_range getODSResults(unsigned index)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static llvm::hash_code computePropertiesHash(const Properties &prop)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
static UnifiableCastOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value input)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
void print(::mlir::OpAsmPrinter &_odsPrinter)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
YieldOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
YieldOpAdaptor(YieldOp op)
::mlir::ValueRange getOperands()
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::llvm::LogicalResult verifyInvariantsImpl()
static llvm::hash_code computePropertiesHash(const Properties &prop)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static constexpr ::llvm::StringLiteral getOperationName()
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
FoldAdaptor::Properties Properties
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
static YieldOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value val)
::llvm::LogicalResult verifyInvariants()
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::mlir::Operation::operand_range getODSOperands(unsigned index)
::mlir::TypedValue<::mlir::Type > getVal()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value val)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
const Properties & getProperties()
::mlir::AffineMap getMap()
::mlir::IntegerAttr getNumDimsAttr()
ApplyMapOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::DictionaryAttr odsAttrs
::mlir::AffineMapAttr getMapAttr()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::llvm::APInt getNumDims()
::mlir::RegionRange odsRegions
::std::optional<::mlir::OperationName > odsOpName
const Properties & getProperties()
::mlir::FlatSymbolRefAttr getConstNameAttr()
ConstReadOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::std::optional<::mlir::OperationName > odsOpName
::mlir::RegionRange odsRegions
::llvm::StringRef getConstName()
::mlir::DictionaryAttr odsAttrs
const Properties & getProperties()
TemplateExprOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::std::optional<::mlir::OperationName > odsOpName
::mlir::RegionRange odsRegions
::mlir::RegionRange getRegions()
::mlir::DictionaryAttr odsAttrs
::llvm::StringRef getSymName()
::mlir::StringAttr getSymNameAttr()
TemplateOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::RegionRange odsRegions
const Properties & getProperties()
::mlir::StringAttr getSymNameAttr()
::mlir::DictionaryAttr odsAttrs
::std::optional<::mlir::OperationName > odsOpName
::mlir::RegionRange getRegions()
::llvm::StringRef getSymName()
::std::optional<::mlir::OperationName > odsOpName
::llvm::StringRef getSymName()
::mlir::TypeAttr getTypeOptAttr()
::std::optional<::mlir::Type > getTypeOpt()
TemplateParamOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::RegionRange odsRegions
::mlir::StringAttr getSymNameAttr()
const Properties & getProperties()
::mlir::DictionaryAttr odsAttrs
::std::optional<::mlir::OperationName > odsOpName
UnifiableCastOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::RegionRange odsRegions
const Properties & getProperties()
::mlir::DictionaryAttr odsAttrs
YieldOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
const Properties & getProperties()
::std::optional<::mlir::OperationName > odsOpName
::mlir::DictionaryAttr odsAttrs
::mlir::RegionRange odsRegions
Common interface for constant parameter-like symbol operations that can be defined within a TemplateO...
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)