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::FlatSymbolRefAttr>(attr))))
100 return emitError() <<
"attribute '" << attrName
101 <<
"' failed to satisfy constraint: flat symbol reference 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) {
546 return attr.getValue();
554 if (!tblgen_record_name)
return emitError(loc,
"'pod.read' op ""requires attribute 'record_name'");
556 if (tblgen_record_name && !((::llvm::isa<::mlir::FlatSymbolRefAttr>(tblgen_record_name))))
557 return emitError(loc,
"'pod.read' op ""attribute 'record_name' failed to satisfy constraint: flat symbol reference attribute");
558 return ::mlir::success();
562 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
564 emitError() <<
"expected DictionaryAttr to set properties";
565 return ::mlir::failure();
570 auto attr = dict.get(
"record_name");
572 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
574 propStorage = convertedAttr;
576 emitError() <<
"Invalid attribute `record_name` in property conversion: " << attr;
577 return ::mlir::failure();
581 return ::mlir::success();
585 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
586 ::mlir::Builder odsBuilder{ctx};
591 attrs.push_back(odsBuilder.getNamedAttr(
"record_name",
596 return odsBuilder.getDictionaryAttr(attrs);
601 return llvm::hash_combine(
602 llvm::hash_value(prop.
record_name.getAsOpaquePointer()));
606 if (name ==
"record_name")
612 if (name ==
"record_name") {
622::llvm::LogicalResult
ReadPodOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
625 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops3(attr,
"record_name", emitError)))
626 return ::mlir::failure();
628 return ::mlir::success();
632 auto &prop = state.getOrAddProperties<
Properties>(); (void)prop;
633 if (::mlir::failed(reader.readAttribute(prop.
record_name)))
634 return ::mlir::failure();
635 return ::mlir::success();
639 auto &prop = getProperties(); (void)prop;
645 return attr.getValue();
649 getProperties().record_name = ::mlir::SymbolRefAttr::get(::mlir::Builder((*this)->getContext()).getContext(), attrValue);
652void ReadPodOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value pod_ref, ::mlir::FlatSymbolRefAttr record_name) {
653 odsState.addOperands(pod_ref);
654 odsState.getOrAddProperties<
Properties>().record_name = record_name;
655 odsState.addTypes(result);
658void ReadPodOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value pod_ref, ::mlir::FlatSymbolRefAttr record_name) {
659 odsState.addOperands(pod_ref);
660 odsState.getOrAddProperties<
Properties>().record_name = record_name;
661 assert(resultTypes.size() == 1u &&
"mismatched number of results");
662 odsState.addTypes(resultTypes);
665void ReadPodOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value pod_ref, ::llvm::StringRef record_name) {
666 odsState.addOperands(pod_ref);
667 odsState.getOrAddProperties<
Properties>().record_name = ::mlir::SymbolRefAttr::get(odsBuilder.getContext(), record_name);
668 odsState.addTypes(result);
671void ReadPodOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value pod_ref, ::llvm::StringRef record_name) {
672 odsState.addOperands(pod_ref);
673 odsState.getOrAddProperties<
Properties>().record_name = ::mlir::SymbolRefAttr::get(odsBuilder.getContext(), record_name);
674 assert(resultTypes.size() == 1u &&
"mismatched number of results");
675 odsState.addTypes(resultTypes);
678void ReadPodOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
679 assert(operands.size() == 1u &&
"mismatched number of parameters");
680 odsState.addOperands(operands);
681 odsState.addAttributes(attributes);
682 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
683 odsState.addTypes(resultTypes);
685 if (!attributes.empty()) {
686 ::mlir::OpaqueProperties properties =
688 std::optional<::mlir::RegisteredOperationName> info =
689 odsState.name.getRegisteredInfo();
690 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
691 odsState.attributes.getDictionary(odsState.getContext()),
nullptr)))
692 ::llvm::report_fatal_error(
"Property conversion failed.");
697 auto tblgen_record_name = getProperties().record_name; (void)tblgen_record_name;
698 if (!tblgen_record_name)
return emitOpError(
"requires attribute 'record_name'");
700 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops3(*
this, tblgen_record_name,
"record_name")))
701 return ::mlir::failure();
703 unsigned index = 0; (void)index;
706 for (
auto v : valueGroup0) {
707 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*
this, v.getType(),
"operand", index++)))
708 return ::mlir::failure();
712 unsigned index = 0; (void)index;
715 for (
auto v : valueGroup0) {
716 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops4(*
this, v.getType(),
"result", index++)))
717 return ::mlir::failure();
720 return ::mlir::success();
725 return ::mlir::success();
726 return ::mlir::failure();
729::mlir::ParseResult
ReadPodOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
730 ::mlir::OpAsmParser::UnresolvedOperand pod_refRawOperand{};
731 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> pod_refOperands(&pod_refRawOperand, 1); ::llvm::SMLoc pod_refOperandsLoc;
732 (void)pod_refOperandsLoc;
733 ::mlir::FlatSymbolRefAttr record_nameAttr;
734 ::mlir::Type pod_refRawType{};
735 ::llvm::ArrayRef<::mlir::Type> pod_refTypes(&pod_refRawType, 1);
736 ::mlir::Type resultRawType{};
737 ::llvm::ArrayRef<::mlir::Type> resultTypes(&resultRawType, 1);
739 pod_refOperandsLoc = parser.getCurrentLocation();
740 if (parser.parseOperand(pod_refRawOperand))
741 return ::mlir::failure();
742 if (parser.parseLSquare())
743 return ::mlir::failure();
746 if (odsResult) return ::mlir::failure();
749 if (parser.parseRSquare())
750 return ::mlir::failure();
751 if (parser.parseColon())
752 return ::mlir::failure();
756 if (parser.parseCustomTypeWithFallback(type))
757 return ::mlir::failure();
758 pod_refRawType = type;
760 if (parser.parseComma())
761 return ::mlir::failure();
765 if (parser.parseCustomTypeWithFallback(type))
766 return ::mlir::failure();
767 resultRawType = type;
770 auto loc = parser.getCurrentLocation();(void)loc;
771 if (parser.parseOptionalAttrDict(result.attributes))
772 return ::mlir::failure();
774 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
776 return ::mlir::failure();
778 result.addTypes(resultTypes);
779 if (parser.resolveOperands(pod_refOperands, pod_refTypes, pod_refOperandsLoc, result.operands))
780 return ::mlir::failure();
781 return ::mlir::success();
790 _odsPrinter <<
' ' <<
":";
794 if (
auto validType = ::llvm::dyn_cast<::llzk::pod::PodType>(type))
795 _odsPrinter.printStrippedAttrOrType(validType);
803 if (
auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
804 _odsPrinter.printStrippedAttrOrType(validType);
808 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
809 elidedAttrs.push_back(
"record_name");
810 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
815 ::llvm::SmallPtrSetImpl<::mlir::Attribute> &usedIndices,
816 ::mlir::SmallVectorImpl<::mlir::MemorySlot> &mustBeSafelyUsed,
817 const ::mlir::DataLayout &dataLayout) {
818 return ::llvm::cast<PodAccessOpInterface>(getOperation())
819 .canRewire(slot, usedIndices, mustBeSafelyUsed, dataLayout);
824 ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot> &subslots,
825 ::mlir::OpBuilder &builder, const ::mlir::DataLayout &dataLayout) {
826 return ::llvm::cast<PodAccessOpInterface>(getOperation())
827 .rewire(slot, subslots, builder, dataLayout);
842 ::mlir::Value, const ::mlir::DataLayout &) {
843 llvm_unreachable(
"getStored() should not be called on ReadPodOp");
848 const ::mlir::MemorySlot &slot,
849 const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &blockingUses,
850 ::llvm::SmallVectorImpl<::mlir::OpOperand *> & ,
851 const ::mlir::DataLayout & ) {
852 if (blockingUses.size() != 1) {
855 ::mlir::Value blockingUse = (*blockingUses.begin())->get();
856 return blockingUse == slot.ptr &&
getPodRef() == slot.ptr &&
862 const ::mlir::MemorySlot &, const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &,
863 ::mlir::OpBuilder &, ::mlir::Value reachingDefinition, const ::mlir::DataLayout &) {
864 getResult().replaceAllUsesWith(reachingDefinition);
865 return ::mlir::DeletionKind::Delete;
888 return attr.getValue();
896 if (!tblgen_record_name)
return emitError(loc,
"'pod.write' op ""requires attribute 'record_name'");
898 if (tblgen_record_name && !((::llvm::isa<::mlir::FlatSymbolRefAttr>(tblgen_record_name))))
899 return emitError(loc,
"'pod.write' op ""attribute 'record_name' failed to satisfy constraint: flat symbol reference attribute");
900 return ::mlir::success();
904 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
906 emitError() <<
"expected DictionaryAttr to set properties";
907 return ::mlir::failure();
912 auto attr = dict.get(
"record_name");
914 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
916 propStorage = convertedAttr;
918 emitError() <<
"Invalid attribute `record_name` in property conversion: " << attr;
919 return ::mlir::failure();
923 return ::mlir::success();
927 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
928 ::mlir::Builder odsBuilder{ctx};
933 attrs.push_back(odsBuilder.getNamedAttr(
"record_name",
938 return odsBuilder.getDictionaryAttr(attrs);
943 return llvm::hash_combine(
944 llvm::hash_value(prop.
record_name.getAsOpaquePointer()));
948 if (name ==
"record_name")
954 if (name ==
"record_name") {
964::llvm::LogicalResult
WritePodOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
967 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops3(attr,
"record_name", emitError)))
968 return ::mlir::failure();
970 return ::mlir::success();
974 auto &prop = state.getOrAddProperties<
Properties>(); (void)prop;
975 if (::mlir::failed(reader.readAttribute(prop.
record_name)))
976 return ::mlir::failure();
977 return ::mlir::success();
981 auto &prop = getProperties(); (void)prop;
987 return attr.getValue();
991 getProperties().record_name = ::mlir::SymbolRefAttr::get(::mlir::Builder((*this)->getContext()).getContext(), attrValue);
994void WritePodOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value pod_ref, ::mlir::FlatSymbolRefAttr record_name, ::mlir::Value value) {
995 odsState.addOperands(pod_ref);
996 odsState.addOperands(value);
997 odsState.getOrAddProperties<
Properties>().record_name = record_name;
1000void WritePodOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value pod_ref, ::mlir::FlatSymbolRefAttr record_name, ::mlir::Value value) {
1001 odsState.addOperands(pod_ref);
1002 odsState.addOperands(value);
1003 odsState.getOrAddProperties<
Properties>().record_name = record_name;
1004 assert(resultTypes.size() == 0u &&
"mismatched number of results");
1005 odsState.addTypes(resultTypes);
1008void WritePodOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value pod_ref, ::llvm::StringRef record_name, ::mlir::Value value) {
1009 odsState.addOperands(pod_ref);
1010 odsState.addOperands(value);
1011 odsState.getOrAddProperties<
Properties>().record_name = ::mlir::SymbolRefAttr::get(odsBuilder.getContext(), record_name);
1014void WritePodOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value pod_ref, ::llvm::StringRef record_name, ::mlir::Value value) {
1015 odsState.addOperands(pod_ref);
1016 odsState.addOperands(value);
1017 odsState.getOrAddProperties<
Properties>().record_name = ::mlir::SymbolRefAttr::get(odsBuilder.getContext(), record_name);
1018 assert(resultTypes.size() == 0u &&
"mismatched number of results");
1019 odsState.addTypes(resultTypes);
1022void WritePodOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1023 assert(operands.size() == 2u &&
"mismatched number of parameters");
1024 odsState.addOperands(operands);
1025 odsState.addAttributes(attributes);
1026 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
1027 odsState.addTypes(resultTypes);
1029 if (!attributes.empty()) {
1030 ::mlir::OpaqueProperties properties =
1032 std::optional<::mlir::RegisteredOperationName> info =
1033 odsState.name.getRegisteredInfo();
1034 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
1035 odsState.attributes.getDictionary(odsState.getContext()),
nullptr)))
1036 ::llvm::report_fatal_error(
"Property conversion failed.");
1041 auto tblgen_record_name = getProperties().record_name; (void)tblgen_record_name;
1042 if (!tblgen_record_name)
return emitOpError(
"requires attribute 'record_name'");
1044 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops3(*
this, tblgen_record_name,
"record_name")))
1045 return ::mlir::failure();
1047 unsigned index = 0; (void)index;
1050 for (
auto v : valueGroup0) {
1051 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*
this, v.getType(),
"operand", index++)))
1052 return ::mlir::failure();
1056 for (
auto v : valueGroup1) {
1057 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops4(*
this, v.getType(),
"operand", index++)))
1058 return ::mlir::failure();
1061 return ::mlir::success();
1066 return ::mlir::success();
1067 return ::mlir::failure();
1071 ::mlir::OpAsmParser::UnresolvedOperand pod_refRawOperand{};
1072 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> pod_refOperands(&pod_refRawOperand, 1); ::llvm::SMLoc pod_refOperandsLoc;
1073 (void)pod_refOperandsLoc;
1074 ::mlir::FlatSymbolRefAttr record_nameAttr;
1075 ::mlir::OpAsmParser::UnresolvedOperand valueRawOperand{};
1076 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> valueOperands(&valueRawOperand, 1); ::llvm::SMLoc valueOperandsLoc;
1077 (void)valueOperandsLoc;
1078 ::mlir::Type pod_refRawType{};
1079 ::llvm::ArrayRef<::mlir::Type> pod_refTypes(&pod_refRawType, 1);
1080 ::mlir::Type valueRawType{};
1081 ::llvm::ArrayRef<::mlir::Type> valueTypes(&valueRawType, 1);
1083 pod_refOperandsLoc = parser.getCurrentLocation();
1084 if (parser.parseOperand(pod_refRawOperand))
1085 return ::mlir::failure();
1086 if (parser.parseLSquare())
1087 return ::mlir::failure();
1090 if (odsResult) return ::mlir::failure();
1093 if (parser.parseRSquare())
1094 return ::mlir::failure();
1095 if (parser.parseEqual())
1096 return ::mlir::failure();
1098 valueOperandsLoc = parser.getCurrentLocation();
1099 if (parser.parseOperand(valueRawOperand))
1100 return ::mlir::failure();
1101 if (parser.parseColon())
1102 return ::mlir::failure();
1106 if (parser.parseCustomTypeWithFallback(type))
1107 return ::mlir::failure();
1108 pod_refRawType = type;
1110 if (parser.parseComma())
1111 return ::mlir::failure();
1115 if (parser.parseCustomTypeWithFallback(type))
1116 return ::mlir::failure();
1117 valueRawType = type;
1120 auto loc = parser.getCurrentLocation();(void)loc;
1121 if (parser.parseOptionalAttrDict(result.attributes))
1122 return ::mlir::failure();
1124 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
1126 return ::mlir::failure();
1128 if (parser.resolveOperands(pod_refOperands, pod_refTypes, pod_refOperandsLoc, result.operands))
1129 return ::mlir::failure();
1130 if (parser.resolveOperands(valueOperands, valueTypes, valueOperandsLoc, result.operands))
1131 return ::mlir::failure();
1132 return ::mlir::success();
1141 _odsPrinter <<
' ' <<
"=";
1144 _odsPrinter <<
' ' <<
":";
1148 if (
auto validType = ::llvm::dyn_cast<::llzk::pod::PodType>(type))
1149 _odsPrinter.printStrippedAttrOrType(validType);
1151 _odsPrinter << type;
1157 if (
auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
1158 _odsPrinter.printStrippedAttrOrType(validType);
1160 _odsPrinter << type;
1162 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1163 elidedAttrs.push_back(
"record_name");
1164 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1169 ::llvm::SmallPtrSetImpl<::mlir::Attribute> &usedIndices,
1170 ::mlir::SmallVectorImpl<::mlir::MemorySlot> &mustBeSafelyUsed,
1171 const ::mlir::DataLayout &dataLayout) {
1172 return ::llvm::cast<PodAccessOpInterface>(getOperation())
1173 .canRewire(slot, usedIndices, mustBeSafelyUsed, dataLayout);
1178 ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot> &subslots,
1179 ::mlir::OpBuilder &builder, const ::mlir::DataLayout &dataLayout) {
1180 return ::llvm::cast<PodAccessOpInterface>(getOperation())
1181 .rewire(slot, subslots, builder, dataLayout);
1196 ::mlir::Value, const ::mlir::DataLayout &) {
1202 const ::mlir::MemorySlot &slot,
1203 const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &blockingUses,
1204 ::llvm::SmallVectorImpl<::mlir::OpOperand *> & ,
1205 const ::mlir::DataLayout & ) {
1206 if (blockingUses.size() != 1) {
1209 ::mlir::Value blockingUse = (*blockingUses.begin())->get();
1210 return blockingUse == slot.ptr &&
getPodRef() == slot.ptr &&
1216 const ::mlir::MemorySlot &, const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &,
1217 ::mlir::OpBuilder &, ::mlir::Value reachingDefinition, const ::mlir::DataLayout &) {
1219 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.
::mlir::FlatSymbolRefAttr getRecordNameAttr()
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()
void writeProperties(::mlir::DialectBytecodeWriter &writer)
::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 setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::mlir::Operation::result_range getODSResults(unsigned index)
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value pod_ref, ::mlir::FlatSymbolRefAttr record_name)
::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.
void setRecordName(::llvm::StringRef attrValue)
::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.
::mlir::FlatSymbolRefAttr getRecordNameAttr()
::llvm::LogicalResult verify()
static llvm::hash_code computePropertiesHash(const Properties &prop)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
::llvm::LogicalResult verifyInvariants()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::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()
void writeProperties(::mlir::DialectBytecodeWriter &writer)
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 loadsFrom(const ::mlir::MemorySlot &slot)
Required by PromotableMemOpInterface / mem2reg pass.
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::mlir::StringAttr getRecordNameAttrName()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value pod_ref, ::mlir::FlatSymbolRefAttr record_name, ::mlir::Value value)
::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
::llvm::StringRef getRecordName()
::mlir::FlatSymbolRefAttr getRecordNameAttr()
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::FlatSymbolRefAttr getRecordNameAttr()
::mlir::DictionaryAttr odsAttrs
::std::optional<::mlir::OperationName > odsOpName
const Properties & getProperties()
WritePodOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::RegionRange odsRegions
::llvm::StringRef getRecordName()
mlir::ArrayRef< RecordValue > InitializedRecords
ParseResult parseRecordName(AsmParser &parser, FlatSymbolRefAttr &name)
void printRecordName(AsmPrinter &printer, Operation *, FlatSymbolRefAttr name)
bool isValidType(Type type)
mapOpGroupSizesTy mapOpGroupSizes
operandSegmentSizesTy operandSegmentSizes
initializedRecordsTy initializedRecords
numDimsPerMapTy numDimsPerMap
record_nameTy record_name
record_nameTy record_name