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_attr_constraint_Ops1(
50 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
51 if (attr && !((::llvm::isa<::mlir::SymbolRefAttr>(attr))))
52 return emitError() <<
"attribute '" << attrName
53 <<
"' failed to satisfy constraint: symbol reference attribute";
54 return ::mlir::success();
56static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops1(
57 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
58 return __mlir_ods_local_attr_constraint_Ops1(attr, attrName, [op]() {
59 return op->emitOpError();
63static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops2(
64 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
65 if (attr && !((::llvm::isa<::mlir::ArrayAttr>(attr))))
66 return emitError() <<
"attribute '" << attrName
67 <<
"' failed to satisfy constraint: array attribute";
68 return ::mlir::success();
70static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops2(
71 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
72 return __mlir_ods_local_attr_constraint_Ops2(attr, attrName, [op]() {
73 return op->emitOpError();
77static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops3(
78 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
79 if (attr && !((::llvm::isa<::mlir::DenseI32ArrayAttr>(attr))))
80 return emitError() <<
"attribute '" << attrName
81 <<
"' failed to satisfy constraint: i32 dense array attribute";
82 return ::mlir::success();
84static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops3(
85 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
86 return __mlir_ods_local_attr_constraint_Ops3(attr, attrName, [op]() {
87 return op->emitOpError();
91static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops4(
92 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
93 if (attr && !((::llvm::isa<::mlir::StringAttr>(attr))))
94 return emitError() <<
"attribute '" << attrName
95 <<
"' failed to satisfy constraint: string attribute";
96 return ::mlir::success();
98static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops4(
99 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
100 return __mlir_ods_local_attr_constraint_Ops4(attr, attrName, [op]() {
101 return op->emitOpError();
105static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops5(
106 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
107 if (attr && !(((::llvm::isa<::mlir::TypeAttr>(attr))) && ((::llvm::isa<::mlir::FunctionType>(::llvm::cast<::mlir::TypeAttr>(attr).getValue()))) && ((::llvm::isa<::mlir::FunctionType>(::llvm::cast<::mlir::TypeAttr>(attr).getValue())))))
108 return emitError() <<
"attribute '" << attrName
109 <<
"' failed to satisfy constraint: type attribute of function type";
110 return ::mlir::success();
112static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops5(
113 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
114 return __mlir_ods_local_attr_constraint_Ops5(attr, attrName, [op]() {
115 return op->emitOpError();
119static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops6(
120 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
121 if (attr && !(((::llvm::isa<::mlir::ArrayAttr>(attr))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(attr), [&](::mlir::Attribute attr) {
return attr && ((::llvm::isa<::mlir::DictionaryAttr>(attr))); }))))
122 return emitError() <<
"attribute '" << attrName
123 <<
"' failed to satisfy constraint: Array of dictionary attributes";
124 return ::mlir::success();
126static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_Ops6(
127 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
128 return __mlir_ods_local_attr_constraint_Ops6(attr, attrName, [op]() {
129 return op->emitOpError();
133static ::llvm::LogicalResult __mlir_ods_local_region_constraint_Ops1(
134 ::mlir::Operation *op, ::mlir::Region ®ion, ::llvm::StringRef regionName,
135 unsigned regionIndex) {
137 return op->emitOpError(
"region #") << regionIndex
138 << (regionName.empty() ?
" " :
" ('" + regionName +
"') ")
139 <<
"failed to verify constraint: any region";
141 return ::mlir::success();
159 for (
unsigned i = 0; i < index; ++i)
160 start += sizeAttr[i];
161 return {start, sizeAttr[index]};
171 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
175 auto attr = ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(
getProperties().numDimsPerMap);
194 if (!tblgen_callee)
return emitError(loc,
"'function.call' op ""requires attribute 'callee'");
196 if (!tblgen_mapOpGroupSizes)
return emitError(loc,
"'function.call' op ""requires attribute 'mapOpGroupSizes'");
200 if (tblgen_callee && !((::llvm::isa<::mlir::SymbolRefAttr>(tblgen_callee))))
201 return emitError(loc,
"'function.call' op ""attribute 'callee' failed to satisfy constraint: symbol reference attribute");
203 if (tblgen_templateParams && !((::llvm::isa<::mlir::ArrayAttr>(tblgen_templateParams))))
204 return emitError(loc,
"'function.call' op ""attribute 'templateParams' failed to satisfy constraint: array attribute");
206 if (tblgen_numDimsPerMap && !((::llvm::isa<::mlir::DenseI32ArrayAttr>(tblgen_numDimsPerMap))))
207 return emitError(loc,
"'function.call' op ""attribute 'numDimsPerMap' failed to satisfy constraint: i32 dense array attribute");
209 if (tblgen_mapOpGroupSizes && !((::llvm::isa<::mlir::DenseI32ArrayAttr>(tblgen_mapOpGroupSizes))))
210 return emitError(loc,
"'function.call' op ""attribute 'mapOpGroupSizes' failed to satisfy constraint: i32 dense array attribute");
211 return ::mlir::success();
215 ::llvm::ArrayRef<int32_t> sizeAttr = getProperties().operandSegmentSizes;
218 for (
unsigned i = 0; i < index; ++i)
219 start += sizeAttr[i];
220 return {start, sizeAttr[index]};
225 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second, ::mlir::MutableOperandRange::OperandSegment(0u, {getOperandSegmentSizesAttrName(), ::mlir::DenseI32ArrayAttr::get(getContext(), getProperties().operandSegmentSizes)}));
231 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second, ::mlir::MutableOperandRange::OperandSegment(1u, {getOperandSegmentSizesAttrName(), ::mlir::DenseI32ArrayAttr::get(getContext(), getProperties().operandSegmentSizes)}));
236 bool isVariadic[] = {
true};
237 int prevVariadicCount = 0;
238 for (
unsigned i = 0; i < index; ++i)
239 if (isVariadic[i]) ++prevVariadicCount;
243 int variadicSize = (getOperation()->getNumResults() - 0) / 1;
248 int start = index + (variadicSize - 1) * prevVariadicCount;
249 int size = isVariadic[index] ? variadicSize : 1;
250 return {start, size};
254 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
256 emitError() <<
"expected DictionaryAttr to set properties";
257 return ::mlir::failure();
261 auto &propStorage = prop.
callee;
262 auto attr = dict.get(
"callee");
264 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
266 propStorage = convertedAttr;
268 emitError() <<
"Invalid attribute `callee` in property conversion: " << attr;
269 return ::mlir::failure();
276 auto attr = dict.get(
"mapOpGroupSizes");
278 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
280 propStorage = convertedAttr;
282 emitError() <<
"Invalid attribute `mapOpGroupSizes` in property conversion: " << attr;
283 return ::mlir::failure();
290 auto attr = dict.get(
"numDimsPerMap");
292 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
294 propStorage = convertedAttr;
296 emitError() <<
"Invalid attribute `numDimsPerMap` in property conversion: " << attr;
297 return ::mlir::failure();
304 auto attr = dict.get(
"templateParams");
306 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
308 propStorage = convertedAttr;
310 emitError() <<
"Invalid attribute `templateParams` in property conversion: " << attr;
311 return ::mlir::failure();
317 auto setFromAttr = [] (
auto &propStorage, ::mlir::Attribute propAttr,
318 ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) -> ::mlir::LogicalResult {
319 return convertFromAttribute(propStorage, propAttr, emitError);
321 auto attr = dict.get(
"operandSegmentSizes");
if (!attr) attr = dict.get(
"operand_segment_sizes");;
324 return ::mlir::failure();
326 return ::mlir::success();
330 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
331 ::mlir::Builder odsBuilder{ctx};
334 const auto &propStorage = prop.
callee;
336 attrs.push_back(odsBuilder.getNamedAttr(
"callee",
343 attrs.push_back(odsBuilder.getNamedAttr(
"mapOpGroupSizes",
350 attrs.push_back(odsBuilder.getNamedAttr(
"numDimsPerMap",
357 attrs.push_back(odsBuilder.getNamedAttr(
"templateParams",
363 auto attr = [&]() -> ::mlir::Attribute {
364 return ::mlir::DenseI32ArrayAttr::get(ctx, propStorage);
366 attrs.push_back(odsBuilder.getNamedAttr(
"operandSegmentSizes", attr));
370 return odsBuilder.getDictionaryAttr(attrs);
375 auto hash_operandSegmentSizes = [] (
const auto &propStorage) -> llvm::hash_code {
376 return ::llvm::hash_combine_range(std::begin(propStorage), std::end(propStorage));;
378 return llvm::hash_combine(
379 llvm::hash_value(prop.
callee.getAsOpaquePointer()),
387 if (name ==
"callee")
390 if (name ==
"mapOpGroupSizes")
393 if (name ==
"numDimsPerMap")
396 if (name ==
"templateParams")
398 if (name ==
"operand_segment_sizes" || name ==
"operandSegmentSizes")
return [&]() -> ::mlir::Attribute { return ::mlir::DenseI32ArrayAttr::get(ctx, prop.
operandSegmentSizes); }();
403 if (name ==
"callee") {
404 prop.
callee = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
callee)>>(value);
408 if (name ==
"mapOpGroupSizes") {
413 if (name ==
"numDimsPerMap") {
418 if (name ==
"templateParams") {
422 if (name ==
"operand_segment_sizes" || name ==
"operandSegmentSizes") {
423 auto arrAttr = ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(value);
424 if (!arrAttr)
return;
440 attrs.append(
"operandSegmentSizes", [&]() -> ::mlir::Attribute { return ::mlir::DenseI32ArrayAttr::get(ctx, prop.
operandSegmentSizes); }());
443::llvm::LogicalResult
CallOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
446 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(attr,
"callee", emitError)))
447 return ::mlir::failure();
452 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops3(attr,
"mapOpGroupSizes", emitError)))
453 return ::mlir::failure();
458 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops3(attr,
"numDimsPerMap", emitError)))
459 return ::mlir::failure();
464 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(attr,
"templateParams", emitError)))
465 return ::mlir::failure();
467 return ::mlir::success();
477 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
491 getProperties().numDimsPerMap = ::mlir::Builder((*this)->getContext()).getDenseI32ArrayAttr(attrValue);
495 getProperties().mapOpGroupSizes = ::mlir::Builder((*this)->getContext()).getDenseI32ArrayAttr(attrValue);
498void CallOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::SymbolRefAttr callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::llvm::ArrayRef<int32_t> numDimsPerMap, ::mlir::ValueRange argOperands, ::llvm::ArrayRef<::mlir::Attribute> templateParams) {
499 build(odsBuilder, odsState, resultTypes, callee, mapOperands,
500 odsBuilder.getDenseI32ArrayAttr(numDimsPerMap),
501 argOperands, templateParams);
508 argOperands, templateParams);
512void CallOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState,
::llzk::function::FuncDefOp callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap, ::mlir::ValueRange argOperands, ::llvm::ArrayRef<::mlir::Attribute> templateParams) {
515 argOperands, templateParams);
519void CallOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState,
::llzk::function::FuncDefOp callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::llvm::ArrayRef<int32_t> numDimsPerMap, ::mlir::ValueRange argOperands, ::llvm::ArrayRef<::mlir::Attribute> templateParams) {
520 build(odsBuilder, odsState, callee, mapOperands,
521 odsBuilder.getDenseI32ArrayAttr(numDimsPerMap),
522 argOperands, templateParams);
527 ::mlir::Builder odsBuilder(opName.getContext());
529 properties.
numDimsPerMap = odsBuilder.getDenseI32ArrayAttr({});
533 auto tblgen_callee = getProperties().callee; (void)tblgen_callee;
534 if (!tblgen_callee)
return emitOpError(
"requires attribute 'callee'");
535 auto tblgen_mapOpGroupSizes = getProperties().mapOpGroupSizes; (void)tblgen_mapOpGroupSizes;
536 if (!tblgen_mapOpGroupSizes)
return emitOpError(
"requires attribute 'mapOpGroupSizes'");
537 auto tblgen_numDimsPerMap = getProperties().numDimsPerMap; (void)tblgen_numDimsPerMap;
538 auto tblgen_templateParams = getProperties().templateParams; (void)tblgen_templateParams;
540 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(*
this, tblgen_callee,
"callee")))
541 return ::mlir::failure();
543 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(*
this, tblgen_templateParams,
"templateParams")))
544 return ::mlir::failure();
546 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops3(*
this, tblgen_numDimsPerMap,
"numDimsPerMap")))
547 return ::mlir::failure();
549 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops3(*
this, tblgen_mapOpGroupSizes,
"mapOpGroupSizes")))
550 return ::mlir::failure();
552 unsigned index = 0; (void)index;
555 for (
auto v : valueGroup0) {
556 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
557 return ::mlir::failure();
560 if (::mlir::failed(::mlir::OpTrait::impl::verifyValueSizeAttr(*
this,
"mapOpGroupSizes",
"mapOperands", valueGroup1.size())))
561 return ::mlir::failure();
563 for (
auto v : valueGroup1) {
564 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"operand", index++)))
565 return ::mlir::failure();
569 unsigned index = 0; (void)index;
572 for (
auto v : valueGroup0) {
573 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"result", index++)))
574 return ::mlir::failure();
577 return ::mlir::success();
584::mlir::ParseResult
CallOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
585 ::mlir::SymbolRefAttr calleeAttr;
586 ::mlir::ArrayAttr templateParamsAttr;
587 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argOperandsOperands;
588 ::llvm::SMLoc argOperandsOperandsLoc;
589 (void)argOperandsOperandsLoc;
590 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> mapOperandsOperands;
591 llvm::SmallVector<int32_t> mapOperandsOperandGroupSizes;
592 ::llvm::SMLoc mapOperandsOperandsLoc;
593 (void)mapOperandsOperandsLoc;
594 ::mlir::DenseI32ArrayAttr numDimsPerMapAttr;
595 ::llvm::ArrayRef<::mlir::Type> argOperandsTypes;
596 ::llvm::ArrayRef<::mlir::Type> allResultTypes;
598 if (parser.parseCustomAttributeWithFallback(calleeAttr, parser.getBuilder().getType<::mlir::NoneType>())) {
599 return ::mlir::failure();
602 if (::mlir::succeeded(parser.parseOptionalLess())) {
605 if (odsResult) return ::mlir::failure();
606 if (templateParamsAttr)
609 if (parser.parseGreater())
610 return ::mlir::failure();
612 if (parser.parseLParen())
613 return ::mlir::failure();
615 argOperandsOperandsLoc = parser.getCurrentLocation();
616 if (parser.parseOperandList(argOperandsOperands))
617 return ::mlir::failure();
618 if (parser.parseRParen())
619 return ::mlir::failure();
620 if (::mlir::succeeded(parser.parseOptionalLBrace())) {
622 mapOperandsOperandsLoc = parser.getCurrentLocation();
623 ::llvm::SmallVector<::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand>> mapOperandsOperandGroups;
625 if (odsResult) return ::mlir::failure();
626 for (
const auto &subRange : mapOperandsOperandGroups) {
627 mapOperandsOperands.append(subRange.begin(), subRange.end());
628 mapOperandsOperandGroupSizes.push_back(subRange.size());
630 if (numDimsPerMapAttr)
633 if (parser.parseRBrace())
634 return ::mlir::failure();
636 if (parser.parseColon())
637 return ::mlir::failure();
639 ::mlir::FunctionType argOperands__allResult_functionType;
640 if (parser.parseType(argOperands__allResult_functionType))
641 return ::mlir::failure();
642 argOperandsTypes = argOperands__allResult_functionType.getInputs();
643 allResultTypes = argOperands__allResult_functionType.getResults();
646 if (odsResult) return ::mlir::failure();
648::llvm::copy(::llvm::ArrayRef<int32_t>({
static_cast<int32_t
>(argOperandsOperands.size()),
static_cast<int32_t
>(mapOperandsOperands.size())}), result.getOrAddProperties<
CallOp::Properties>().operandSegmentSizes.begin());
649 result.getOrAddProperties<
CallOp::Properties>().mapOpGroupSizes = parser.getBuilder().getDenseI32ArrayAttr(mapOperandsOperandGroupSizes);
650 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIndexType();
651 result.addTypes(allResultTypes);
652 if (parser.resolveOperands(argOperandsOperands, argOperandsTypes, argOperandsOperandsLoc, result.operands))
653 return ::mlir::failure();
654 if (parser.resolveOperands(mapOperandsOperands, odsBuildableType0, mapOperandsOperandsLoc, result.operands))
655 return ::mlir::failure();
656 return ::mlir::success();
660 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
662 emitError() <<
"expected DictionaryAttr to set properties";
663 return ::mlir::failure();
668 auto attr = dict.get(
"mapOpGroupSizes");
671 emitError() <<
"expected key entry for mapOpGroupSizes in DictionaryAttr to set "
673 return ::mlir::failure();
675 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
677 propStorage = convertedAttr;
679 emitError() <<
"Invalid attribute `mapOpGroupSizes` in property conversion: " << attr;
680 return ::mlir::failure();
684 return ::mlir::success();
699 _odsPrinter <<
' ' <<
"{";
703 _odsPrinter <<
' ' <<
":";
705 _odsPrinter.printFunctionalType(
getArgOperands().getTypes(), getOperation()->getResultTypes());
726 return attr.getValue();
731 return ::llvm::cast<::mlir::FunctionType>(attr.getValue());
736 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
741 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
750 if (!tblgen_function_type)
return emitError(loc,
"'function.def' op ""requires attribute 'function_type'");
753 if (!tblgen_sym_name)
return emitError(loc,
"'function.def' op ""requires attribute 'sym_name'");
755 if (tblgen_sym_name && !((::llvm::isa<::mlir::StringAttr>(tblgen_sym_name))))
756 return emitError(loc,
"'function.def' op ""attribute 'sym_name' failed to satisfy constraint: string attribute");
758 if (tblgen_function_type && !(((::llvm::isa<::mlir::TypeAttr>(tblgen_function_type))) && ((::llvm::isa<::mlir::FunctionType>(::llvm::cast<::mlir::TypeAttr>(tblgen_function_type).getValue()))) && ((::llvm::isa<::mlir::FunctionType>(::llvm::cast<::mlir::TypeAttr>(tblgen_function_type).getValue())))))
759 return emitError(loc,
"'function.def' op ""attribute 'function_type' failed to satisfy constraint: type attribute of function type");
761 if (tblgen_arg_attrs && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_arg_attrs))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_arg_attrs), [&](::mlir::Attribute attr) {
return attr && ((::llvm::isa<::mlir::DictionaryAttr>(attr))); }))))
762 return emitError(loc,
"'function.def' op ""attribute 'arg_attrs' failed to satisfy constraint: Array of dictionary attributes");
764 if (tblgen_res_attrs && !(((::llvm::isa<::mlir::ArrayAttr>(tblgen_res_attrs))) && (::llvm::all_of(::llvm::cast<::mlir::ArrayAttr>(tblgen_res_attrs), [&](::mlir::Attribute attr) {
return attr && ((::llvm::isa<::mlir::DictionaryAttr>(attr))); }))))
765 return emitError(loc,
"'function.def' op ""attribute 'res_attrs' failed to satisfy constraint: Array of dictionary attributes");
766 return ::mlir::success();
770 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
772 emitError() <<
"expected DictionaryAttr to set properties";
773 return ::mlir::failure();
778 auto attr = dict.get(
"arg_attrs");
780 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
782 propStorage = convertedAttr;
784 emitError() <<
"Invalid attribute `arg_attrs` in property conversion: " << attr;
785 return ::mlir::failure();
792 auto attr = dict.get(
"function_type");
794 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
796 propStorage = convertedAttr;
798 emitError() <<
"Invalid attribute `function_type` in property conversion: " << attr;
799 return ::mlir::failure();
806 auto attr = dict.get(
"res_attrs");
808 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
810 propStorage = convertedAttr;
812 emitError() <<
"Invalid attribute `res_attrs` in property conversion: " << attr;
813 return ::mlir::failure();
820 auto attr = dict.get(
"sym_name");
822 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
824 propStorage = convertedAttr;
826 emitError() <<
"Invalid attribute `sym_name` in property conversion: " << attr;
827 return ::mlir::failure();
831 return ::mlir::success();
835 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
836 ::mlir::Builder odsBuilder{ctx};
839 const auto &propStorage = prop.
arg_attrs;
841 attrs.push_back(odsBuilder.getNamedAttr(
"arg_attrs",
848 attrs.push_back(odsBuilder.getNamedAttr(
"function_type",
853 const auto &propStorage = prop.
res_attrs;
855 attrs.push_back(odsBuilder.getNamedAttr(
"res_attrs",
860 const auto &propStorage = prop.
sym_name;
862 attrs.push_back(odsBuilder.getNamedAttr(
"sym_name",
867 return odsBuilder.getDictionaryAttr(attrs);
872 return llvm::hash_combine(
873 llvm::hash_value(prop.
arg_attrs.getAsOpaquePointer()),
875 llvm::hash_value(prop.
res_attrs.getAsOpaquePointer()),
876 llvm::hash_value(prop.
sym_name.getAsOpaquePointer()));
880 if (name ==
"arg_attrs")
883 if (name ==
"function_type")
886 if (name ==
"res_attrs")
889 if (name ==
"sym_name")
895 if (name ==
"arg_attrs") {
896 prop.
arg_attrs = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
arg_attrs)>>(value);
900 if (name ==
"function_type") {
905 if (name ==
"res_attrs") {
906 prop.
res_attrs = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
res_attrs)>>(value);
910 if (name ==
"sym_name") {
911 prop.
sym_name = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
sym_name)>>(value);
926::llvm::LogicalResult
FuncDefOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
929 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops6(attr,
"arg_attrs", emitError)))
930 return ::mlir::failure();
935 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops5(attr,
"function_type", emitError)))
936 return ::mlir::failure();
941 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops6(attr,
"res_attrs", emitError)))
942 return ::mlir::failure();
947 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops4(attr,
"sym_name", emitError)))
948 return ::mlir::failure();
950 return ::mlir::success();
954 auto &prop = state.getOrAddProperties<
Properties>(); (void)prop;
955 if (::mlir::failed(reader.readOptionalAttribute(prop.
arg_attrs)))
956 return ::mlir::failure();
958 if (::mlir::failed(reader.readAttribute(prop.
function_type)))
959 return ::mlir::failure();
961 if (::mlir::failed(reader.readOptionalAttribute(prop.
res_attrs)))
962 return ::mlir::failure();
964 if (::mlir::failed(reader.readAttribute(prop.
sym_name)))
965 return ::mlir::failure();
966 return ::mlir::success();
970 auto &prop = getProperties(); (void)prop;
972 writer.writeOptionalAttribute(prop.
arg_attrs);
975 writer.writeOptionalAttribute(prop.
res_attrs);
976 writer.writeAttribute(prop.
sym_name);
981 return attr.getValue();
986 return ::llvm::cast<::mlir::FunctionType>(attr.getValue());
991 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
996 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
1000 getProperties().sym_name = ::mlir::Builder((*this)->getContext()).getStringAttr(attrValue);
1004 getProperties().function_type = ::mlir::TypeAttr::get(attrValue);
1007void FuncDefOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, ::mlir::TypeAttr function_type, ::mlir::ArrayAttr arg_attrs, ::mlir::ArrayAttr res_attrs) {
1008 odsState.getOrAddProperties<
Properties>().sym_name = sym_name;
1009 odsState.getOrAddProperties<
Properties>().function_type = function_type;
1011 odsState.getOrAddProperties<
Properties>().arg_attrs = arg_attrs;
1014 odsState.getOrAddProperties<
Properties>().res_attrs = res_attrs;
1016 (void)odsState.addRegion();
1019void FuncDefOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name, ::mlir::TypeAttr function_type, ::mlir::ArrayAttr arg_attrs, ::mlir::ArrayAttr res_attrs) {
1020 odsState.getOrAddProperties<
Properties>().sym_name = sym_name;
1021 odsState.getOrAddProperties<
Properties>().function_type = function_type;
1023 odsState.getOrAddProperties<
Properties>().arg_attrs = arg_attrs;
1026 odsState.getOrAddProperties<
Properties>().res_attrs = res_attrs;
1028 (void)odsState.addRegion();
1029 assert(resultTypes.size() == 0u &&
"mismatched number of results");
1030 odsState.addTypes(resultTypes);
1033void FuncDefOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name, ::mlir::FunctionType function_type, ::mlir::ArrayAttr arg_attrs, ::mlir::ArrayAttr res_attrs) {
1034 odsState.getOrAddProperties<
Properties>().sym_name = odsBuilder.getStringAttr(sym_name);
1035 odsState.getOrAddProperties<
Properties>().function_type = ::mlir::TypeAttr::get(function_type);
1037 odsState.getOrAddProperties<
Properties>().arg_attrs = arg_attrs;
1040 odsState.getOrAddProperties<
Properties>().res_attrs = res_attrs;
1042 (void)odsState.addRegion();
1045void FuncDefOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name, ::mlir::FunctionType function_type, ::mlir::ArrayAttr arg_attrs, ::mlir::ArrayAttr res_attrs) {
1046 odsState.getOrAddProperties<
Properties>().sym_name = odsBuilder.getStringAttr(sym_name);
1047 odsState.getOrAddProperties<
Properties>().function_type = ::mlir::TypeAttr::get(function_type);
1049 odsState.getOrAddProperties<
Properties>().arg_attrs = arg_attrs;
1052 odsState.getOrAddProperties<
Properties>().res_attrs = res_attrs;
1054 (void)odsState.addRegion();
1055 assert(resultTypes.size() == 0u &&
"mismatched number of results");
1056 odsState.addTypes(resultTypes);
1059void FuncDefOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1060 assert(operands.size() == 0u &&
"mismatched number of parameters");
1061 odsState.addOperands(operands);
1062 odsState.addAttributes(attributes);
1063 for (
unsigned i = 0; i != 1; ++i)
1064 (
void)odsState.addRegion();
1065 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
1066 odsState.addTypes(resultTypes);
1068 if (!attributes.empty()) {
1069 ::mlir::OpaqueProperties properties =
1071 std::optional<::mlir::RegisteredOperationName> info =
1072 odsState.name.getRegisteredInfo();
1073 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
1074 odsState.attributes.getDictionary(odsState.getContext()),
nullptr)))
1075 ::llvm::report_fatal_error(
"Property conversion failed.");
1080 auto tblgen_arg_attrs = getProperties().arg_attrs; (void)tblgen_arg_attrs;
1081 auto tblgen_function_type = getProperties().function_type; (void)tblgen_function_type;
1082 if (!tblgen_function_type)
return emitOpError(
"requires attribute 'function_type'");
1083 auto tblgen_res_attrs = getProperties().res_attrs; (void)tblgen_res_attrs;
1084 auto tblgen_sym_name = getProperties().sym_name; (void)tblgen_sym_name;
1085 if (!tblgen_sym_name)
return emitOpError(
"requires attribute 'sym_name'");
1087 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops4(*
this, tblgen_sym_name,
"sym_name")))
1088 return ::mlir::failure();
1090 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops5(*
this, tblgen_function_type,
"function_type")))
1091 return ::mlir::failure();
1093 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops6(*
this, tblgen_arg_attrs,
"arg_attrs")))
1094 return ::mlir::failure();
1096 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops6(*
this, tblgen_res_attrs,
"res_attrs")))
1097 return ::mlir::failure();
1099 unsigned index = 0; (void)index;
1101 for (
auto ®ion : ::llvm::MutableArrayRef((*this)->getRegion(0)))
1102 if (::mlir::failed(__mlir_ods_local_region_constraint_Ops1(*
this, region,
"body", index++)))
1103 return ::mlir::failure();
1105 return ::mlir::success();
1110 return ::mlir::success();
1111 return ::mlir::failure();
1127 bool isVariadic[] = {
true};
1128 int prevVariadicCount = 0;
1129 for (
unsigned i = 0; i < index; ++i)
1130 if (isVariadic[i]) ++prevVariadicCount;
1134 int variadicSize = (odsOperandsSize - 0) / 1;
1139 int start = index + (variadicSize - 1) * prevVariadicCount;
1140 int size = isVariadic[index] ? variadicSize : 1;
1141 return {start, size};
1148 return ::mlir::success();
1152 bool isVariadic[] = {
true};
1153 int prevVariadicCount = 0;
1154 for (
unsigned i = 0; i < index; ++i)
1155 if (isVariadic[i]) ++prevVariadicCount;
1159 int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
1164 int start = index + (variadicSize - 1) * prevVariadicCount;
1165 int size = isVariadic[index] ? variadicSize : 1;
1166 return {start, size};
1171 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
1172 return mutableRange;
1176 build(odsBuilder, odsState, std::nullopt);
1180void ReturnOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands) {
1181 odsState.addOperands(operands);
1184void ReturnOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1185 odsState.addOperands(operands);
1186 odsState.addAttributes(attributes);
1187 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
1188 odsState.addTypes(resultTypes);
1193 unsigned index = 0; (void)index;
1196 for (
auto v : valueGroup0) {
1197 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
1198 return ::mlir::failure();
1201 return ::mlir::success();
1206 return ::mlir::success();
1207 return ::mlir::failure();
1210::mlir::ParseResult
ReturnOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1211 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> operandsOperands;
1212 ::llvm::SMLoc operandsOperandsLoc;
1213 (void)operandsOperandsLoc;
1214 ::llvm::SmallVector<::mlir::Type, 1> operandsTypes;
1216 auto loc = parser.getCurrentLocation();(void)loc;
1217 if (parser.parseOptionalAttrDict(result.attributes))
1218 return ::mlir::failure();
1221 operandsOperandsLoc = parser.getCurrentLocation();
1222 if (parser.parseOperandList(operandsOperands))
1223 return ::mlir::failure();
1224 if (!operandsOperands.empty()) {
1225 if (parser.parseColon())
1226 return ::mlir::failure();
1228 if (parser.parseTypeList(operandsTypes))
1229 return ::mlir::failure();
1231 if (parser.resolveOperands(operandsOperands, operandsTypes, operandsOperandsLoc, result.operands))
1232 return ::mlir::failure();
1233 return ::mlir::success();
1237 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1238 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1242 _odsPrinter <<
' ' <<
":";
1248void ReturnOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1252 ::mlir::RegionBranchPoint point) {
1253 return ::mlir::MutableOperandRange(*
this);
::llvm::LogicalResult verify(::mlir::Location loc)
CallOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::ValueRange getOperands()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::SymbolRefAttr callee, ::mlir::ValueRange argOperands={}, ::llvm::ArrayRef<::mlir::Attribute > templateParams={})
void setNumDimsPerMap(::llvm::ArrayRef< int32_t > attrValue)
::mlir::SymbolRefAttr getCalleeAttr()
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static llvm::hash_code computePropertiesHash(const Properties &prop)
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties)
::mlir::SymbolRefAttr getCallee()
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
void setMapOpGroupSizes(::llvm::ArrayRef< int32_t > attrValue)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::StringAttr getTemplateParamsAttrName()
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::mlir::MutableOperandRange getArgOperandsMutable()
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
::mlir::Operation::operand_range getArgOperands()
::llvm::LogicalResult verifyInvariants()
::mlir::StringAttr getMapOpGroupSizesAttrName()
::mlir::ArrayAttr getTemplateParamsAttr()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::OperandRangeRange getMapOperands()
FoldAdaptor::Properties Properties
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
::std::optional< ::mlir::ArrayAttr > getTemplateParams()
::mlir::StringAttr getNumDimsPerMapAttrName()
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::mlir::MutableOperandRangeRange getMapOperandsMutable()
::llvm::LogicalResult verifyInvariantsImpl()
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::StringAttr getCalleeAttrName()
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
::mlir::Operation::operand_range getODSOperands(unsigned index)
FuncDefOpAdaptor(FuncDefOp op)
FuncDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
::mlir::ValueRange getOperands()
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
static llvm::hash_code computePropertiesHash(const Properties &prop)
FoldAdaptor::Properties Properties
::mlir::FunctionType getFunctionType()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef name, ::mlir::FunctionType type, ::llvm::ArrayRef<::mlir::NamedAttribute > attrs={}, ::llvm::ArrayRef<::mlir::DictionaryAttr > argAttrs={})
::mlir::StringAttr getSymNameAttrName()
::mlir::StringAttr getFunctionTypeAttrName()
::llvm::LogicalResult verifyInvariants()
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
::mlir::StringAttr getResAttrsAttrName()
::std::optional< ::mlir::ArrayAttr > getResAttrs()
::std::optional< ::mlir::ArrayAttr > getArgAttrs()
::mlir::ArrayAttr getArgAttrsAttr()
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
::llvm::StringRef getSymName()
void setFunctionType(::mlir::FunctionType attrValue)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::llvm::ArrayRef<::mlir::Type > getResultTypes()
Required by FunctionOpInterface.
void setSymName(::llvm::StringRef attrValue)
::mlir::SymbolRefAttr getFullyQualifiedName(bool requireParent=true)
Return the full name for this function from the root module, including all surrounding symbol table n...
::mlir::TypeAttr getFunctionTypeAttr()
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::llvm::LogicalResult verify()
::mlir::StringAttr getSymNameAttr()
::mlir::ArrayAttr getResAttrsAttr()
::llvm::LogicalResult verifyInvariantsImpl()
::mlir::StringAttr getArgAttrsAttrName()
ReturnOpAdaptor(ReturnOp op)
ReturnOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
::mlir::ValueRange getOperands()
void print(::mlir::OpAsmPrinter &_odsPrinter)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::llvm::LogicalResult verifyInvariantsImpl()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState)
::mlir::Operation::operand_range getODSOperands(unsigned index)
::mlir::MutableOperandRange getMutableSuccessorOperands(::mlir::RegionBranchPoint point)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::llvm::LogicalResult verify()
::mlir::MutableOperandRange getOperandsMutable()
::mlir::Operation::operand_range getOperands()
::llvm::LogicalResult verifyInvariants()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
CallOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::SymbolRefAttr getCallee()
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
::mlir::DictionaryAttr odsAttrs
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
::std::optional< ::mlir::ArrayAttr > getTemplateParams()
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
::mlir::SymbolRefAttr getCalleeAttr()
::std::optional<::mlir::OperationName > odsOpName
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
::mlir::RegionRange odsRegions
const Properties & getProperties()
::mlir::ArrayAttr getTemplateParamsAttr()
::std::optional< ::mlir::ArrayAttr > getResAttrs()
::std::optional< ::mlir::ArrayAttr > getArgAttrs()
::mlir::ArrayAttr getArgAttrsAttr()
::mlir::StringAttr getSymNameAttr()
::mlir::RegionRange getRegions()
::mlir::TypeAttr getFunctionTypeAttr()
::mlir::DictionaryAttr odsAttrs
const Properties & getProperties()
FuncDefOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::FunctionType getFunctionType()
::std::optional<::mlir::OperationName > odsOpName
::llvm::StringRef getSymName()
::mlir::RegionRange odsRegions
::mlir::ArrayAttr getResAttrsAttr()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
void printTemplateParams(mlir::AsmPrinter &printer, mlir::ArrayAttr value)
mlir::ParseResult parseAttrDictWithWarnings(mlir::OpAsmParser &parser, mlir::NamedAttrList &extraAttrs, mlir::OperationState &state)
bool isValidType(Type type)
void printMultiDimAndSymbolList(mlir::OpAsmPrinter &printer, mlir::Operation *op, mlir::OperandRangeRange multiMapOperands, mlir::DenseI32ArrayAttr numDimsPerMap)
void printAttrDictWithWarnings(mlir::OpAsmPrinter &printer, ConcreteOp op, mlir::DictionaryAttr extraAttrs, typename mlir::PropertiesSelector< ConcreteOp >::type state)
mlir::ParseResult parseTemplateParams(mlir::AsmParser &parser, mlir::ArrayAttr &value)
mlir::ParseResult parseMultiDimAndSymbolList(mlir::OpAsmParser &parser, mlir::SmallVector< mlir::SmallVector< mlir::OpAsmParser::UnresolvedOperand > > &multiMapOperands, mlir::DenseI32ArrayAttr &numDimsPerMap)
operandSegmentSizesTy operandSegmentSizes
numDimsPerMapTy numDimsPerMap
mapOpGroupSizesTy mapOpGroupSizes
templateParamsTy templateParams
function_typeTy function_type