29static ::mlir::LogicalResult __mlir_ods_local_type_constraint_Ops0(
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 ::mlir::LogicalResult __mlir_ods_local_type_constraint_Ops1(
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 ::mlir::LogicalResult __mlir_ods_local_attr_constraint_Ops0(
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 ::mlir::LogicalResult __mlir_ods_local_attr_constraint_Ops0(
57 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
58 return __mlir_ods_local_attr_constraint_Ops0(attr, attrName, [op]() {
59 return op->emitOpError();
63static ::mlir::LogicalResult __mlir_ods_local_attr_constraint_Ops1(
64 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
65 if (attr && !((::llvm::isa<::mlir::DenseI32ArrayAttr>(attr))))
66 return emitError() <<
"attribute '" << attrName
67 <<
"' failed to satisfy constraint: i32 dense array attribute";
68 return ::mlir::success();
70static ::mlir::LogicalResult __mlir_ods_local_attr_constraint_Ops1(
71 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
72 return __mlir_ods_local_attr_constraint_Ops1(attr, attrName, [op]() {
73 return op->emitOpError();
77static ::mlir::LogicalResult __mlir_ods_local_attr_constraint_Ops2(
78 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
79 if (attr && !((::llvm::isa<::mlir::StringAttr>(attr))))
80 return emitError() <<
"attribute '" << attrName
81 <<
"' failed to satisfy constraint: string attribute";
82 return ::mlir::success();
84static ::mlir::LogicalResult __mlir_ods_local_attr_constraint_Ops2(
85 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
86 return __mlir_ods_local_attr_constraint_Ops2(attr, attrName, [op]() {
87 return op->emitOpError();
91static ::mlir::LogicalResult __mlir_ods_local_attr_constraint_Ops3(
92 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
93 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())))))
94 return emitError() <<
"attribute '" << attrName
95 <<
"' failed to satisfy constraint: type attribute of function type";
96 return ::mlir::success();
98static ::mlir::LogicalResult __mlir_ods_local_attr_constraint_Ops3(
99 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
100 return __mlir_ods_local_attr_constraint_Ops3(attr, attrName, [op]() {
101 return op->emitOpError();
105static ::mlir::LogicalResult __mlir_ods_local_attr_constraint_Ops4(
106 ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
107 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))); }))))
108 return emitError() <<
"attribute '" << attrName
109 <<
"' failed to satisfy constraint: Array of dictionary attributes";
110 return ::mlir::success();
112static ::mlir::LogicalResult __mlir_ods_local_attr_constraint_Ops4(
113 ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
114 return __mlir_ods_local_attr_constraint_Ops4(attr, attrName, [op]() {
115 return op->emitOpError();
119static ::mlir::LogicalResult __mlir_ods_local_region_constraint_Ops0(
120 ::mlir::Operation *op, ::mlir::Region ®ion, ::llvm::StringRef regionName,
121 unsigned regionIndex) {
123 return op->emitOpError(
"region #") << regionIndex
124 << (regionName.empty() ?
" " :
" ('" + regionName +
"') ")
125 <<
"failed to verify constraint: any region";
127 return ::mlir::success();
149 for (
unsigned i = 0; i < index; ++i)
150 start += sizeAttr[i];
151 return {start, sizeAttr[index]};
159 auto attr = ::llvm::cast<::mlir::SymbolRefAttr>(
getProperties().callee);
169 auto attr = ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(
getProperties().numDimsPerMap);
179 auto attr = ::llvm::cast<::mlir::DenseI32ArrayAttr>(
getProperties().mapOpGroupSizes);
193 if (!tblgen_callee)
return emitError(loc,
"'function.call' op ""requires attribute 'callee'");
195 if (!tblgen_mapOpGroupSizes)
return emitError(loc,
"'function.call' op ""requires attribute 'mapOpGroupSizes'");
198 if (tblgen_callee && !((::llvm::isa<::mlir::SymbolRefAttr>(tblgen_callee))))
199 return emitError(loc,
"'function.call' op ""attribute 'callee' failed to satisfy constraint: symbol reference attribute");
201 if (tblgen_numDimsPerMap && !((::llvm::isa<::mlir::DenseI32ArrayAttr>(tblgen_numDimsPerMap))))
202 return emitError(loc,
"'function.call' op ""attribute 'numDimsPerMap' failed to satisfy constraint: i32 dense array attribute");
204 if (tblgen_mapOpGroupSizes && !((::llvm::isa<::mlir::DenseI32ArrayAttr>(tblgen_mapOpGroupSizes))))
205 return emitError(loc,
"'function.call' op ""attribute 'mapOpGroupSizes' failed to satisfy constraint: i32 dense array attribute");
206 return ::mlir::success();
210 ::llvm::ArrayRef<int32_t> sizeAttr = getProperties().operandSegmentSizes;
213 for (
unsigned i = 0; i < index; ++i)
214 start += sizeAttr[i];
215 return {start, sizeAttr[index]};
220 return {std::next(getOperation()->operand_begin(), valueRange.first),
221 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
234 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second, ::mlir::MutableOperandRange::OperandSegment(0u, {getOperandSegmentSizesAttrName(), ::mlir::DenseI32ArrayAttr::get(getContext(), getProperties().operandSegmentSizes)}));
240 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second, ::mlir::MutableOperandRange::OperandSegment(1u, {getOperandSegmentSizesAttrName(), ::mlir::DenseI32ArrayAttr::get(getContext(), getProperties().operandSegmentSizes)}));
245 bool isVariadic[] = {
true};
246 int prevVariadicCount = 0;
247 for (
unsigned i = 0; i < index; ++i)
248 if (isVariadic[i]) ++prevVariadicCount;
252 int variadicSize = (getOperation()->getNumResults() - 0) / 1;
257 int start = index + (variadicSize - 1) * prevVariadicCount;
258 int size = isVariadic[index] ? variadicSize : 1;
259 return {start, size};
264 return {std::next(getOperation()->result_begin(), valueRange.first),
265 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
269 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
271 emitError() <<
"expected DictionaryAttr to set properties";
272 return ::mlir::failure();
276 auto &propStorage = prop.
callee;
277 auto attr = dict.get(
"callee");
280 emitError() <<
"expected key entry for callee in DictionaryAttr to set "
282 return ::mlir::failure();
284 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
286 propStorage = convertedAttr;
288 emitError() <<
"Invalid attribute `callee` in property conversion: " << attr;
289 return ::mlir::failure();
296 auto attr = dict.get(
"mapOpGroupSizes");
299 emitError() <<
"expected key entry for mapOpGroupSizes in DictionaryAttr to set "
301 return ::mlir::failure();
303 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
305 propStorage = convertedAttr;
307 emitError() <<
"Invalid attribute `mapOpGroupSizes` in property conversion: " << attr;
308 return ::mlir::failure();
315 auto attr = dict.get(
"numDimsPerMap");
318 emitError() <<
"expected key entry for numDimsPerMap in DictionaryAttr to set "
320 return ::mlir::failure();
322 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
324 propStorage = convertedAttr;
326 emitError() <<
"Invalid attribute `numDimsPerMap` in property conversion: " << attr;
327 return ::mlir::failure();
333 auto setFromAttr = [] (
auto &propStorage, ::mlir::Attribute propAttr,
334 ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
335 return convertFromAttribute(propStorage, propAttr, emitError);;
337 auto attr = dict.get(
"operandSegmentSizes");
if (!attr) attr = dict.get(
"operand_segment_sizes");;
339 emitError() <<
"expected key entry for operandSegmentSizes in DictionaryAttr to set "
341 return ::mlir::failure();
344 return ::mlir::failure();
346 return ::mlir::success();
350 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
351 ::mlir::Builder odsBuilder{ctx};
354 const auto &propStorage = prop.
callee;
356 attrs.push_back(odsBuilder.getNamedAttr(
"callee",
363 attrs.push_back(odsBuilder.getNamedAttr(
"mapOpGroupSizes",
370 attrs.push_back(odsBuilder.getNamedAttr(
"numDimsPerMap",
376 attrs.push_back(odsBuilder.getNamedAttr(
"operandSegmentSizes",
377 ::mlir::DenseI32ArrayAttr::get(ctx, propStorage)));
381 return odsBuilder.getDictionaryAttr(attrs);
386 auto hash_operandSegmentSizes = [] (
const auto &propStorage) -> llvm::hash_code {
387 return ::llvm::hash_combine_range(std::begin(propStorage), std::end(propStorage));;
389 return llvm::hash_combine(
390 llvm::hash_value(prop.
callee.getAsOpaquePointer()),
397 if (name ==
"callee")
400 if (name ==
"mapOpGroupSizes")
403 if (name ==
"numDimsPerMap")
405 if (name ==
"operand_segment_sizes" || name ==
"operandSegmentSizes") return ::mlir::DenseI32ArrayAttr::get(ctx, prop.
operandSegmentSizes);
410 if (name ==
"callee") {
411 prop.
callee = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
callee)>>(value);
415 if (name ==
"mapOpGroupSizes") {
420 if (name ==
"numDimsPerMap") {
424 if (name ==
"operand_segment_sizes" || name ==
"operandSegmentSizes") {
425 auto arrAttr = ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(value);
426 if (!arrAttr)
return;
440 attrs.append(
"operandSegmentSizes", ::mlir::DenseI32ArrayAttr::get(ctx, prop.
operandSegmentSizes));
443::mlir::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_Ops0(attr,
"callee", emitError)))
447 return ::mlir::failure();
452 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(attr,
"mapOpGroupSizes", emitError)))
453 return ::mlir::failure();
458 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(attr,
"numDimsPerMap", emitError)))
459 return ::mlir::failure();
461 return ::mlir::success();
465 auto &prop = state.getOrAddProperties<
Properties>(); (void)prop;
466 if (::mlir::failed(reader.readAttribute(prop.
callee)))
467 return ::mlir::failure();
470 return ::mlir::failure();
472 if (::mlir::failed(reader.readOptionalAttribute(prop.
numDimsPerMap)))
473 return ::mlir::failure();
475 if (reader.getBytecodeVersion() < 6) {
477 ::mlir::DenseI32ArrayAttr attr;
478 if (::mlir::failed(reader.readAttribute(attr))) return ::mlir::failure();
479 if (attr.size() >
static_cast<int64_t
>(
sizeof(propStorage) /
sizeof(int32_t))) {
480 reader.emitError(
"size mismatch for operand/result_segment_size");
481 return ::mlir::failure();
483 ::llvm::copy(::llvm::ArrayRef<int32_t>(attr), propStorage.begin());
488 auto readProp = [&]() {
490 if (reader.getBytecodeVersion() >= 6)
491 return reader.readSparseArray(::llvm::MutableArrayRef(propStorage));
493 return ::mlir::success();
495 if (::mlir::failed(readProp()))
496 return ::mlir::failure();
498 return ::mlir::success();
502 auto &prop = getProperties(); (void)prop;
503 writer.writeAttribute(prop.
callee);
508if (writer.getBytecodeVersion() < 6) {
510 writer.writeAttribute(::mlir::DenseI32ArrayAttr::get(this->getContext(), propStorage));
516 if (writer.getBytecodeVersion() >= 6)
517 writer.writeSparseArray(::llvm::ArrayRef(propStorage));
523 return ::llvm::cast<::mlir::SymbolRefAttr>(getProperties().callee);
532 return ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(getProperties().numDimsPerMap);
541 return ::llvm::cast<::mlir::DenseI32ArrayAttr>(getProperties().mapOpGroupSizes);
558 (*this)->setAttr(
getNumDimsPerMapAttrName(), ::mlir::Builder((*this)->getContext()).getDenseI32ArrayAttr(attrValue));
571 ::mlir::SymbolRefAttr::get(callee), argOperands);
575void 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) {
576 build(odsBuilder, odsState, resultTypes, callee, mapOperands,
577 odsBuilder.getDenseI32ArrayAttr(numDimsPerMap), argOperands);
581void CallOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState,
::llzk::function::FuncDefOp callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap, ::mlir::ValueRange argOperands) {
583 ::mlir::SymbolRefAttr::get(callee), mapOperands, numDimsPerMap, argOperands);
587void 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) {
588 build(odsBuilder, odsState, callee, mapOperands,
589 odsBuilder.getDenseI32ArrayAttr(numDimsPerMap), argOperands);
594 ::mlir::Builder odsBuilder(opName.getContext());
596 properties.
numDimsPerMap = odsBuilder.getDenseI32ArrayAttr({});
600 auto tblgen_callee = getProperties().callee; (void)tblgen_callee;
601 if (!tblgen_callee)
return emitOpError(
"requires attribute 'callee'");
602 auto tblgen_mapOpGroupSizes = getProperties().mapOpGroupSizes; (void)tblgen_mapOpGroupSizes;
603 if (!tblgen_mapOpGroupSizes)
return emitOpError(
"requires attribute 'mapOpGroupSizes'");
604 auto tblgen_numDimsPerMap = getProperties().numDimsPerMap; (void)tblgen_numDimsPerMap;
606 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops0(*
this, tblgen_callee,
"callee")))
607 return ::mlir::failure();
609 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(*
this, tblgen_numDimsPerMap,
"numDimsPerMap")))
610 return ::mlir::failure();
612 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(*
this, tblgen_mapOpGroupSizes,
"mapOpGroupSizes")))
613 return ::mlir::failure();
615 unsigned index = 0; (void)index;
618 for (
auto v : valueGroup0) {
619 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops0(*
this, v.getType(),
"operand", index++)))
620 return ::mlir::failure();
623 if (::mlir::failed(::mlir::OpTrait::impl::verifyValueSizeAttr(*
this,
"mapOpGroupSizes",
"mapOperands", valueGroup1.size())))
624 return ::mlir::failure();
626 for (
auto v : valueGroup1) {
627 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
628 return ::mlir::failure();
632 unsigned index = 0; (void)index;
635 for (
auto v : valueGroup0) {
636 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops0(*
this, v.getType(),
"result", index++)))
637 return ::mlir::failure();
640 return ::mlir::success();
647::mlir::ParseResult
CallOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
648 ::mlir::SymbolRefAttr calleeAttr;
649 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> argOperandsOperands;
650 ::llvm::SMLoc argOperandsOperandsLoc;
651 (void)argOperandsOperandsLoc;
652 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> mapOperandsOperands;
653 llvm::SmallVector<int32_t> mapOperandsOperandGroupSizes;
654 ::llvm::SMLoc mapOperandsOperandsLoc;
655 (void)mapOperandsOperandsLoc;
656 ::mlir::DenseI32ArrayAttr numDimsPerMapAttr;
657 ::llvm::ArrayRef<::mlir::Type> argOperandsTypes;
658 ::llvm::ArrayRef<::mlir::Type> allResultTypes;
660 if (parser.parseCustomAttributeWithFallback(calleeAttr, parser.getBuilder().getType<::mlir::NoneType>())) {
661 return ::mlir::failure();
664 if (parser.parseLParen())
665 return ::mlir::failure();
667 argOperandsOperandsLoc = parser.getCurrentLocation();
668 if (parser.parseOperandList(argOperandsOperands))
669 return ::mlir::failure();
670 if (parser.parseRParen())
671 return ::mlir::failure();
672 if (::mlir::succeeded(parser.parseOptionalLBrace())) {
674 mapOperandsOperandsLoc = parser.getCurrentLocation();
675 ::llvm::SmallVector<::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand>> mapOperandsOperandGroups;
677 if (odsResult) return ::mlir::failure();
678 for (
const auto &subRange : mapOperandsOperandGroups) {
679 mapOperandsOperands.append(subRange.begin(), subRange.end());
680 mapOperandsOperandGroupSizes.push_back(subRange.size());
682 if (numDimsPerMapAttr)
685 if (parser.parseRBrace())
686 return ::mlir::failure();
688 if (parser.parseColon())
689 return ::mlir::failure();
691 ::mlir::FunctionType argOperands__allResult_functionType;
692 if (parser.parseType(argOperands__allResult_functionType))
693 return ::mlir::failure();
694 argOperandsTypes = argOperands__allResult_functionType.getInputs();
695 allResultTypes = argOperands__allResult_functionType.getResults();
698 if (odsResult) return ::mlir::failure();
700::llvm::copy(::llvm::ArrayRef<int32_t>({
static_cast<int32_t
>(argOperandsOperands.size()),
static_cast<int32_t
>(mapOperandsOperands.size())}), result.getOrAddProperties<
CallOp::Properties>().operandSegmentSizes.begin());
701 result.getOrAddProperties<
CallOp::Properties>().mapOpGroupSizes = parser.getBuilder().getDenseI32ArrayAttr(mapOperandsOperandGroupSizes);
702 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIndexType();
703 result.addTypes(allResultTypes);
704 if (parser.resolveOperands(argOperandsOperands, argOperandsTypes, argOperandsOperandsLoc, result.operands))
705 return ::mlir::failure();
706 if (parser.resolveOperands(mapOperandsOperands, odsBuildableType0, mapOperandsOperandsLoc, result.operands))
707 return ::mlir::failure();
708 return ::mlir::success();
718 _odsPrinter <<
' ' <<
"{";
722 _odsPrinter <<
' ' <<
":";
724 _odsPrinter.printFunctionalType(
getArgOperands().getTypes(), getOperation()->getResultTypes());
756 auto attr = ::llvm::cast<::mlir::StringAttr>(
getProperties().sym_name);
762 return attr.getValue();
766 auto attr = ::llvm::cast<::mlir::TypeAttr>(
getProperties().function_type);
772 return ::llvm::cast<::mlir::FunctionType>(attr.getValue());
776 auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(
getProperties().arg_attrs);
782 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
786 auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(
getProperties().res_attrs);
792 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
809 if (!tblgen_function_type)
return emitError(loc,
"'function.def' op ""requires attribute 'function_type'");
812 if (!tblgen_sym_name)
return emitError(loc,
"'function.def' op ""requires attribute 'sym_name'");
814 if (tblgen_sym_name && !((::llvm::isa<::mlir::StringAttr>(tblgen_sym_name))))
815 return emitError(loc,
"'function.def' op ""attribute 'sym_name' failed to satisfy constraint: string attribute");
817 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())))))
818 return emitError(loc,
"'function.def' op ""attribute 'function_type' failed to satisfy constraint: type attribute of function type");
820 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))); }))))
821 return emitError(loc,
"'function.def' op ""attribute 'arg_attrs' failed to satisfy constraint: Array of dictionary attributes");
823 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))); }))))
824 return emitError(loc,
"'function.def' op ""attribute 'res_attrs' failed to satisfy constraint: Array of dictionary attributes");
825 return ::mlir::success();
834 return {std::next(getOperation()->operand_begin(), valueRange.first),
835 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
844 return {std::next(getOperation()->result_begin(), valueRange.first),
845 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
849 return (*this)->getRegion(0);
853 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
855 emitError() <<
"expected DictionaryAttr to set properties";
856 return ::mlir::failure();
861 auto attr = dict.get(
"arg_attrs");
864 emitError() <<
"expected key entry for arg_attrs in DictionaryAttr to set "
866 return ::mlir::failure();
868 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
870 propStorage = convertedAttr;
872 emitError() <<
"Invalid attribute `arg_attrs` in property conversion: " << attr;
873 return ::mlir::failure();
880 auto attr = dict.get(
"function_type");
883 emitError() <<
"expected key entry for function_type in DictionaryAttr to set "
885 return ::mlir::failure();
887 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
889 propStorage = convertedAttr;
891 emitError() <<
"Invalid attribute `function_type` in property conversion: " << attr;
892 return ::mlir::failure();
899 auto attr = dict.get(
"res_attrs");
902 emitError() <<
"expected key entry for res_attrs in DictionaryAttr to set "
904 return ::mlir::failure();
906 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
908 propStorage = convertedAttr;
910 emitError() <<
"Invalid attribute `res_attrs` in property conversion: " << attr;
911 return ::mlir::failure();
918 auto attr = dict.get(
"sym_name");
921 emitError() <<
"expected key entry for sym_name in DictionaryAttr to set "
923 return ::mlir::failure();
925 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
927 propStorage = convertedAttr;
929 emitError() <<
"Invalid attribute `sym_name` in property conversion: " << attr;
930 return ::mlir::failure();
934 return ::mlir::success();
938 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
939 ::mlir::Builder odsBuilder{ctx};
942 const auto &propStorage = prop.
arg_attrs;
944 attrs.push_back(odsBuilder.getNamedAttr(
"arg_attrs",
951 attrs.push_back(odsBuilder.getNamedAttr(
"function_type",
956 const auto &propStorage = prop.
res_attrs;
958 attrs.push_back(odsBuilder.getNamedAttr(
"res_attrs",
963 const auto &propStorage = prop.
sym_name;
965 attrs.push_back(odsBuilder.getNamedAttr(
"sym_name",
970 return odsBuilder.getDictionaryAttr(attrs);
975 return llvm::hash_combine(
976 llvm::hash_value(prop.
arg_attrs.getAsOpaquePointer()),
978 llvm::hash_value(prop.
res_attrs.getAsOpaquePointer()),
979 llvm::hash_value(prop.
sym_name.getAsOpaquePointer()));
983 if (name ==
"arg_attrs")
986 if (name ==
"function_type")
989 if (name ==
"res_attrs")
992 if (name ==
"sym_name")
998 if (name ==
"arg_attrs") {
999 prop.
arg_attrs = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
arg_attrs)>>(value);
1003 if (name ==
"function_type") {
1008 if (name ==
"res_attrs") {
1009 prop.
res_attrs = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
res_attrs)>>(value);
1013 if (name ==
"sym_name") {
1014 prop.
sym_name = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
sym_name)>>(value);
1029::mlir::LogicalResult
FuncDefOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
1032 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops4(attr,
"arg_attrs", emitError)))
1033 return ::mlir::failure();
1038 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops3(attr,
"function_type", emitError)))
1039 return ::mlir::failure();
1044 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops4(attr,
"res_attrs", emitError)))
1045 return ::mlir::failure();
1050 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(attr,
"sym_name", emitError)))
1051 return ::mlir::failure();
1053 return ::mlir::success();
1057 auto &prop = state.getOrAddProperties<
Properties>(); (void)prop;
1058 if (::mlir::failed(reader.readOptionalAttribute(prop.
arg_attrs)))
1059 return ::mlir::failure();
1061 if (::mlir::failed(reader.readAttribute(prop.
function_type)))
1062 return ::mlir::failure();
1064 if (::mlir::failed(reader.readOptionalAttribute(prop.
res_attrs)))
1065 return ::mlir::failure();
1067 if (::mlir::failed(reader.readAttribute(prop.
sym_name)))
1068 return ::mlir::failure();
1069 return ::mlir::success();
1073 auto &prop = getProperties(); (void)prop;
1075 writer.writeOptionalAttribute(prop.
arg_attrs);
1078 writer.writeOptionalAttribute(prop.
res_attrs);
1079 writer.writeAttribute(prop.
sym_name);
1083 return ::llvm::cast<::mlir::StringAttr>(getProperties().sym_name);
1088 return attr.getValue();
1092 return ::llvm::cast<::mlir::TypeAttr>(getProperties().function_type);
1097 return ::llvm::cast<::mlir::FunctionType>(attr.getValue());
1101 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().arg_attrs);
1106 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
1110 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().res_attrs);
1115 return attr ? ::std::optional< ::mlir::ArrayAttr >(attr) : (::std::nullopt);
1123 (*this)->setAttr(
getSymNameAttrName(), ::mlir::Builder((*this)->getContext()).getStringAttr(attrValue));
1143 auto &attr = getProperties().arg_attrs;
1149 auto &attr = getProperties().res_attrs;
1154void FuncDefOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, ::mlir::TypeAttr function_type, ::mlir::ArrayAttr arg_attrs, ::mlir::ArrayAttr res_attrs) {
1155 odsState.getOrAddProperties<
Properties>().sym_name = sym_name;
1156 odsState.getOrAddProperties<
Properties>().function_type = function_type;
1158 odsState.getOrAddProperties<
Properties>().arg_attrs = arg_attrs;
1161 odsState.getOrAddProperties<
Properties>().res_attrs = res_attrs;
1163 (void)odsState.addRegion();
1166void 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) {
1167 odsState.getOrAddProperties<
Properties>().sym_name = sym_name;
1168 odsState.getOrAddProperties<
Properties>().function_type = function_type;
1170 odsState.getOrAddProperties<
Properties>().arg_attrs = arg_attrs;
1173 odsState.getOrAddProperties<
Properties>().res_attrs = res_attrs;
1175 (void)odsState.addRegion();
1176 assert(resultTypes.size() == 0u &&
"mismatched number of results");
1177 odsState.addTypes(resultTypes);
1180void FuncDefOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name, ::mlir::FunctionType function_type, ::mlir::ArrayAttr arg_attrs, ::mlir::ArrayAttr res_attrs) {
1181 odsState.getOrAddProperties<
Properties>().sym_name = odsBuilder.getStringAttr(sym_name);
1182 odsState.getOrAddProperties<
Properties>().function_type = ::mlir::TypeAttr::get(function_type);
1184 odsState.getOrAddProperties<
Properties>().arg_attrs = arg_attrs;
1187 odsState.getOrAddProperties<
Properties>().res_attrs = res_attrs;
1189 (void)odsState.addRegion();
1192void 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) {
1193 odsState.getOrAddProperties<
Properties>().sym_name = odsBuilder.getStringAttr(sym_name);
1194 odsState.getOrAddProperties<
Properties>().function_type = ::mlir::TypeAttr::get(function_type);
1196 odsState.getOrAddProperties<
Properties>().arg_attrs = arg_attrs;
1199 odsState.getOrAddProperties<
Properties>().res_attrs = res_attrs;
1201 (void)odsState.addRegion();
1202 assert(resultTypes.size() == 0u &&
"mismatched number of results");
1203 odsState.addTypes(resultTypes);
1206void FuncDefOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1207 assert(operands.size() == 0u &&
"mismatched number of parameters");
1208 odsState.addOperands(operands);
1209 odsState.addAttributes(attributes);
1210 for (
unsigned i = 0; i != 1; ++i)
1211 (
void)odsState.addRegion();
1212 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
1213 odsState.addTypes(resultTypes);
1217 auto tblgen_arg_attrs = getProperties().arg_attrs; (void)tblgen_arg_attrs;
1218 auto tblgen_function_type = getProperties().function_type; (void)tblgen_function_type;
1219 if (!tblgen_function_type)
return emitOpError(
"requires attribute 'function_type'");
1220 auto tblgen_res_attrs = getProperties().res_attrs; (void)tblgen_res_attrs;
1221 auto tblgen_sym_name = getProperties().sym_name; (void)tblgen_sym_name;
1222 if (!tblgen_sym_name)
return emitOpError(
"requires attribute 'sym_name'");
1224 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(*
this, tblgen_sym_name,
"sym_name")))
1225 return ::mlir::failure();
1227 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops3(*
this, tblgen_function_type,
"function_type")))
1228 return ::mlir::failure();
1230 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops4(*
this, tblgen_arg_attrs,
"arg_attrs")))
1231 return ::mlir::failure();
1233 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops4(*
this, tblgen_res_attrs,
"res_attrs")))
1234 return ::mlir::failure();
1236 unsigned index = 0; (void)index;
1238 for (
auto ®ion : ::llvm::MutableArrayRef((*this)->getRegion(0)))
1239 if (::mlir::failed(__mlir_ods_local_region_constraint_Ops0(*
this, region,
"body", index++)))
1240 return ::mlir::failure();
1242 return ::mlir::success();
1247 return ::mlir::success();
1248 return ::mlir::failure();
1270 bool isVariadic[] = {
true};
1271 int prevVariadicCount = 0;
1272 for (
unsigned i = 0; i < index; ++i)
1273 if (isVariadic[i]) ++prevVariadicCount;
1277 int variadicSize = (odsOperandsSize - 0) / 1;
1282 int start = index + (variadicSize - 1) * prevVariadicCount;
1283 int size = isVariadic[index] ? variadicSize : 1;
1284 return {start, size};
1295 return ::mlir::success();
1299 bool isVariadic[] = {
true};
1300 int prevVariadicCount = 0;
1301 for (
unsigned i = 0; i < index; ++i)
1302 if (isVariadic[i]) ++prevVariadicCount;
1306 int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
1311 int start = index + (variadicSize - 1) * prevVariadicCount;
1312 int size = isVariadic[index] ? variadicSize : 1;
1313 return {start, size};
1318 return {std::next(getOperation()->operand_begin(), valueRange.first),
1319 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1328 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
1329 return mutableRange;
1338 return {std::next(getOperation()->result_begin(), valueRange.first),
1339 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1343 build(odsBuilder, odsState, std::nullopt);
1347void ReturnOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands) {
1348 odsState.addOperands(operands);
1351void ReturnOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
1352 odsState.addOperands(operands);
1353 odsState.addAttributes(attributes);
1354 assert(resultTypes.size() == 0u &&
"mismatched number of return types");
1355 odsState.addTypes(resultTypes);
1360 unsigned index = 0; (void)index;
1363 for (
auto v : valueGroup0) {
1364 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops0(*
this, v.getType(),
"operand", index++)))
1365 return ::mlir::failure();
1368 return ::mlir::success();
1373 return ::mlir::success();
1374 return ::mlir::failure();
1377::mlir::ParseResult
ReturnOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
1378 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> operandsOperands;
1379 ::llvm::SMLoc operandsOperandsLoc;
1380 (void)operandsOperandsLoc;
1381 ::llvm::SmallVector<::mlir::Type, 1> operandsTypes;
1383 auto loc = parser.getCurrentLocation();(void)loc;
1384 if (parser.parseOptionalAttrDict(result.attributes))
1385 return ::mlir::failure();
1388 operandsOperandsLoc = parser.getCurrentLocation();
1389 if (parser.parseOperandList(operandsOperands))
1390 return ::mlir::failure();
1391 if (!operandsOperands.empty()) {
1392 if (parser.parseColon())
1393 return ::mlir::failure();
1395 if (parser.parseTypeList(operandsTypes))
1396 return ::mlir::failure();
1398 if (parser.resolveOperands(operandsOperands, operandsTypes, operandsOperandsLoc, result.operands))
1399 return ::mlir::failure();
1400 return ::mlir::success();
1404 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
1405 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
1409 _odsPrinter <<
' ' <<
":";
1415void ReturnOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
1419 ::mlir::RegionBranchPoint point) {
1420 return ::mlir::MutableOperandRange(*
this);
::mlir::LogicalResult verify(::mlir::Location loc)
CallOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties={}, ::mlir::RegionRange regions={})
::mlir::ValueRange getOperands()
::mlir::OperandRangeRange getMapOperands()
void setNumDimsPerMap(::llvm::ArrayRef< int32_t > attrValue)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
static llvm::hash_code computePropertiesHash(const Properties &prop)
::mlir::LogicalResult verifyInvariants()
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)
void setMapOpGroupSizesAttr(::mlir::DenseI32ArrayAttr attr)
::mlir::LogicalResult verifyInvariantsImpl()
::mlir::Operation::result_range getODSResults(unsigned index)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
void setMapOpGroupSizes(::llvm::ArrayRef< int32_t > attrValue)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::SymbolRefAttr callee, ::mlir::ValueRange argOperands={})
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::mlir::MutableOperandRange getArgOperandsMutable()
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
::mlir::StringAttr getMapOpGroupSizesAttrName()
::mlir::SymbolRefAttr getCalleeAttr()
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
void print(::mlir::OpAsmPrinter &_odsPrinter)
FoldAdaptor::Properties Properties
void setCalleeAttr(::mlir::SymbolRefAttr attr)
void setNumDimsPerMapAttr(::mlir::DenseI32ArrayAttr attr)
::mlir::StringAttr getNumDimsPerMapAttrName()
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::mlir::MutableOperandRangeRange getMapOperandsMutable()
::mlir::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::StringAttr getCalleeAttrName()
::mlir::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
::mlir::Operation::operand_range getArgOperands()
::mlir::Operation::operand_range getODSOperands(unsigned index)
FuncDefOpAdaptor(FuncDefOp op)
::mlir::LogicalResult verify(::mlir::Location loc)
FuncDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
::mlir::ValueRange getOperands()
::mlir::ArrayAttr getArgAttrsAttr()
::mlir::Operation::operand_range getODSOperands(unsigned index)
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()
void setArgAttrsAttr(::mlir::ArrayAttr attr)
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::Attribute removeArgAttrsAttr()
::mlir::StringAttr getSymNameAttr()
void setSymNameAttr(::mlir::StringAttr attr)
::mlir::StringAttr getFunctionTypeAttrName()
::mlir::TypeAttr getFunctionTypeAttr()
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::mlir::LogicalResult verifyInvariants()
::mlir::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::Operation::result_range getODSResults(unsigned index)
void setResAttrsAttr(::mlir::ArrayAttr attr)
::mlir::StringAttr getResAttrsAttrName()
::std::optional< ::mlir::ArrayAttr > getResAttrs()
::std::optional< ::mlir::ArrayAttr > getArgAttrs()
::mlir::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
::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()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::mlir::LogicalResult verifyInvariantsImpl()
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
::mlir::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::Attribute removeResAttrsAttr()
void setFunctionType(::mlir::FunctionType attrValue)
void setSymName(::llvm::StringRef attrValue)
::mlir::Region & getBody()
::mlir::ArrayAttr getResAttrsAttr()
::mlir::LogicalResult verify()
void setFunctionTypeAttr(::mlir::TypeAttr attr)
::mlir::StringAttr getArgAttrsAttrName()
::mlir::LogicalResult verify(::mlir::Location loc)
ReturnOpAdaptor(ReturnOp op)
ReturnOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::mlir::ValueRange getOperands()
void print(::mlir::OpAsmPrinter &_odsPrinter)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::mlir::LogicalResult verifyInvariants()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState)
::mlir::MutableOperandRange getMutableSuccessorOperands(::mlir::RegionBranchPoint point)
::mlir::Operation::operand_range getODSOperands(unsigned index)
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::mlir::LogicalResult verify()
::mlir::LogicalResult verifyInvariantsImpl()
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::Operation::operand_range getOperands()
::mlir::MutableOperandRange getOperandsMutable()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::SymbolRefAttr getCallee()
::mlir::DictionaryAttr odsAttrs
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
::std::optional<::mlir::OperationName > odsOpName
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::SymbolRefAttr getCalleeAttr()
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
::mlir::RegionRange odsRegions
const Properties & getProperties()
CallOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties={}, ::mlir::RegionRange regions={})
::mlir::DictionaryAttr getAttributes()
::std::optional< ::mlir::ArrayAttr > getResAttrs()
::std::optional< ::mlir::ArrayAttr > getArgAttrs()
::mlir::TypeAttr getFunctionTypeAttr()
FuncDefOpGenericAdaptorBase(::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::DictionaryAttr odsAttrs
::mlir::ArrayAttr getResAttrsAttr()
const Properties & getProperties()
::mlir::StringAttr getSymNameAttr()
::mlir::FunctionType getFunctionType()
::std::optional<::mlir::OperationName > odsOpName
::mlir::Region & getBody()
::mlir::RegionRange getRegions()
::mlir::DictionaryAttr getAttributes()
::llvm::StringRef getSymName()
::mlir::RegionRange odsRegions
::mlir::ArrayAttr getArgAttrsAttr()
::mlir::DictionaryAttr odsAttrs
::std::optional<::mlir::OperationName > odsOpName
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::RegionRange odsRegions
ReturnOpGenericAdaptorBase(::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::mlir::DictionaryAttr getAttributes()
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 parseMultiDimAndSymbolList(mlir::OpAsmParser &parser, mlir::SmallVector< mlir::SmallVector< mlir::OpAsmParser::UnresolvedOperand > > &multiMapOperands, mlir::DenseI32ArrayAttr &numDimsPerMap)
operandSegmentSizesTy operandSegmentSizes
numDimsPerMapTy numDimsPerMap
mapOpGroupSizesTy mapOpGroupSizes
function_typeTy function_type