29static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops1(
30 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
31 unsigned valueIndex) {
33 return op->emitOpError(valueKind) <<
" #" << valueIndex
34 <<
" must be variadic of a valid LLZK type, but got " << type;
36 return ::mlir::success();
39static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops2(
40 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
41 unsigned valueIndex) {
42 if (!((::llvm::isa<::mlir::IndexType>(type)))) {
43 return op->emitOpError(valueKind) <<
" #" << valueIndex
44 <<
" must be variadic of index, but got " << type;
46 return ::mlir::success();
49static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops3(
50 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
51 unsigned valueIndex) {
52 if (!((::llvm::isa<::llzk::pod::PodType>(type)))) {
53 return op->emitOpError(valueKind) <<
" #" << valueIndex
54 <<
" must be plain-old-data struct, but got " << type;
56 return ::mlir::success();
59static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops4(
60 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
61 unsigned valueIndex) {
63 return op->emitOpError(valueKind) <<
" #" << valueIndex
64 <<
" must be a valid LLZK type, but got " << type;
66 return ::mlir::success();
69static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops1(
70 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
71 if (attr && !(((::llvm::isa<::mlir::ArrayAttr>(attr))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(attr), [&](::mlir::Attribute attr) {
return attr && ((::llvm::isa<::mlir::StringAttr>(attr))); }))))
72 return emitError() <<
"attribute '" << attrName
73 <<
"' failed to satisfy constraint: string array attribute";
74 return ::mlir::success();
76static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops1(
77 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
78 return __mlir_ods_local_attr_constraint_Ops1(attr, attrName, [op]() {
79 return op->emitOpError();
83static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops2(
84 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
85 if (attr && !((::llvm::isa<::mlir::DenseI32ArrayAttr>(attr))))
86 return emitError() <<
"attribute '" << attrName
87 <<
"' failed to satisfy constraint: i32 dense array attribute";
88 return ::mlir::success();
90static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops2(
91 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
92 return __mlir_ods_local_attr_constraint_Ops2(attr, attrName, [op]() {
93 return op->emitOpError();
97static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops3(
98 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
99 if (attr && !((::llvm::isa<::mlir::StringAttr>(attr))))
100 return emitError() <<
"attribute '" << attrName
101 <<
"' failed to satisfy constraint: string attribute";
102 return ::mlir::success();
104static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops3(
105 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
106 return __mlir_ods_local_attr_constraint_Ops3(attr, attrName, [op]() {
107 return op->emitOpError();
126 for (
unsigned i = 0; i < index; ++i)
127 start += sizeAttr[i];
128 return {start, sizeAttr[index]};
132 auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(
getProperties().initializedRecords);
142 auto attr = ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(
getProperties().numDimsPerMap);
162 if (!tblgen_mapOpGroupSizes)
return emitError(loc,
"'pod.new' op ""requires attribute 'mapOpGroupSizes'");
165 if (tblgen_initializedRecords && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_initializedRecords))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_initializedRecords), [&](::mlir::Attribute attr) {
return attr && ((::llvm::isa<::mlir::StringAttr>(attr))); }))))
166 return emitError(loc,
"'pod.new' op ""attribute 'initializedRecords' failed to satisfy constraint: string array attribute");
168 if (tblgen_numDimsPerMap && !((::llvm::isa<::mlir::DenseI32ArrayAttr>(tblgen_numDimsPerMap))))
169 return emitError(loc,
"'pod.new' op ""attribute 'numDimsPerMap' failed to satisfy constraint: i32 dense array attribute");
171 if (tblgen_mapOpGroupSizes && !((::llvm::isa<::mlir::DenseI32ArrayAttr>(tblgen_mapOpGroupSizes))))
172 return emitError(loc,
"'pod.new' op ""attribute 'mapOpGroupSizes' failed to satisfy constraint: i32 dense array attribute");
173 return ::mlir::success();
177 ::llvm::ArrayRef<int32_t> sizeAttr = getProperties().operandSegmentSizes;
180 for (
unsigned i = 0; i < index; ++i)
181 start += sizeAttr[i];
182 return {start, sizeAttr[index]};
187 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second, ::mlir::MutableOperandRange::OperandSegment(0u, {getOperandSegmentSizesAttrName(), ::mlir::DenseI32ArrayAttr::get(getContext(), getProperties().operandSegmentSizes)}));
193 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second, ::mlir::MutableOperandRange::OperandSegment(1u, {getOperandSegmentSizesAttrName(), ::mlir::DenseI32ArrayAttr::get(getContext(), getProperties().operandSegmentSizes)}));
198 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
200 emitError() <<
"expected DictionaryAttr to set properties";
201 return ::mlir::failure();
206 auto attr = dict.get(
"initializedRecords");
208 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
210 propStorage = convertedAttr;
212 emitError() <<
"Invalid attribute `initializedRecords` in property conversion: " << attr;
213 return ::mlir::failure();
220 auto attr = dict.get(
"mapOpGroupSizes");
222 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
224 propStorage = convertedAttr;
226 emitError() <<
"Invalid attribute `mapOpGroupSizes` in property conversion: " << attr;
227 return ::mlir::failure();
234 auto attr = dict.get(
"numDimsPerMap");
236 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
238 propStorage = convertedAttr;
240 emitError() <<
"Invalid attribute `numDimsPerMap` in property conversion: " << attr;
241 return ::mlir::failure();
247 auto setFromAttr = [] (
auto &propStorage, ::mlir::Attribute propAttr,
248 ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) -> ::mlir::LogicalResult {
249 return convertFromAttribute(propStorage, propAttr, emitError);
251 auto attr = dict.get(
"operandSegmentSizes");
if (!attr) attr = dict.get(
"operand_segment_sizes");;
254 return ::mlir::failure();
256 return ::mlir::success();
260 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
261 ::mlir::Builder odsBuilder{ctx};
266 attrs.push_back(odsBuilder.getNamedAttr(
"initializedRecords",
273 attrs.push_back(odsBuilder.getNamedAttr(
"mapOpGroupSizes",
280 attrs.push_back(odsBuilder.getNamedAttr(
"numDimsPerMap",
286 auto attr = [&]() -> ::mlir::Attribute {
287 return ::mlir::DenseI32ArrayAttr::get(ctx, propStorage);
289 attrs.push_back(odsBuilder.getNamedAttr(
"operandSegmentSizes", attr));
293 return odsBuilder.getDictionaryAttr(attrs);
298 auto hash_operandSegmentSizes = [] (
const auto &propStorage) -> llvm::hash_code {
299 return ::llvm::hash_combine_range(std::begin(propStorage), std::end(propStorage));;
301 return llvm::hash_combine(
309 if (name ==
"initializedRecords")
312 if (name ==
"mapOpGroupSizes")
315 if (name ==
"numDimsPerMap")
317 if (name ==
"operand_segment_sizes" || name ==
"operandSegmentSizes")
return [&]() -> ::mlir::Attribute { return ::mlir::DenseI32ArrayAttr::get(ctx, prop.
operandSegmentSizes); }();
322 if (name ==
"initializedRecords") {
327 if (name ==
"mapOpGroupSizes") {
332 if (name ==
"numDimsPerMap") {
336 if (name ==
"operand_segment_sizes" || name ==
"operandSegmentSizes") {
337 auto arrAttr = ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(value);
338 if (!arrAttr)
return;
352 attrs.append(
"operandSegmentSizes", [&]() -> ::mlir::Attribute { return ::mlir::DenseI32ArrayAttr::get(ctx, prop.
operandSegmentSizes); }());
355::llvm::LogicalResult
NewPodOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
358 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(attr,
"initializedRecords", emitError)))
359 return ::mlir::failure();
364 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(attr,
"mapOpGroupSizes", emitError)))
365 return ::mlir::failure();
370 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(attr,
"numDimsPerMap", emitError)))
371 return ::mlir::failure();
373 return ::mlir::success();
377 auto &prop = state.getOrAddProperties<
Properties>(); (void)prop;
379 return ::mlir::failure();
382 return ::mlir::failure();
384 if (::mlir::failed(reader.readOptionalAttribute(prop.
numDimsPerMap)))
385 return ::mlir::failure();
387 if (reader.getBytecodeVersion() < 6) {
389 ::mlir::DenseI32ArrayAttr attr;
390 if (::mlir::failed(reader.readAttribute(attr))) return ::mlir::failure();
391 if (attr.size() >
static_cast<int64_t
>(
sizeof(propStorage) /
sizeof(int32_t))) {
392 reader.emitError(
"size mismatch for operand/result_segment_size");
393 return ::mlir::failure();
395 ::llvm::copy(::llvm::ArrayRef<int32_t>(attr), propStorage.begin());
400 auto readProp = [&]() {
402 if (reader.getBytecodeVersion() >= 6)
403 return reader.readSparseArray(::llvm::MutableArrayRef(propStorage));
405 return ::mlir::success();
407 if (::mlir::failed(readProp()))
408 return ::mlir::failure();
410 return ::mlir::success();
414 auto &prop = getProperties(); (void)prop;
421if (writer.getBytecodeVersion() < 6) {
423 writer.writeAttribute(::mlir::DenseI32ArrayAttr::get(this->getContext(), propStorage));
429 if (writer.getBytecodeVersion() >= 6)
430 writer.writeSparseArray(::llvm::ArrayRef(propStorage));
451 getProperties().numDimsPerMap = ::mlir::Builder((*this)->getContext()).getDenseI32ArrayAttr(attrValue);
455 getProperties().mapOpGroupSizes = ::mlir::Builder((*this)->getContext()).getDenseI32ArrayAttr(attrValue);
460 build(odsBuilder, odsState, resultType, initialValues);
465 build(odsBuilder, odsState, resultType, mapOperands,
466 odsBuilder.getDenseI32ArrayAttr(numDimsPerMap), initialValues);
471 ::mlir::Builder odsBuilder(opName.getContext());
475 properties.
numDimsPerMap = odsBuilder.getDenseI32ArrayAttr({});
479 auto tblgen_initializedRecords = getProperties().initializedRecords; (void)tblgen_initializedRecords;
480 auto tblgen_mapOpGroupSizes = getProperties().mapOpGroupSizes; (void)tblgen_mapOpGroupSizes;
481 if (!tblgen_mapOpGroupSizes)
return emitOpError(
"requires attribute 'mapOpGroupSizes'");
482 auto tblgen_numDimsPerMap = getProperties().numDimsPerMap; (void)tblgen_numDimsPerMap;
484 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(*
this, tblgen_initializedRecords,
"initializedRecords")))
485 return ::mlir::failure();
487 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(*
this, tblgen_numDimsPerMap,
"numDimsPerMap")))
488 return ::mlir::failure();
490 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(*
this, tblgen_mapOpGroupSizes,
"mapOpGroupSizes")))
491 return ::mlir::failure();
493 unsigned index = 0; (void)index;
496 for (
auto v : valueGroup0) {
497 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
498 return ::mlir::failure();
501 if (::mlir::failed(::mlir::OpTrait::impl::verifyValueSizeAttr(*
this,
"mapOpGroupSizes",
"mapOperands", valueGroup1.size())))
502 return ::mlir::failure();
504 for (
auto v : valueGroup1) {
505 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"operand", index++)))
506 return ::mlir::failure();
510 unsigned index = 0; (void)index;
513 for (
auto v : valueGroup0) {
514 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*
this, v.getType(),
"result", index++)))
515 return ::mlir::failure();
518 return ::mlir::success();
523 return ::mlir::success();
524 return ::mlir::failure();
527void NewPodOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
528 effects.emplace_back(::mlir::MemoryEffects::Allocate::get(), 0,
false, ::llzk::DiscardableAllocationResource::get());
547 return attr.getValue();
555 if (!tblgen_record_name)
return emitError(loc,
"'pod.read' op ""requires attribute 'record_name'");
557 if (tblgen_record_name && !((::llvm::isa<::mlir::StringAttr>(tblgen_record_name))))
558 return emitError(loc,
"'pod.read' op ""attribute 'record_name' failed to satisfy constraint: string attribute");
559 return ::mlir::success();
563 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
565 emitError() <<
"expected DictionaryAttr to set properties";
566 return ::mlir::failure();
571 auto attr = dict.get(
"record_name");
573 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
575 propStorage = convertedAttr;
577 emitError() <<
"Invalid attribute `record_name` in property conversion: " << attr;
578 return ::mlir::failure();
582 return ::mlir::success();
586 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
587 ::mlir::Builder odsBuilder{ctx};
592 attrs.push_back(odsBuilder.getNamedAttr(
"record_name",
597 return odsBuilder.getDictionaryAttr(attrs);
602 return llvm::hash_combine(
603 llvm::hash_value(prop.
record_name.getAsOpaquePointer()));
607 if (name ==
"record_name")
613 if (name ==
"record_name") {
623::llvm::LogicalResult
ReadPodOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
626 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops3(attr,
"record_name", emitError)))
627 return ::mlir::failure();
629 return ::mlir::success();
634 return attr.getValue();
638 getProperties().record_name = ::mlir::Builder((*this)->getContext()).getStringAttr(attrValue);
641void ReadPodOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value pod_ref, ::mlir::StringAttr record_name) {
642 odsState.addOperands(pod_ref);
643 odsState.getOrAddProperties<
Properties>().record_name = record_name;
644 odsState.addTypes(result);
647void ReadPodOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value pod_ref, ::mlir::StringAttr record_name) {
648 odsState.addOperands(pod_ref);
649 odsState.getOrAddProperties<
Properties>().record_name = record_name;
650 assert(resultTypes.size() == 1u &&
"mismatched number of results");
651 odsState.addTypes(resultTypes);
654void ReadPodOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value pod_ref, ::llvm::StringRef record_name) {
655 odsState.addOperands(pod_ref);
656 odsState.getOrAddProperties<
Properties>().record_name = odsBuilder.getStringAttr(record_name);
657 odsState.addTypes(result);
660void ReadPodOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value pod_ref, ::llvm::StringRef record_name) {
661 odsState.addOperands(pod_ref);
662 odsState.getOrAddProperties<
Properties>().record_name = odsBuilder.getStringAttr(record_name);
663 assert(resultTypes.size() == 1u &&
"mismatched number of results");
664 odsState.addTypes(resultTypes);
667void ReadPodOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
668 assert(operands.size() == 1u &&
"mismatched number of parameters");
669 odsState.addOperands(operands);
670 odsState.addAttributes(attributes);
671 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
672 odsState.addTypes(resultTypes);
674 if (!attributes.empty()) {
675 ::mlir::OpaqueProperties properties =
677 std::optional<::mlir::RegisteredOperationName> info =
678 odsState.name.getRegisteredInfo();
679 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
680 odsState.attributes.getDictionary(odsState.getContext()),
nullptr)))
681 ::llvm::report_fatal_error(
"Property conversion failed.");
686 auto tblgen_record_name = getProperties().record_name; (void)tblgen_record_name;
687 if (!tblgen_record_name)
return emitOpError(
"requires attribute 'record_name'");
689 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops3(*
this, tblgen_record_name,
"record_name")))
690 return ::mlir::failure();
692 unsigned index = 0; (void)index;
695 for (
auto v : valueGroup0) {
696 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*
this, v.getType(),
"operand", index++)))
697 return ::mlir::failure();
701 unsigned index = 0; (void)index;
704 for (
auto v : valueGroup0) {
705 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops4(*
this, v.getType(),
"result", index++)))
706 return ::mlir::failure();
709 return ::mlir::success();
714 return ::mlir::success();
715 return ::mlir::failure();
718::mlir::ParseResult
ReadPodOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
719 ::mlir::OpAsmParser::UnresolvedOperand pod_refRawOperand{};
720 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> pod_refOperands(&pod_refRawOperand, 1); ::llvm::SMLoc pod_refOperandsLoc;
721 (void)pod_refOperandsLoc;
722 ::mlir::StringAttr record_nameAttr;
723 ::mlir::Type pod_refRawType{};
724 ::llvm::ArrayRef<::mlir::Type> pod_refTypes(&pod_refRawType, 1);
725 ::mlir::Type resultRawType{};
726 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
728 pod_refOperandsLoc = parser.getCurrentLocation();
729 if (parser.parseOperand(pod_refRawOperand))
730 return ::mlir::failure();
731 if (parser.parseLSquare())
732 return ::mlir::failure();
735 if (odsResult) return ::mlir::failure();
738 if (parser.parseRSquare())
739 return ::mlir::failure();
740 if (parser.parseColon())
741 return ::mlir::failure();
745 if (parser.parseCustomTypeWithFallback(type))
746 return ::mlir::failure();
747 pod_refRawType = type;
749 if (parser.parseComma())
750 return ::mlir::failure();
754 if (parser.parseCustomTypeWithFallback(type))
755 return ::mlir::failure();
756 resultRawType = type;
759 auto loc = parser.getCurrentLocation();(void)loc;
760 if (parser.parseOptionalAttrDict(result.attributes))
761 return ::mlir::failure();
763 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
765 return ::mlir::failure();
767 result.addTypes(resultTypes);
768 if (parser.resolveOperands(pod_refOperands, pod_refTypes, pod_refOperandsLoc, result.operands))
769 return ::mlir::failure();
770 return ::mlir::success();
779 _odsPrinter <<
' ' <<
":";
783 if (
auto validType = ::llvm::dyn_cast<::llzk::pod::PodType>(type))
784 _odsPrinter.printStrippedAttrOrType(validType);
792 if (
auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
793 _odsPrinter.printStrippedAttrOrType(validType);
797 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
798 elidedAttrs.push_back(
"record_name");
799 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
804 ::llvm::SmallPtrSetImpl<::mlir::Attribute> &usedIndices,
805 ::mlir::SmallVectorImpl<::mlir::MemorySlot> &mustBeSafelyUsed,
806 const ::mlir::DataLayout &dataLayout) {
807 return ::llvm::cast<PodAccessOpInterface>(getOperation())
808 .canRewire(slot, usedIndices, mustBeSafelyUsed, dataLayout);
813 ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot> &subslots,
814 ::mlir::OpBuilder &builder, const ::mlir::DataLayout &dataLayout) {
815 return ::llvm::cast<PodAccessOpInterface>(getOperation())
816 .rewire(slot, subslots, builder, dataLayout);
831 ::mlir::Value, const ::mlir::DataLayout &) {
832 llvm_unreachable(
"getStored() should not be called on ReadPodOp");
837 const ::mlir::MemorySlot &slot,
838 const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &blockingUses,
839 ::llvm::SmallVectorImpl<::mlir::OpOperand *> & ,
840 const ::mlir::DataLayout & ) {
841 if (blockingUses.size() != 1) {
844 ::mlir::Value blockingUse = (*blockingUses.begin())->get();
845 return blockingUse == slot.ptr &&
getPodRef() == slot.ptr &&
851 const ::mlir::MemorySlot &, const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &,
852 ::mlir::OpBuilder &, ::mlir::Value reachingDefinition, const ::mlir::DataLayout &) {
853 getResult().replaceAllUsesWith(reachingDefinition);
854 return ::mlir::DeletionKind::Delete;
892 return attr.getValue();
900 if (!tblgen_record_name)
return emitError(loc,
"'pod.write' op ""requires attribute 'record_name'");
902 if (tblgen_record_name && !((::llvm::isa<::mlir::StringAttr>(tblgen_record_name))))
903 return emitError(loc,
"'pod.write' op ""attribute 'record_name' failed to satisfy constraint: string attribute");
904 return ::mlir::success();
908 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
910 emitError() <<
"expected DictionaryAttr to set properties";
911 return ::mlir::failure();
916 auto attr = dict.get(
"record_name");
918 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
920 propStorage = convertedAttr;
922 emitError() <<
"Invalid attribute `record_name` in property conversion: " << attr;
923 return ::mlir::failure();
927 return ::mlir::success();
931 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
932 ::mlir::Builder odsBuilder{ctx};
937 attrs.push_back(odsBuilder.getNamedAttr(
"record_name",
942 return odsBuilder.getDictionaryAttr(attrs);
947 return llvm::hash_combine(
948 llvm::hash_value(prop.
record_name.getAsOpaquePointer()));
952 if (name ==
"record_name")
958 if (name ==
"record_name") {
968::llvm::LogicalResult
WritePodOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
971 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops3(attr,
"record_name", emitError)))
972 return ::mlir::failure();
974 return ::mlir::success();
979 return attr.getValue();
983 getProperties().record_name = ::mlir::Builder((*this)->getContext()).getStringAttr(attrValue);
986void WritePodOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value pod_ref, ::mlir::StringAttr record_name, ::mlir::Value value) {
987 odsState.addOperands(pod_ref);
988 odsState.addOperands(value);
989 odsState.getOrAddProperties<
Properties>().record_name = record_name;
992void WritePodOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value pod_ref, ::mlir::StringAttr record_name, ::mlir::Value value) {
993 odsState.addOperands(pod_ref);
994 odsState.addOperands(value);
995 odsState.getOrAddProperties<
Properties>().record_name = record_name;
996 assert(resultTypes.size() == 0u &&
"mismatched number of results");
997 odsState.addTypes(resultTypes);
1000void WritePodOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value pod_ref, ::llvm::StringRef record_name, ::mlir::Value value) {
1001 odsState.addOperands(pod_ref);
1002 odsState.addOperands(value);
1003 odsState.getOrAddProperties<
Properties>().record_name = odsBuilder.getStringAttr(record_name);
1006void WritePodOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value pod_ref, ::llvm::StringRef record_name, ::mlir::Value value) {
1007 odsState.addOperands(pod_ref);
1008 odsState.addOperands(value);
1009 odsState.getOrAddProperties<
Properties>().record_name = odsBuilder.getStringAttr(record_name);
1010 assert(resultTypes.size() == 0u &&
"mismatched number of results");
1011 odsState.addTypes(resultTypes);
1014void WritePodOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1015 assert(operands.size() == 2u &&
"mismatched number of parameters");
1016 odsState.addOperands(operands);
1017 odsState.addAttributes(attributes);
1018 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
1019 odsState.addTypes(resultTypes);
1021 if (!attributes.empty()) {
1022 ::mlir::OpaqueProperties properties =
1024 std::optional<::mlir::RegisteredOperationName> info =
1025 odsState.name.getRegisteredInfo();
1026 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
1027 odsState.attributes.getDictionary(odsState.getContext()),
nullptr)))
1028 ::llvm::report_fatal_error(
"Property conversion failed.");
1033 auto tblgen_record_name = getProperties().record_name; (void)tblgen_record_name;
1034 if (!tblgen_record_name)
return emitOpError(
"requires attribute 'record_name'");
1036 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops3(*
this, tblgen_record_name,
"record_name")))
1037 return ::mlir::failure();
1039 unsigned index = 0; (void)index;
1042 for (
auto v : valueGroup0) {
1043 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*
this, v.getType(),
"operand", index++)))
1044 return ::mlir::failure();
1048 for (
auto v : valueGroup1) {
1049 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops4(*
this, v.getType(),
"operand", index++)))
1050 return ::mlir::failure();
1053 return ::mlir::success();
1058 return ::mlir::success();
1059 return ::mlir::failure();
1063 ::mlir::OpAsmParser::UnresolvedOperand pod_refRawOperand{};
1064 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> pod_refOperands(&pod_refRawOperand, 1); ::llvm::SMLoc pod_refOperandsLoc;
1065 (void)pod_refOperandsLoc;
1066 ::mlir::StringAttr record_nameAttr;
1067 ::mlir::OpAsmParser::UnresolvedOperand valueRawOperand{};
1068 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> valueOperands(&valueRawOperand, 1); ::llvm::SMLoc valueOperandsLoc;
1069 (void)valueOperandsLoc;
1070 ::mlir::Type pod_refRawType{};
1071 ::llvm::ArrayRef<::mlir::Type> pod_refTypes(&pod_refRawType, 1);
1072 ::mlir::Type valueRawType{};
1073 ::llvm::ArrayRef<::mlir::Type> valueTypes(&valueRawType, 1);
1075 pod_refOperandsLoc = parser.getCurrentLocation();
1076 if (parser.parseOperand(pod_refRawOperand))
1077 return ::mlir::failure();
1078 if (parser.parseLSquare())
1079 return ::mlir::failure();
1082 if (odsResult) return ::mlir::failure();
1085 if (parser.parseRSquare())
1086 return ::mlir::failure();
1087 if (parser.parseEqual())
1088 return ::mlir::failure();
1090 valueOperandsLoc = parser.getCurrentLocation();
1091 if (parser.parseOperand(valueRawOperand))
1092 return ::mlir::failure();
1093 if (parser.parseColon())
1094 return ::mlir::failure();
1098 if (parser.parseCustomTypeWithFallback(type))
1099 return ::mlir::failure();
1100 pod_refRawType = type;
1102 if (parser.parseComma())
1103 return ::mlir::failure();
1107 if (parser.parseCustomTypeWithFallback(type))
1108 return ::mlir::failure();
1109 valueRawType = type;
1112 auto loc = parser.getCurrentLocation();(void)loc;
1113 if (parser.parseOptionalAttrDict(result.attributes))
1114 return ::mlir::failure();
1116 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
1118 return ::mlir::failure();
1120 if (parser.resolveOperands(pod_refOperands, pod_refTypes, pod_refOperandsLoc, result.operands))
1121 return ::mlir::failure();
1122 if (parser.resolveOperands(valueOperands, valueTypes, valueOperandsLoc, result.operands))
1123 return ::mlir::failure();
1124 return ::mlir::success();
1133 _odsPrinter <<
' ' <<
"=";
1136 _odsPrinter <<
' ' <<
":";
1140 if (
auto validType = ::llvm::dyn_cast<::llzk::pod::PodType>(type))
1141 _odsPrinter.printStrippedAttrOrType(validType);
1143 _odsPrinter << type;
1149 if (
auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
1150 _odsPrinter.printStrippedAttrOrType(validType);
1152 _odsPrinter << type;
1154 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1155 elidedAttrs.push_back(
"record_name");
1156 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1161 ::llvm::SmallPtrSetImpl<::mlir::Attribute> &usedIndices,
1162 ::mlir::SmallVectorImpl<::mlir::MemorySlot> &mustBeSafelyUsed,
1163 const ::mlir::DataLayout &dataLayout) {
1164 return ::llvm::cast<PodAccessOpInterface>(getOperation())
1165 .canRewire(slot, usedIndices, mustBeSafelyUsed, dataLayout);
1170 ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot> &subslots,
1171 ::mlir::OpBuilder &builder, const ::mlir::DataLayout &dataLayout) {
1172 return ::llvm::cast<PodAccessOpInterface>(getOperation())
1173 .rewire(slot, subslots, builder, dataLayout);
1188 ::mlir::Value, const ::mlir::DataLayout &) {
1194 const ::mlir::MemorySlot &slot,
1195 const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &blockingUses,
1196 ::llvm::SmallVectorImpl<::mlir::OpOperand *> & ,
1197 const ::mlir::DataLayout & ) {
1198 if (blockingUses.size() != 1) {
1201 ::mlir::Value blockingUse = (*blockingUses.begin())->get();
1202 return blockingUse == slot.ptr &&
getPodRef() == slot.ptr &&
1208 const ::mlir::MemorySlot &, const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &,
1209 ::mlir::OpBuilder &, ::mlir::Value reachingDefinition, const ::mlir::DataLayout &) {
1211 return ::mlir::DeletionKind::Delete;
::llvm::LogicalResult verify(::mlir::Location loc)
NewPodOpAdaptor(NewPodOp op)
NewPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::ValueRange getOperands()
::llvm::LogicalResult verifyInvariants()
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static llvm::hash_code computePropertiesHash(const Properties &prop)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::mlir::ArrayAttr getInitializedRecordsAttr()
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
::llvm::LogicalResult verifyInvariantsImpl()
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 populateDefaultProperties(::mlir::OperationName opName, Properties &properties)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
void setMapOpGroupSizes(::llvm::ArrayRef< int32_t > attrValue)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::pod::InitializedRecords initialValues={})
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::StringAttr getInitializedRecordsAttrName()
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
::mlir::Operation::operand_range getODSOperands(unsigned index)
::mlir::StringAttr getMapOpGroupSizesAttrName()
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
::mlir::MutableOperandRange getInitialValuesMutable()
void setNumDimsPerMap(::llvm::ArrayRef< int32_t > attrValue)
FoldAdaptor::Properties Properties
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::MutableOperandRangeRange getMapOperandsMutable()
::llvm::LogicalResult verify()
void writeProperties(::mlir::DialectBytecodeWriter &writer)
::mlir::ArrayAttr getInitializedRecords()
::mlir::StringAttr getNumDimsPerMapAttrName()
static PodType fromInitialValues(::mlir::MLIRContext *ctx, InitializedRecords init)
Creates a new type from a set of initialized records.
ReadPodOpAdaptor(ReadPodOp op)
ReadPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
::mlir::ValueRange getOperands()
::llvm::LogicalResult verifyInvariants()
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::llvm::StringRef getRecordName()
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::mlir::TypedValue<::mlir::Type > getResult()
::mlir::Operation::operand_range getODSOperands(unsigned index)
bool canUsesBeRemoved(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<::mlir::OpOperand * > &blockingUses, ::llvm::SmallVectorImpl<::mlir::OpOperand * > &newBlockingUses, const ::mlir::DataLayout &datalayout)
Required by PromotableMemOpInterface / mem2reg pass.
::mlir::DeletionKind removeBlockingUses(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl< mlir::OpOperand * > &blockingUses, ::mlir::OpBuilder &builder, ::mlir::Value reachingDefinition, const ::mlir::DataLayout &dataLayout)
Required by PromotableMemOpInterface / mem2reg pass.
bool storesTo(const ::mlir::MemorySlot &slot)
Required by PromotableMemOpInterface / mem2reg pass.
bool isRead()
Return true if the op is a read, false if it's a write.
::llvm::LogicalResult verifyInvariantsImpl()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::llvm::LogicalResult verify()
FoldAdaptor::Properties Properties
::mlir::Value getStored(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder, ::mlir::Value reachingDef, const ::mlir::DataLayout &dataLayout)
Required by PromotableAllocationOpInterface / mem2reg pass.
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::TypedValue<::llzk::pod::PodType > getPodRef()
void print(::mlir::OpAsmPrinter &_odsPrinter)
static llvm::hash_code computePropertiesHash(const Properties &prop)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value pod_ref, ::mlir::StringAttr record_name)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
bool canEraseAsDeadStoreTo(::mlir::Value ptr, const ::mlir::DataLayout &dataLayout)
Required by DiscardableAllocationAccessorOpInterface / unused allocation cleanup.
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::StringAttr getRecordNameAttr()
::mlir::StringAttr getRecordNameAttrName()
bool loadsFrom(const ::mlir::MemorySlot &slot)
Required by PromotableMemOpInterface / mem2reg pass.
bool canRewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::SmallPtrSetImpl<::mlir::Attribute > &usedIndices, ::mlir::SmallVectorImpl<::mlir::MemorySlot > &mustBeSafelyUsed, const ::mlir::DataLayout &dataLayout)
Required by DestructurableAllocationOpInterface / SROA pass.
bool storesToDiscardableAllocation(::mlir::Value ptr)
Required by DiscardableAllocationAccessorOpInterface / unused allocation cleanup.
void setRecordName(::llvm::StringRef attrValue)
bool loadsFromDiscardableAllocation(::mlir::Value ptr)
Required by DiscardableAllocationAccessorOpInterface / unused allocation cleanup.
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::DeletionKind rewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot > &subslots, ::mlir::OpBuilder &builder, const ::mlir::DataLayout &dataLayout)
Required by DestructurableAllocationOpInterface / SROA pass.
WritePodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
WritePodOpAdaptor(WritePodOp op)
::mlir::ValueRange getOperands()
bool canUsesBeRemoved(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<::mlir::OpOperand * > &blockingUses, ::llvm::SmallVectorImpl<::mlir::OpOperand * > &newBlockingUses, const ::mlir::DataLayout &datalayout)
Required by PromotableMemOpInterface / mem2reg pass.
::mlir::Value getStored(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder, ::mlir::Value reachingDef, const ::mlir::DataLayout &dataLayout)
Required by PromotableAllocationOpInterface / mem2reg pass.
::llvm::LogicalResult verify()
static llvm::hash_code computePropertiesHash(const Properties &prop)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value pod_ref, ::mlir::StringAttr record_name, ::mlir::Value value)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::llvm::LogicalResult verifyInvariants()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
bool loadsFromDiscardableAllocation(::mlir::Value ptr)
Required by DiscardableAllocationAccessorOpInterface / unused allocation cleanup.
::mlir::StringAttr getRecordNameAttr()
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::TypedValue<::mlir::Type > getValue()
void setRecordName(::llvm::StringRef attrValue)
::mlir::TypedValue<::llzk::pod::PodType > getPodRef()
FoldAdaptor::Properties Properties
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::mlir::DeletionKind rewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot > &subslots, ::mlir::OpBuilder &builder, const ::mlir::DataLayout &dataLayout)
Required by DestructurableAllocationOpInterface / SROA pass.
bool isRead()
Return true if the op is a read, false if it's a write.
bool canRewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::SmallPtrSetImpl<::mlir::Attribute > &usedIndices, ::mlir::SmallVectorImpl<::mlir::MemorySlot > &mustBeSafelyUsed, const ::mlir::DataLayout &dataLayout)
Required by DestructurableAllocationOpInterface / SROA pass.
::mlir::DeletionKind removeBlockingUses(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl< mlir::OpOperand * > &blockingUses, ::mlir::OpBuilder &builder, ::mlir::Value reachingDefinition, const ::mlir::DataLayout &dataLayout)
Required by PromotableMemOpInterface / mem2reg pass.
::mlir::Operation::operand_range getODSOperands(unsigned index)
::llvm::LogicalResult verifyInvariantsImpl()
bool storesTo(const ::mlir::MemorySlot &slot)
Required by PromotableMemOpInterface / mem2reg pass.
::llvm::StringRef getRecordName()
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
bool canEraseAsDeadStoreTo(::mlir::Value ptr, const ::mlir::DataLayout &dataLayout)
Required by DiscardableAllocationAccessorOpInterface / unused allocation cleanup.
bool storesToDiscardableAllocation(::mlir::Value ptr)
Required by DiscardableAllocationAccessorOpInterface / unused allocation cleanup.
bool loadsFrom(const ::mlir::MemorySlot &slot)
Required by PromotableMemOpInterface / mem2reg pass.
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::mlir::StringAttr getRecordNameAttrName()
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::ArrayAttr getInitializedRecords()
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
NewPodOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
::mlir::RegionRange odsRegions
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
::std::optional<::mlir::OperationName > odsOpName
::mlir::ArrayAttr getInitializedRecordsAttr()
const Properties & getProperties()
::mlir::DictionaryAttr odsAttrs
::mlir::StringAttr getRecordNameAttr()
::llvm::StringRef getRecordName()
const Properties & getProperties()
::mlir::RegionRange odsRegions
::std::optional<::mlir::OperationName > odsOpName
::mlir::DictionaryAttr odsAttrs
ReadPodOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::DictionaryAttr odsAttrs
::std::optional<::mlir::OperationName > odsOpName
const Properties & getProperties()
::mlir::StringAttr getRecordNameAttr()
WritePodOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::RegionRange odsRegions
::llvm::StringRef getRecordName()
mlir::ArrayRef< RecordValue > InitializedRecords
void printRecordName(AsmPrinter &printer, Operation *, StringAttr name)
ParseResult parseRecordName(AsmParser &parser, StringAttr &name)
bool isValidType(Type type)
mapOpGroupSizesTy mapOpGroupSizes
operandSegmentSizesTy operandSegmentSizes
initializedRecordsTy initializedRecords
numDimsPerMapTy numDimsPerMap
record_nameTy record_name
record_nameTy record_name