31static ::mlir::LogicalResult __mlir_ods_local_type_constraint_Ops0(
32 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
33 unsigned valueIndex) {
34 if (!((::llvm::isa<::llzk::component::StructType>(type)))) {
35 return op->emitOpError(valueKind) <<
" #" << valueIndex
36 <<
" must be circuit component, but got " << type;
38 return ::mlir::success();
41static ::mlir::LogicalResult __mlir_ods_local_type_constraint_Ops1(
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 variadic of index, but got " << type;
48 return ::mlir::success();
51static ::mlir::LogicalResult __mlir_ods_local_type_constraint_Ops2(
52 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
53 unsigned valueIndex) {
55 return op->emitOpError(valueKind) <<
" #" << valueIndex
56 <<
" must be a valid LLZK type, but got " << type;
58 return ::mlir::success();
61static ::mlir::LogicalResult __mlir_ods_local_attr_constraint_Ops0(
62 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
63 if (attr && !((::llvm::isa<::mlir::StringAttr>(attr))))
64 return emitError() <<
"attribute '" << attrName
65 <<
"' failed to satisfy constraint: string attribute";
66 return ::mlir::success();
68static ::mlir::LogicalResult __mlir_ods_local_attr_constraint_Ops0(
69 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
70 return __mlir_ods_local_attr_constraint_Ops0(attr, attrName, [op]() {
71 return op->emitOpError();
75static ::mlir::LogicalResult __mlir_ods_local_attr_constraint_Ops1(
76 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
77 if (attr && !(((::llvm::isa<::mlir::TypeAttr>(attr))) && ((::llvm::isa<::mlir::Type>(::llvm::cast<::mlir::TypeAttr>(attr).getValue()))) && ((
::llzk::isValidType(::llvm::cast<::mlir::TypeAttr>(attr).getValue())))))
78 return emitError() <<
"attribute '" << attrName
79 <<
"' failed to satisfy constraint: type attribute of a valid LLZK type";
80 return ::mlir::success();
82static ::mlir::LogicalResult __mlir_ods_local_attr_constraint_Ops1(
83 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
84 return __mlir_ods_local_attr_constraint_Ops1(attr, attrName, [op]() {
85 return op->emitOpError();
89static ::mlir::LogicalResult __mlir_ods_local_attr_constraint_Ops2(
90 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
91 if (attr && !((::llvm::isa<::mlir::UnitAttr>(attr))))
92 return emitError() <<
"attribute '" << attrName
93 <<
"' failed to satisfy constraint: unit attribute";
94 return ::mlir::success();
96static ::mlir::LogicalResult __mlir_ods_local_attr_constraint_Ops2(
97 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
98 return __mlir_ods_local_attr_constraint_Ops2(attr, attrName, [op]() {
99 return op->emitOpError();
103static ::mlir::LogicalResult __mlir_ods_local_attr_constraint_Ops3(
104 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
105 if (attr && !((::llvm::isa<::mlir::FlatSymbolRefAttr>(attr))))
106 return emitError() <<
"attribute '" << attrName
107 <<
"' failed to satisfy constraint: flat symbol reference attribute";
108 return ::mlir::success();
110static ::mlir::LogicalResult __mlir_ods_local_attr_constraint_Ops3(
111 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
112 return __mlir_ods_local_attr_constraint_Ops3(attr, attrName, [op]() {
113 return op->emitOpError();
117static ::mlir::LogicalResult __mlir_ods_local_attr_constraint_Ops4(
118 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
119 if (attr && !(((::llvm::isa<::mlir::SymbolRefAttr>(attr))) || (((::llvm::isa<::mlir::IntegerAttr>(attr))) && ((::llvm::isa<::mlir::IndexType>(::llvm::cast<::mlir::IntegerAttr>(attr).getType())))) || ((::llvm::isa<::mlir::AffineMapAttr>(attr)))))
120 return emitError() <<
"attribute '" << attrName
121 <<
"' failed to satisfy constraint: symbol reference attribute or index attribute or AffineMap attribute";
122 return ::mlir::success();
124static ::mlir::LogicalResult __mlir_ods_local_attr_constraint_Ops4(
125 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
126 return __mlir_ods_local_attr_constraint_Ops4(attr, attrName, [op]() {
127 return op->emitOpError();
131static ::mlir::LogicalResult __mlir_ods_local_attr_constraint_Ops5(
132 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
133 if (attr && !((::llvm::isa<::mlir::DenseI32ArrayAttr>(attr))))
134 return emitError() <<
"attribute '" << attrName
135 <<
"' failed to satisfy constraint: i32 dense array attribute";
136 return ::mlir::success();
138static ::mlir::LogicalResult __mlir_ods_local_attr_constraint_Ops5(
139 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
140 return __mlir_ods_local_attr_constraint_Ops5(attr, attrName, [op]() {
141 return op->emitOpError();
145static ::mlir::LogicalResult __mlir_ods_local_attr_constraint_Ops6(
146 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
147 if (attr && !(((::llvm::isa<::mlir::ArrayAttr>(attr))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(attr), [&](::mlir::Attribute attr) {
return attr && ((::llvm::isa<::mlir::FlatSymbolRefAttr>(attr))); }))))
148 return emitError() <<
"attribute '" << attrName
149 <<
"' failed to satisfy constraint: flat symbol ref array attribute";
150 return ::mlir::success();
152static ::mlir::LogicalResult __mlir_ods_local_attr_constraint_Ops6(
153 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
154 return __mlir_ods_local_attr_constraint_Ops6(attr, attrName, [op]() {
155 return op->emitOpError();
159static ::mlir::LogicalResult __mlir_ods_local_region_constraint_Ops0(
160 ::mlir::Operation *op, ::mlir::Region ®ion, ::llvm::StringRef regionName,
161 unsigned regionIndex) {
162 if (!((::llvm::hasNItems(region, 1)))) {
163 return op->emitOpError(
"region #") << regionIndex
164 << (regionName.empty() ?
" " :
" ('" + regionName +
"') ")
165 <<
"failed to verify constraint: region with 1 blocks";
167 return ::mlir::success();
197 return ::mlir::success();
206 return {std::next(getOperation()->operand_begin(), valueRange.first),
207 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
216 return {std::next(getOperation()->result_begin(), valueRange.first),
217 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
221 return ::llvm::cast<::mlir::TypedValue<::llzk::component::StructType>>(*
getODSResults(0).begin());
225 odsState.addTypes(result);
228void CreateStructOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
229 assert(resultTypes.size() == 1u &&
"mismatched number of results");
230 odsState.addTypes(resultTypes);
233void CreateStructOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
234 assert(operands.size() == 0u &&
"mismatched number of parameters");
235 odsState.addOperands(operands);
236 odsState.addAttributes(attributes);
237 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
238 odsState.addTypes(resultTypes);
243 unsigned index = 0; (void)index;
246 for (
auto v : valueGroup0) {
247 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops0(*
this, v.getType(),
"result", index++)))
248 return ::mlir::failure();
251 return ::mlir::success();
259 ::mlir::Type resultRawTypes[1];
260 ::llvm::ArrayRef<::mlir::Type> resultTypes(resultRawTypes);
261 if (parser.parseColon())
262 return ::mlir::failure();
266 if (parser.parseCustomTypeWithFallback(type))
267 return ::mlir::failure();
268 resultRawTypes[0] = type;
271 auto loc = parser.getCurrentLocation();(void)loc;
272 if (parser.parseOptionalAttrDict(result.attributes))
273 return ::mlir::failure();
275 result.addTypes(resultTypes);
276 return ::mlir::success();
280 _odsPrinter <<
' ' <<
":";
284 if (
auto validType = ::llvm::dyn_cast<::llzk::component::StructType>(type))
285 _odsPrinter.printStrippedAttrOrType(validType);
289 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
290 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
320 auto attr = ::llvm::cast<::mlir::StringAttr>(
getProperties().sym_name);
326 return attr.getValue();
330 auto attr = ::llvm::cast<::mlir::TypeAttr>(
getProperties().type);
336 return ::llvm::cast<::mlir::Type>(attr.getValue());
340 auto attr = ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(
getProperties().column);
342 attr = ((
false) ? ::mlir::Builder(
odsAttrs.getContext()).getUnitAttr() :
nullptr);
349 return ((
false) ? ::mlir::Builder(
odsAttrs.getContext()).getUnitAttr() :
nullptr) !=
nullptr;
350 return attr !=
nullptr;
359 if (!tblgen_sym_name)
return emitError(loc,
"'struct.field' op ""requires attribute 'sym_name'");
361 if (!tblgen_type)
return emitError(loc,
"'struct.field' op ""requires attribute 'type'");
363 if (tblgen_sym_name && !((::llvm::isa<::mlir::StringAttr>(tblgen_sym_name))))
364 return emitError(loc,
"'struct.field' op ""attribute 'sym_name' failed to satisfy constraint: string attribute");
366 if (tblgen_type && !(((::llvm::isa<::mlir::TypeAttr>(tblgen_type))) && ((::llvm::isa<::mlir::Type>(::llvm::cast<::mlir::TypeAttr>(tblgen_type).getValue()))) && ((
::llzk::isValidType(::llvm::cast<::mlir::TypeAttr>(tblgen_type).getValue())))))
367 return emitError(loc,
"'struct.field' op ""attribute 'type' failed to satisfy constraint: type attribute of a valid LLZK type");
369 if (tblgen_column && !((::llvm::isa<::mlir::UnitAttr>(tblgen_column))))
370 return emitError(loc,
"'struct.field' op ""attribute 'column' failed to satisfy constraint: unit attribute");
371 return ::mlir::success();
380 return {std::next(getOperation()->operand_begin(), valueRange.first),
381 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
390 return {std::next(getOperation()->result_begin(), valueRange.first),
391 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
395 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
397 emitError() <<
"expected DictionaryAttr to set properties";
398 return ::mlir::failure();
402 auto &propStorage = prop.
column;
403 auto attr = dict.get(
"column");
406 emitError() <<
"expected key entry for column in DictionaryAttr to set "
408 return ::mlir::failure();
410 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
412 propStorage = convertedAttr;
414 emitError() <<
"Invalid attribute `column` in property conversion: " << attr;
415 return ::mlir::failure();
422 auto attr = dict.get(
"sym_name");
425 emitError() <<
"expected key entry for sym_name in DictionaryAttr to set "
427 return ::mlir::failure();
429 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
431 propStorage = convertedAttr;
433 emitError() <<
"Invalid attribute `sym_name` in property conversion: " << attr;
434 return ::mlir::failure();
440 auto &propStorage = prop.
type;
441 auto attr = dict.get(
"type");
444 emitError() <<
"expected key entry for type in DictionaryAttr to set "
446 return ::mlir::failure();
448 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
450 propStorage = convertedAttr;
452 emitError() <<
"Invalid attribute `type` in property conversion: " << attr;
453 return ::mlir::failure();
457 return ::mlir::success();
461 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
462 ::mlir::Builder odsBuilder{ctx};
465 const auto &propStorage = prop.
column;
467 attrs.push_back(odsBuilder.getNamedAttr(
"column",
472 const auto &propStorage = prop.
sym_name;
474 attrs.push_back(odsBuilder.getNamedAttr(
"sym_name",
479 const auto &propStorage = prop.
type;
481 attrs.push_back(odsBuilder.getNamedAttr(
"type",
486 return odsBuilder.getDictionaryAttr(attrs);
491 return llvm::hash_combine(
492 llvm::hash_value(prop.
column.getAsOpaquePointer()),
493 llvm::hash_value(prop.
sym_name.getAsOpaquePointer()),
494 llvm::hash_value(prop.
type.getAsOpaquePointer()));
498 if (name ==
"column")
501 if (name ==
"sym_name")
510 if (name ==
"column") {
511 prop.
column = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
column)>>(value);
515 if (name ==
"sym_name") {
516 prop.
sym_name = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
sym_name)>>(value);
520 if (name ==
"type") {
521 prop.
type = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
type)>>(value);
531 if (prop.
type) attrs.append(
"type", prop.
type);
534::mlir::LogicalResult
FieldDefOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
537 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(attr,
"column", emitError)))
538 return ::mlir::failure();
543 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops0(attr,
"sym_name", emitError)))
544 return ::mlir::failure();
549 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(attr,
"type", emitError)))
550 return ::mlir::failure();
552 return ::mlir::success();
556 auto &prop = state.getOrAddProperties<
Properties>(); (void)prop;
557 if (::mlir::failed(reader.readOptionalAttribute(prop.
column)))
558 return ::mlir::failure();
560 if (::mlir::failed(reader.readAttribute(prop.
sym_name)))
561 return ::mlir::failure();
563 if (::mlir::failed(reader.readAttribute(prop.
type)))
564 return ::mlir::failure();
565 return ::mlir::success();
569 auto &prop = getProperties(); (void)prop;
571 writer.writeOptionalAttribute(prop.
column);
572 writer.writeAttribute(prop.
sym_name);
573 writer.writeAttribute(prop.
type);
577 return ::llvm::cast<::mlir::StringAttr>(getProperties().sym_name);
582 return attr.getValue();
586 return ::llvm::cast<::mlir::TypeAttr>(getProperties().type);
591 return ::llvm::cast<::mlir::Type>(attr.getValue());
595 return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().column);
601 return ((
false) ? ::mlir::Builder((*this)->getContext()).getUnitAttr() :
nullptr) !=
nullptr;
602 return attr !=
nullptr;
610 (*this)->setAttr(
getSymNameAttrName(), ::mlir::Builder((*this)->getContext()).getStringAttr(attrValue));
627 return (*this)->setAttr(
getColumnAttrName(), ((attrValue) ? ::mlir::Builder((*this)->getContext()).getUnitAttr() :
nullptr));
632 auto &attr = getProperties().column;
637void FieldDefOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes,
bool isColumn) {
638 build(odsBuilder, odsState, {}, {}, attributes, isColumn);
642 auto tblgen_column = getProperties().column; (void)tblgen_column;
643 auto tblgen_sym_name = getProperties().sym_name; (void)tblgen_sym_name;
644 if (!tblgen_sym_name)
return emitOpError(
"requires attribute 'sym_name'");
645 auto tblgen_type = getProperties().type; (void)tblgen_type;
646 if (!tblgen_type)
return emitOpError(
"requires attribute 'type'");
648 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops0(*
this, tblgen_sym_name,
"sym_name")))
649 return ::mlir::failure();
651 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(*
this, tblgen_type,
"type")))
652 return ::mlir::failure();
654 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(*
this, tblgen_column,
"column")))
655 return ::mlir::failure();
656 return ::mlir::success();
663::mlir::ParseResult
FieldDefOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
664 ::mlir::StringAttr sym_nameAttr;
665 ::mlir::TypeAttr typeAttr;
667 if (parser.parseSymbolName(sym_nameAttr))
668 return ::mlir::failure();
670 if (parser.parseColon())
671 return ::mlir::failure();
673 if (parser.parseCustomAttributeWithFallback(typeAttr, parser.getBuilder().getType<::mlir::NoneType>())) {
674 return ::mlir::failure();
678 auto loc = parser.getCurrentLocation();(void)loc;
679 if (parser.parseOptionalAttrDict(result.attributes))
680 return ::mlir::failure();
682 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
684 return ::mlir::failure();
686 return ::mlir::success();
692 _odsPrinter <<
' ' <<
":";
694 _odsPrinter.printAttributeWithoutType(
getTypeAttr());
695 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
696 elidedAttrs.push_back(
"sym_name");
697 elidedAttrs.push_back(
"type");
699 ::mlir::Builder odsBuilder(getContext());
701 if(attr && (attr == ((
false) ? odsBuilder.getUnitAttr() :
nullptr)))
702 elidedAttrs.push_back(
"column");
704 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
726 bool isVariadic[] = {
false,
true};
727 int prevVariadicCount = 0;
728 for (
unsigned i = 0; i < index; ++i)
729 if (isVariadic[i]) ++prevVariadicCount;
733 int variadicSize = (odsOperandsSize - 1) / 1;
738 int start = index + (variadicSize - 1) * prevVariadicCount;
739 int size = isVariadic[index] ? variadicSize : 1;
740 return {start, size};
748 auto attr = ::llvm::cast<::mlir::FlatSymbolRefAttr>(
getProperties().field_name);
754 return attr.getValue();
758 auto attr = ::llvm::dyn_cast_or_null<::mlir::Attribute>(
getProperties().tableOffset);
764 return attr ? ::std::optional<::mlir::Attribute>(attr) : (::std::nullopt);
768 auto attr = ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(
getProperties().numDimsPerMap);
778 auto attr = ::llvm::cast<::mlir::DenseI32ArrayAttr>(
getProperties().mapOpGroupSizes);
792 if (!tblgen_field_name)
return emitError(loc,
"'struct.readf' op ""requires attribute 'field_name'");
794 if (!tblgen_mapOpGroupSizes)
return emitError(loc,
"'struct.readf' op ""requires attribute 'mapOpGroupSizes'");
798 if (tblgen_field_name && !((::llvm::isa<::mlir::FlatSymbolRefAttr>(tblgen_field_name))))
799 return emitError(loc,
"'struct.readf' op ""attribute 'field_name' failed to satisfy constraint: flat symbol reference attribute");
801 if (tblgen_tableOffset && !(((::llvm::isa<::mlir::SymbolRefAttr>(tblgen_tableOffset))) || (((::llvm::isa<::mlir::IntegerAttr>(tblgen_tableOffset))) && ((::llvm::isa<::mlir::IndexType>(::llvm::cast<::mlir::IntegerAttr>(tblgen_tableOffset).getType())))) || ((::llvm::isa<::mlir::AffineMapAttr>(tblgen_tableOffset)))))
802 return emitError(loc,
"'struct.readf' op ""attribute 'tableOffset' failed to satisfy constraint: symbol reference attribute or index attribute or AffineMap attribute");
804 if (tblgen_numDimsPerMap && !((::llvm::isa<::mlir::DenseI32ArrayAttr>(tblgen_numDimsPerMap))))
805 return emitError(loc,
"'struct.readf' op ""attribute 'numDimsPerMap' failed to satisfy constraint: i32 dense array attribute");
807 if (tblgen_mapOpGroupSizes && !((::llvm::isa<::mlir::DenseI32ArrayAttr>(tblgen_mapOpGroupSizes))))
808 return emitError(loc,
"'struct.readf' op ""attribute 'mapOpGroupSizes' failed to satisfy constraint: i32 dense array attribute");
809 return ::mlir::success();
813 bool isVariadic[] = {
false,
true};
814 int prevVariadicCount = 0;
815 for (
unsigned i = 0; i < index; ++i)
816 if (isVariadic[i]) ++prevVariadicCount;
820 int variadicSize = (getOperation()->getNumOperands() - 1) / 1;
825 int start = index + (variadicSize - 1) * prevVariadicCount;
826 int size = isVariadic[index] ? variadicSize : 1;
827 return {start, size};
832 return {std::next(getOperation()->operand_begin(), valueRange.first),
833 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
837 return ::llvm::cast<::mlir::TypedValue<::llzk::component::StructType>>(*
getODSOperands(0).begin());
846 return getOperation()->getOpOperand(range.first);
851 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
861 return {std::next(getOperation()->result_begin(), valueRange.first),
862 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
866 return ::llvm::cast<::mlir::Value>(*
getODSResults(0).begin());
870 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
872 emitError() <<
"expected DictionaryAttr to set properties";
873 return ::mlir::failure();
878 auto attr = dict.get(
"field_name");
881 emitError() <<
"expected key entry for field_name in DictionaryAttr to set "
883 return ::mlir::failure();
885 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
887 propStorage = convertedAttr;
889 emitError() <<
"Invalid attribute `field_name` in property conversion: " << attr;
890 return ::mlir::failure();
897 auto attr = dict.get(
"mapOpGroupSizes");
900 emitError() <<
"expected key entry for mapOpGroupSizes in DictionaryAttr to set "
902 return ::mlir::failure();
904 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
906 propStorage = convertedAttr;
908 emitError() <<
"Invalid attribute `mapOpGroupSizes` in property conversion: " << attr;
909 return ::mlir::failure();
916 auto attr = dict.get(
"numDimsPerMap");
919 emitError() <<
"expected key entry for numDimsPerMap in DictionaryAttr to set "
921 return ::mlir::failure();
923 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
925 propStorage = convertedAttr;
927 emitError() <<
"Invalid attribute `numDimsPerMap` in property conversion: " << attr;
928 return ::mlir::failure();
935 auto attr = dict.get(
"tableOffset");
938 emitError() <<
"expected key entry for tableOffset in DictionaryAttr to set "
940 return ::mlir::failure();
942 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
944 propStorage = convertedAttr;
946 emitError() <<
"Invalid attribute `tableOffset` in property conversion: " << attr;
947 return ::mlir::failure();
951 return ::mlir::success();
955 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
956 ::mlir::Builder odsBuilder{ctx};
961 attrs.push_back(odsBuilder.getNamedAttr(
"field_name",
968 attrs.push_back(odsBuilder.getNamedAttr(
"mapOpGroupSizes",
975 attrs.push_back(odsBuilder.getNamedAttr(
"numDimsPerMap",
982 attrs.push_back(odsBuilder.getNamedAttr(
"tableOffset",
987 return odsBuilder.getDictionaryAttr(attrs);
992 return llvm::hash_combine(
993 llvm::hash_value(prop.
field_name.getAsOpaquePointer()),
996 llvm::hash_value(prop.
tableOffset.getAsOpaquePointer()));
1000 if (name ==
"field_name")
1003 if (name ==
"mapOpGroupSizes")
1006 if (name ==
"numDimsPerMap")
1009 if (name ==
"tableOffset")
1011 return std::nullopt;
1015 if (name ==
"field_name") {
1016 prop.
field_name = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
field_name)>>(value);
1020 if (name ==
"mapOpGroupSizes") {
1025 if (name ==
"numDimsPerMap") {
1030 if (name ==
"tableOffset") {
1046::mlir::LogicalResult
FieldReadOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1049 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops3(attr,
"field_name", emitError)))
1050 return ::mlir::failure();
1055 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops5(attr,
"mapOpGroupSizes", emitError)))
1056 return ::mlir::failure();
1061 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops5(attr,
"numDimsPerMap", emitError)))
1062 return ::mlir::failure();
1067 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops4(attr,
"tableOffset", emitError)))
1068 return ::mlir::failure();
1070 return ::mlir::success();
1074 auto &prop = state.getOrAddProperties<
Properties>(); (void)prop;
1075 if (::mlir::failed(reader.readAttribute(prop.
field_name)))
1076 return ::mlir::failure();
1079 return ::mlir::failure();
1081 if (::mlir::failed(reader.readOptionalAttribute(prop.
numDimsPerMap)))
1082 return ::mlir::failure();
1084 if (::mlir::failed(reader.readOptionalAttribute(prop.
tableOffset)))
1085 return ::mlir::failure();
1086 return ::mlir::success();
1090 auto &prop = getProperties(); (void)prop;
1100 return ::llvm::cast<::mlir::FlatSymbolRefAttr>(getProperties().field_name);
1105 return attr.getValue();
1109 return ::llvm::dyn_cast_or_null<::mlir::Attribute>(getProperties().tableOffset);
1114 return attr ? ::std::optional<::mlir::Attribute>(attr) : (::std::nullopt);
1118 return ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(getProperties().numDimsPerMap);
1127 return ::llvm::cast<::mlir::DenseI32ArrayAttr>(getProperties().mapOpGroupSizes);
1140 (*this)->setAttr(
getFieldNameAttrName(), ::mlir::SymbolRefAttr::get(::mlir::Builder((*this)->getContext()).getContext(), attrValue));
1152 (*this)->setAttr(
getNumDimsPerMapAttrName(), ::mlir::Builder((*this)->getContext()).getDenseI32ArrayAttr(attrValue));
1164 auto &attr = getProperties().tableOffset;
1169void FieldReadOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type resultType, ::mlir::Value
component, ::mlir::StringAttr field, ::mlir::SymbolRefAttr dist) {
1170 build(odsBuilder, odsState, resultType,
component, field, dist, ::mlir::ValueRange(), std::nullopt);
1174void FieldReadOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type resultType, ::mlir::Value
component, ::mlir::StringAttr field, ::mlir::IntegerAttr dist) {
1175 build(odsBuilder, odsState, resultType,
component, field, dist, ::mlir::ValueRange(), std::nullopt);
1180 ::mlir::Builder odsBuilder(opName.getContext());
1182 properties.
numDimsPerMap = odsBuilder.getDenseI32ArrayAttr({});
1186 auto tblgen_field_name = getProperties().field_name; (void)tblgen_field_name;
1187 if (!tblgen_field_name)
return emitOpError(
"requires attribute 'field_name'");
1188 auto tblgen_mapOpGroupSizes = getProperties().mapOpGroupSizes; (void)tblgen_mapOpGroupSizes;
1189 if (!tblgen_mapOpGroupSizes)
return emitOpError(
"requires attribute 'mapOpGroupSizes'");
1190 auto tblgen_numDimsPerMap = getProperties().numDimsPerMap; (void)tblgen_numDimsPerMap;
1191 auto tblgen_tableOffset = getProperties().tableOffset; (void)tblgen_tableOffset;
1193 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops3(*
this, tblgen_field_name,
"field_name")))
1194 return ::mlir::failure();
1196 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops4(*
this, tblgen_tableOffset,
"tableOffset")))
1197 return ::mlir::failure();
1199 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops5(*
this, tblgen_numDimsPerMap,
"numDimsPerMap")))
1200 return ::mlir::failure();
1202 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops5(*
this, tblgen_mapOpGroupSizes,
"mapOpGroupSizes")))
1203 return ::mlir::failure();
1205 unsigned index = 0; (void)index;
1208 for (
auto v : valueGroup0) {
1209 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops0(*
this, v.getType(),
"operand", index++)))
1210 return ::mlir::failure();
1213 if (::mlir::failed(::mlir::OpTrait::impl::verifyValueSizeAttr(*
this,
"mapOpGroupSizes",
"mapOperands", valueGroup1.size())))
1214 return ::mlir::failure();
1216 for (
auto v : valueGroup1) {
1217 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
1218 return ::mlir::failure();
1222 unsigned index = 0; (void)index;
1225 for (
auto v : valueGroup0) {
1226 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
1227 return ::mlir::failure();
1230 return ::mlir::success();
1235 return ::mlir::success();
1236 return ::mlir::failure();
1240 ::mlir::OpAsmParser::UnresolvedOperand componentRawOperands[1];
1241 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> componentOperands(componentRawOperands); ::llvm::SMLoc componentOperandsLoc;
1242 (void)componentOperandsLoc;
1243 ::mlir::FlatSymbolRefAttr field_nameAttr;
1244 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> mapOperandsOperands;
1245 llvm::SmallVector<int32_t> mapOperandsOperandGroupSizes;
1246 ::llvm::SMLoc mapOperandsOperandsLoc;
1247 (void)mapOperandsOperandsLoc;
1248 ::mlir::DenseI32ArrayAttr numDimsPerMapAttr;
1249 ::mlir::Type componentRawTypes[1];
1250 ::llvm::ArrayRef<::mlir::Type> componentTypes(componentRawTypes);
1251 ::mlir::Type valRawTypes[1];
1252 ::llvm::ArrayRef<::mlir::Type> valTypes(valRawTypes);
1254 componentOperandsLoc = parser.getCurrentLocation();
1255 if (parser.parseOperand(componentRawOperands[0]))
1256 return ::mlir::failure();
1257 if (parser.parseLSquare())
1258 return ::mlir::failure();
1260 if (parser.parseCustomAttributeWithFallback(field_nameAttr, parser.getBuilder().getType<::mlir::NoneType>())) {
1261 return ::mlir::failure();
1264 if (parser.parseRSquare())
1265 return ::mlir::failure();
1266 if (::mlir::succeeded(parser.parseOptionalLBrace())) {
1268 mapOperandsOperandsLoc = parser.getCurrentLocation();
1269 ::llvm::SmallVector<::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand>> mapOperandsOperandGroups;
1271 if (odsResult) return ::mlir::failure();
1272 for (
const auto &subRange : mapOperandsOperandGroups) {
1273 mapOperandsOperands.append(subRange.begin(), subRange.end());
1274 mapOperandsOperandGroupSizes.push_back(subRange.size());
1276 if (numDimsPerMapAttr)
1279 if (parser.parseRBrace())
1280 return ::mlir::failure();
1282 if (parser.parseColon())
1283 return ::mlir::failure();
1287 if (parser.parseCustomTypeWithFallback(type))
1288 return ::mlir::failure();
1289 componentRawTypes[0] = type;
1291 if (parser.parseComma())
1292 return ::mlir::failure();
1296 if (parser.parseCustomTypeWithFallback(type))
1297 return ::mlir::failure();
1298 valRawTypes[0] = type;
1301 auto loc = parser.getCurrentLocation();(void)loc;
1302 if (parser.parseOptionalAttrDict(result.attributes))
1303 return ::mlir::failure();
1305 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
1307 return ::mlir::failure();
1309 result.getOrAddProperties<
FieldReadOp::Properties>().mapOpGroupSizes = parser.getBuilder().getDenseI32ArrayAttr(mapOperandsOperandGroupSizes);
1310 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIndexType();
1311 result.addTypes(valTypes);
1312 if (parser.resolveOperands(componentOperands, componentTypes, componentOperandsLoc, result.operands))
1313 return ::mlir::failure();
1314 if (parser.resolveOperands(mapOperandsOperands, odsBuildableType0, mapOperandsOperandsLoc, result.operands))
1315 return ::mlir::failure();
1316 return ::mlir::success();
1326 _odsPrinter <<
' ' <<
"{";
1330 _odsPrinter <<
' ' <<
":";
1334 if (
auto validType = ::llvm::dyn_cast<::llzk::component::StructType>(type))
1335 _odsPrinter.printStrippedAttrOrType(validType);
1337 _odsPrinter << type;
1342 auto type =
getVal().getType();
1343 if (
auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
1344 _odsPrinter.printStrippedAttrOrType(validType);
1346 _odsPrinter << type;
1348 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1349 elidedAttrs.push_back(
"mapOpGroupSizes");
1350 elidedAttrs.push_back(
"field_name");
1351 elidedAttrs.push_back(
"numDimsPerMap");
1353 ::mlir::Builder odsBuilder(getContext());
1355 if(attr && (attr == odsBuilder.getDenseI32ArrayAttr({})))
1356 elidedAttrs.push_back(
"numDimsPerMap");
1358 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1370namespace component {
1392 auto attr = ::llvm::cast<::mlir::FlatSymbolRefAttr>(
getProperties().field_name);
1398 return attr.getValue();
1406 if (!tblgen_field_name)
return emitError(loc,
"'struct.writef' op ""requires attribute 'field_name'");
1408 if (tblgen_field_name && !((::llvm::isa<::mlir::FlatSymbolRefAttr>(tblgen_field_name))))
1409 return emitError(loc,
"'struct.writef' op ""attribute 'field_name' failed to satisfy constraint: flat symbol reference attribute");
1410 return ::mlir::success();
1419 return {std::next(getOperation()->operand_begin(), valueRange.first),
1420 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1424 return ::llvm::cast<::mlir::TypedValue<::llzk::component::StructType>>(*
getODSOperands(0).begin());
1433 return getOperation()->getOpOperand(range.first);
1438 return getOperation()->getOpOperand(range.first);
1447 return {std::next(getOperation()->result_begin(), valueRange.first),
1448 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1452 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
1454 emitError() <<
"expected DictionaryAttr to set properties";
1455 return ::mlir::failure();
1460 auto attr = dict.get(
"field_name");
1463 emitError() <<
"expected key entry for field_name in DictionaryAttr to set "
1465 return ::mlir::failure();
1467 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
1468 if (convertedAttr) {
1469 propStorage = convertedAttr;
1471 emitError() <<
"Invalid attribute `field_name` in property conversion: " << attr;
1472 return ::mlir::failure();
1476 return ::mlir::success();
1480 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
1481 ::mlir::Builder odsBuilder{ctx};
1486 attrs.push_back(odsBuilder.getNamedAttr(
"field_name",
1491 return odsBuilder.getDictionaryAttr(attrs);
1496 return llvm::hash_combine(
1497 llvm::hash_value(prop.
field_name.getAsOpaquePointer()));
1501 if (name ==
"field_name")
1503 return std::nullopt;
1507 if (name ==
"field_name") {
1508 prop.
field_name = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
field_name)>>(value);
1520 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops3(attr,
"field_name", emitError)))
1521 return ::mlir::failure();
1523 return ::mlir::success();
1527 auto &prop = state.getOrAddProperties<
Properties>(); (void)prop;
1528 if (::mlir::failed(reader.readAttribute(prop.
field_name)))
1529 return ::mlir::failure();
1530 return ::mlir::success();
1534 auto &prop = getProperties(); (void)prop;
1539 return ::llvm::cast<::mlir::FlatSymbolRefAttr>(getProperties().field_name);
1544 return attr.getValue();
1552 (*this)->setAttr(
getFieldNameAttrName(), ::mlir::SymbolRefAttr::get(::mlir::Builder((*this)->getContext()).getContext(), attrValue));
1555void FieldWriteOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value
component, ::mlir::FlatSymbolRefAttr field_name, ::mlir::Value val) {
1557 odsState.addOperands(val);
1558 odsState.getOrAddProperties<
Properties>().field_name = field_name;
1561void FieldWriteOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value
component, ::mlir::FlatSymbolRefAttr field_name, ::mlir::Value val) {
1563 odsState.addOperands(val);
1564 odsState.getOrAddProperties<
Properties>().field_name = field_name;
1565 assert(resultTypes.size() == 0u &&
"mismatched number of results");
1566 odsState.addTypes(resultTypes);
1569void FieldWriteOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value
component, ::llvm::StringRef field_name, ::mlir::Value val) {
1571 odsState.addOperands(val);
1572 odsState.getOrAddProperties<
Properties>().field_name = ::mlir::SymbolRefAttr::get(odsBuilder.getContext(), field_name);
1575void FieldWriteOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value
component, ::llvm::StringRef field_name, ::mlir::Value val) {
1577 odsState.addOperands(val);
1578 odsState.getOrAddProperties<
Properties>().field_name = ::mlir::SymbolRefAttr::get(odsBuilder.getContext(), field_name);
1579 assert(resultTypes.size() == 0u &&
"mismatched number of results");
1580 odsState.addTypes(resultTypes);
1583void FieldWriteOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1584 assert(operands.size() == 2u &&
"mismatched number of parameters");
1585 odsState.addOperands(operands);
1586 odsState.addAttributes(attributes);
1587 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
1588 odsState.addTypes(resultTypes);
1592 auto tblgen_field_name = getProperties().field_name; (void)tblgen_field_name;
1593 if (!tblgen_field_name)
return emitOpError(
"requires attribute 'field_name'");
1595 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops3(*
this, tblgen_field_name,
"field_name")))
1596 return ::mlir::failure();
1598 unsigned index = 0; (void)index;
1601 for (
auto v : valueGroup0) {
1602 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops0(*
this, v.getType(),
"operand", index++)))
1603 return ::mlir::failure();
1607 for (
auto v : valueGroup1) {
1608 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"operand", index++)))
1609 return ::mlir::failure();
1612 return ::mlir::success();
1620 ::mlir::OpAsmParser::UnresolvedOperand componentRawOperands[1];
1621 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> componentOperands(componentRawOperands); ::llvm::SMLoc componentOperandsLoc;
1622 (void)componentOperandsLoc;
1623 ::mlir::FlatSymbolRefAttr field_nameAttr;
1624 ::mlir::OpAsmParser::UnresolvedOperand valRawOperands[1];
1625 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> valOperands(valRawOperands); ::llvm::SMLoc valOperandsLoc;
1626 (void)valOperandsLoc;
1627 ::mlir::Type componentRawTypes[1];
1628 ::llvm::ArrayRef<::mlir::Type> componentTypes(componentRawTypes);
1629 ::mlir::Type valRawTypes[1];
1630 ::llvm::ArrayRef<::mlir::Type> valTypes(valRawTypes);
1632 componentOperandsLoc = parser.getCurrentLocation();
1633 if (parser.parseOperand(componentRawOperands[0]))
1634 return ::mlir::failure();
1635 if (parser.parseLSquare())
1636 return ::mlir::failure();
1638 if (parser.parseCustomAttributeWithFallback(field_nameAttr, parser.getBuilder().getType<::mlir::NoneType>())) {
1639 return ::mlir::failure();
1642 if (parser.parseRSquare())
1643 return ::mlir::failure();
1644 if (parser.parseEqual())
1645 return ::mlir::failure();
1647 valOperandsLoc = parser.getCurrentLocation();
1648 if (parser.parseOperand(valRawOperands[0]))
1649 return ::mlir::failure();
1650 if (parser.parseColon())
1651 return ::mlir::failure();
1655 if (parser.parseCustomTypeWithFallback(type))
1656 return ::mlir::failure();
1657 componentRawTypes[0] = type;
1659 if (parser.parseComma())
1660 return ::mlir::failure();
1664 if (parser.parseCustomTypeWithFallback(type))
1665 return ::mlir::failure();
1666 valRawTypes[0] = type;
1669 auto loc = parser.getCurrentLocation();(void)loc;
1670 if (parser.parseOptionalAttrDict(result.attributes))
1671 return ::mlir::failure();
1673 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
1675 return ::mlir::failure();
1677 if (parser.resolveOperands(componentOperands, componentTypes, componentOperandsLoc, result.operands))
1678 return ::mlir::failure();
1679 if (parser.resolveOperands(valOperands, valTypes, valOperandsLoc, result.operands))
1680 return ::mlir::failure();
1681 return ::mlir::success();
1690 _odsPrinter <<
' ' <<
"=";
1693 _odsPrinter <<
' ' <<
":";
1697 if (
auto validType = ::llvm::dyn_cast<::llzk::component::StructType>(type))
1698 _odsPrinter.printStrippedAttrOrType(validType);
1700 _odsPrinter << type;
1705 auto type =
getVal().getType();
1706 if (
auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
1707 _odsPrinter.printStrippedAttrOrType(validType);
1709 _odsPrinter << type;
1711 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1712 elidedAttrs.push_back(
"field_name");
1713 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1725namespace component {
1747 auto attr = ::llvm::cast<::mlir::StringAttr>(
getProperties().sym_name);
1753 return attr.getValue();
1757 auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(
getProperties().const_params);
1763 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
1780 if (!tblgen_sym_name)
return emitError(loc,
"'struct.def' op ""requires attribute 'sym_name'");
1782 if (tblgen_sym_name && !((::llvm::isa<::mlir::StringAttr>(tblgen_sym_name))))
1783 return emitError(loc,
"'struct.def' op ""attribute 'sym_name' failed to satisfy constraint: string attribute");
1785 if (tblgen_const_params && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_const_params))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_const_params), [&](::mlir::Attribute attr) {
return attr && ((::llvm::isa<::mlir::FlatSymbolRefAttr>(attr))); }))))
1786 return emitError(loc,
"'struct.def' op ""attribute 'const_params' failed to satisfy constraint: flat symbol ref array attribute");
1787 return ::mlir::success();
1796 return {std::next(getOperation()->operand_begin(), valueRange.first),
1797 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1806 return {std::next(getOperation()->result_begin(), valueRange.first),
1807 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1811 return (*this)->getRegion(0);
1815 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
1817 emitError() <<
"expected DictionaryAttr to set properties";
1818 return ::mlir::failure();
1823 auto attr = dict.get(
"const_params");
1824 if (attr ||
false) {
1826 emitError() <<
"expected key entry for const_params in DictionaryAttr to set "
1828 return ::mlir::failure();
1830 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
1831 if (convertedAttr) {
1832 propStorage = convertedAttr;
1834 emitError() <<
"Invalid attribute `const_params` in property conversion: " << attr;
1835 return ::mlir::failure();
1842 auto attr = dict.get(
"sym_name");
1845 emitError() <<
"expected key entry for sym_name in DictionaryAttr to set "
1847 return ::mlir::failure();
1849 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
1850 if (convertedAttr) {
1851 propStorage = convertedAttr;
1853 emitError() <<
"Invalid attribute `sym_name` in property conversion: " << attr;
1854 return ::mlir::failure();
1858 return ::mlir::success();
1862 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
1863 ::mlir::Builder odsBuilder{ctx};
1868 attrs.push_back(odsBuilder.getNamedAttr(
"const_params",
1873 const auto &propStorage = prop.
sym_name;
1875 attrs.push_back(odsBuilder.getNamedAttr(
"sym_name",
1880 return odsBuilder.getDictionaryAttr(attrs);
1885 return llvm::hash_combine(
1886 llvm::hash_value(prop.
const_params.getAsOpaquePointer()),
1887 llvm::hash_value(prop.
sym_name.getAsOpaquePointer()));
1891 if (name ==
"const_params")
1894 if (name ==
"sym_name")
1896 return std::nullopt;
1900 if (name ==
"const_params") {
1905 if (name ==
"sym_name") {
1906 prop.
sym_name = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
sym_name)>>(value);
1917::mlir::LogicalResult
StructDefOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1920 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops6(attr,
"const_params", emitError)))
1921 return ::mlir::failure();
1926 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops0(attr,
"sym_name", emitError)))
1927 return ::mlir::failure();
1929 return ::mlir::success();
1933 auto &prop = state.getOrAddProperties<
Properties>(); (void)prop;
1934 if (::mlir::failed(reader.readOptionalAttribute(prop.
const_params)))
1935 return ::mlir::failure();
1937 if (::mlir::failed(reader.readAttribute(prop.
sym_name)))
1938 return ::mlir::failure();
1939 return ::mlir::success();
1943 auto &prop = getProperties(); (void)prop;
1946 writer.writeAttribute(prop.
sym_name);
1950 return ::llvm::cast<::mlir::StringAttr>(getProperties().sym_name);
1955 return attr.getValue();
1959 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().const_params);
1964 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
1972 (*this)->setAttr(
getSymNameAttrName(), ::mlir::Builder((*this)->getContext()).getStringAttr(attrValue));
1980 auto &attr = getProperties().const_params;
1985void StructDefOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, ::mlir::ArrayAttr const_params) {
1986 odsState.getOrAddProperties<
Properties>().sym_name = sym_name;
1988 odsState.getOrAddProperties<
Properties>().const_params = const_params;
1990 (void)odsState.addRegion();
1993void StructDefOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name, ::mlir::ArrayAttr const_params) {
1994 odsState.getOrAddProperties<
Properties>().sym_name = sym_name;
1996 odsState.getOrAddProperties<
Properties>().const_params = const_params;
1998 (void)odsState.addRegion();
1999 assert(resultTypes.size() == 0u &&
"mismatched number of results");
2000 odsState.addTypes(resultTypes);
2003void StructDefOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name, ::mlir::ArrayAttr const_params) {
2004 odsState.getOrAddProperties<
Properties>().sym_name = odsBuilder.getStringAttr(sym_name);
2006 odsState.getOrAddProperties<
Properties>().const_params = const_params;
2008 (void)odsState.addRegion();
2011void StructDefOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name, ::mlir::ArrayAttr const_params) {
2012 odsState.getOrAddProperties<
Properties>().sym_name = odsBuilder.getStringAttr(sym_name);
2014 odsState.getOrAddProperties<
Properties>().const_params = const_params;
2016 (void)odsState.addRegion();
2017 assert(resultTypes.size() == 0u &&
"mismatched number of results");
2018 odsState.addTypes(resultTypes);
2021void StructDefOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
2022 assert(operands.size() == 0u &&
"mismatched number of parameters");
2023 odsState.addOperands(operands);
2024 odsState.addAttributes(attributes);
2025 for (
unsigned i = 0; i != 1; ++i)
2026 (
void)odsState.addRegion();
2027 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
2028 odsState.addTypes(resultTypes);
2032 auto tblgen_const_params = getProperties().const_params; (void)tblgen_const_params;
2033 auto tblgen_sym_name = getProperties().sym_name; (void)tblgen_sym_name;
2034 if (!tblgen_sym_name)
return emitOpError(
"requires attribute 'sym_name'");
2036 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops0(*
this, tblgen_sym_name,
"sym_name")))
2037 return ::mlir::failure();
2039 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops6(*
this, tblgen_const_params,
"const_params")))
2040 return ::mlir::failure();
2042 unsigned index = 0; (void)index;
2044 for (
auto ®ion : ::llvm::MutableArrayRef((*this)->getRegion(0)))
2045 if (::mlir::failed(__mlir_ods_local_region_constraint_Ops0(*
this, region,
"body", index++)))
2046 return ::mlir::failure();
2048 return ::mlir::success();
2056 ::mlir::StringAttr sym_nameAttr;
2057 ::mlir::ArrayAttr const_paramsAttr;
2058 std::unique_ptr<::mlir::Region> bodyRegion = std::make_unique<::mlir::Region>();
2060 if (parser.parseSymbolName(sym_nameAttr))
2061 return ::mlir::failure();
2063 if (::mlir::succeeded(parser.parseOptionalLess())) {
2065 if (parser.parseCustomAttributeWithFallback(const_paramsAttr, parser.getBuilder().getType<::mlir::NoneType>())) {
2066 return ::mlir::failure();
2069 if (parser.parseGreater())
2070 return ::mlir::failure();
2073 if (parser.parseRegion(*bodyRegion))
2074 return ::mlir::failure();
2076 if (bodyRegion->empty()) bodyRegion->emplaceBlock();
2078 auto loc = parser.getCurrentLocation();(void)loc;
2079 if (parser.parseOptionalAttrDict(result.attributes))
2080 return ::mlir::failure();
2082 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
2084 return ::mlir::failure();
2086 result.addRegion(std::move(bodyRegion));
2087 return ::mlir::success();
2099 _odsPrinter.printRegion(
getBody());
2100 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
2101 elidedAttrs.push_back(
"sym_name");
2102 elidedAttrs.push_back(
"const_params");
2103 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
CreateStructOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
CreateStructOpAdaptor(CreateStructOp op)
::mlir::LogicalResult verify(::mlir::Location loc)
::mlir::ValueRange getOperands()
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::Operation::operand_range getODSOperands(unsigned index)
::mlir::TypedValue<::llzk::component::StructType > getResult()
::mlir::LogicalResult verifyInvariantsImpl()
::mlir::LogicalResult verifyInvariants()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::LogicalResult verify(::mlir::Location loc)
FieldDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
FieldDefOpAdaptor(FieldDefOp op)
::mlir::ValueRange getOperands()
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
void setColumnAttr(::mlir::UnitAttr attr)
FoldAdaptor::Properties Properties
::mlir::StringAttr getColumnAttrName()
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::LogicalResult verifyInvariantsImpl()
void setColumn(bool attrValue)
::mlir::StringAttr getSymNameAttrName()
void setSymNameAttr(::mlir::StringAttr attr)
::mlir::Attribute removeColumnAttr()
static llvm::hash_code computePropertiesHash(const Properties &prop)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, ::mlir::TypeAttr type, bool isColumn=false)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::Operation::operand_range getODSOperands(unsigned index)
::mlir::StringAttr getTypeAttrName()
::mlir::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
::mlir::UnitAttr getColumnAttr()
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::mlir::LogicalResult verifyInvariants()
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
::mlir::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
void setSymName(::llvm::StringRef attrValue)
void setType(::mlir::Type attrValue)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::llvm::StringRef getSymName()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::StringAttr getSymNameAttr()
::mlir::TypeAttr getTypeAttr()
void setTypeAttr(::mlir::TypeAttr attr)
FieldReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
::mlir::LogicalResult verify(::mlir::Location loc)
FieldReadOpAdaptor(FieldReadOp op)
::mlir::ValueRange getOperands()
FoldAdaptor::Properties Properties
::mlir::StringAttr getNumDimsPerMapAttrName()
::mlir::OpOperand & getComponentMutable()
::mlir::MutableOperandRangeRange getMapOperandsMutable()
::mlir::StringAttr getFieldNameAttrName()
void setNumDimsPerMap(::llvm::ArrayRef< int32_t > attrValue)
::mlir::StringAttr getTableOffsetAttrName()
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
::llvm::StringRef getFieldName()
::mlir::Attribute getTableOffsetAttr()
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::LogicalResult verify()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type resultType, ::mlir::Value component, ::mlir::StringAttr field)
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties)
bool isRead()
Return true if the op is a read, false if it's a write.
::mlir::OperandRangeRange getMapOperands()
::mlir::TypedValue<::llzk::component::StructType > getComponent()
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::mlir::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
::mlir::StringAttr getMapOpGroupSizesAttrName()
::mlir::LogicalResult verifyInvariants()
void setNumDimsPerMapAttr(::mlir::DenseI32ArrayAttr attr)
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
::mlir::Operation::operand_range getODSOperands(unsigned index)
void setMapOpGroupSizes(::llvm::ArrayRef< int32_t > attrValue)
::mlir::FlatSymbolRefAttr getFieldNameAttr()
::std::optional<::mlir::Attribute > getTableOffset()
::mlir::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::Attribute removeTableOffsetAttr()
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
void setMapOpGroupSizesAttr(::mlir::DenseI32ArrayAttr attr)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::mlir::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static llvm::hash_code computePropertiesHash(const Properties &prop)
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
::mlir::LogicalResult verifyInvariantsImpl()
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
void setFieldName(::llvm::StringRef attrValue)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
void setFieldNameAttr(::mlir::FlatSymbolRefAttr attr)
void print(::mlir::OpAsmPrinter &_odsPrinter)
void setTableOffsetAttr(::mlir::Attribute attr)
::mlir::LogicalResult verify(::mlir::Location loc)
FieldWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
FieldWriteOpAdaptor(FieldWriteOp op)
::mlir::ValueRange getOperands()
::mlir::OpOperand & getComponentMutable()
::mlir::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
bool isRead()
Return true if the op is a read, false if it's a write.
::llvm::StringRef getFieldName()
::mlir::OpOperand & getValMutable()
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
::mlir::LogicalResult verifyInvariantsImpl()
::mlir::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
void setFieldName(::llvm::StringRef attrValue)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::StringAttr getFieldNameAttrName()
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::Operation::operand_range getODSOperands(unsigned index)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::mlir::FlatSymbolRefAttr getFieldNameAttr()
::mlir::TypedValue<::llzk::component::StructType > getComponent()
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::mlir::LogicalResult verifyInvariants()
::mlir::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value component, ::mlir::FlatSymbolRefAttr field_name, ::mlir::Value val)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
FoldAdaptor::Properties Properties
static llvm::hash_code computePropertiesHash(const Properties &prop)
void setFieldNameAttr(::mlir::FlatSymbolRefAttr attr)
void print(::mlir::OpAsmPrinter &_odsPrinter)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
StructDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
::mlir::LogicalResult verify(::mlir::Location loc)
StructDefOpAdaptor(StructDefOp op)
::mlir::ValueRange getOperands()
static llvm::hash_code computePropertiesHash(const Properties &prop)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::mlir::Operation::operand_range getODSOperands(unsigned index)
::mlir::StringAttr getSymNameAttr()
::mlir::Region & getBody()
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::mlir::ArrayAttr getConstParamsAttr()
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::llvm::StringRef getSymName()
void setSymNameAttr(::mlir::StringAttr attr)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::mlir::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
FoldAdaptor::Properties Properties
::mlir::StringAttr getConstParamsAttrName()
::mlir::Attribute removeConstParamsAttr()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, ::mlir::ArrayAttr const_params)
::mlir::LogicalResult verifyInvariantsImpl()
::std::optional< ::mlir::ArrayAttr > getConstParams()
void setSymName(::llvm::StringRef attrValue)
::mlir::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::StringAttr getSymNameAttrName()
void setConstParamsAttr(::mlir::ArrayAttr attr)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::LogicalResult verifyInvariants()
CreateStructOpGenericAdaptorBase(::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::std::optional<::mlir::OperationName > odsOpName
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::RegionRange odsRegions
::mlir::DictionaryAttr getAttributes()
::mlir::DictionaryAttr odsAttrs
::llvm::StringRef getSymName()
::mlir::DictionaryAttr getAttributes()
::mlir::UnitAttr getColumnAttr()
FieldDefOpGenericAdaptorBase(::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
::std::optional<::mlir::OperationName > odsOpName
::mlir::RegionRange odsRegions
::mlir::TypeAttr getTypeAttr()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::StringAttr getSymNameAttr()
const Properties & getProperties()
::mlir::DictionaryAttr odsAttrs
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::DictionaryAttr odsAttrs
::std::optional<::mlir::Attribute > getTableOffset()
FieldReadOpGenericAdaptorBase(::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
::mlir::DictionaryAttr getAttributes()
const Properties & getProperties()
::mlir::RegionRange odsRegions
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
::mlir::FlatSymbolRefAttr getFieldNameAttr()
::mlir::Attribute getTableOffsetAttr()
::std::optional<::mlir::OperationName > odsOpName
::llvm::StringRef getFieldName()
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
::std::optional<::mlir::OperationName > odsOpName
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::llvm::StringRef getFieldName()
::mlir::DictionaryAttr getAttributes()
::mlir::FlatSymbolRefAttr getFieldNameAttr()
::mlir::DictionaryAttr odsAttrs
FieldWriteOpGenericAdaptorBase(::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
const Properties & getProperties()
::mlir::RegionRange odsRegions
StructDefOpGenericAdaptorBase(::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
::mlir::DictionaryAttr getAttributes()
::std::optional< ::mlir::ArrayAttr > getConstParams()
::mlir::ArrayAttr getConstParamsAttr()
::mlir::RegionRange odsRegions
::mlir::DictionaryAttr odsAttrs
::mlir::RegionRange getRegions()
::mlir::StringAttr getSymNameAttr()
::std::optional<::mlir::OperationName > odsOpName
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::Region & getBody()
::llvm::StringRef getSymName()
const Properties & getProperties()
bool isValidType(Type type)
void printMultiDimAndSymbolList(mlir::OpAsmPrinter &printer, mlir::Operation *op, mlir::OperandRangeRange multiMapOperands, mlir::DenseI32ArrayAttr numDimsPerMap)
mlir::ParseResult parseMultiDimAndSymbolList(mlir::OpAsmParser &parser, mlir::SmallVector< mlir::SmallVector< mlir::OpAsmParser::UnresolvedOperand > > &multiMapOperands, mlir::DenseI32ArrayAttr &numDimsPerMap)
tableOffsetTy tableOffset
numDimsPerMapTy numDimsPerMap
mapOpGroupSizesTy mapOpGroupSizes
const_paramsTy const_params