29static ::llvm::LogicalResult __mlir_ods_local_type_constraint_Ops1(
30 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
31 unsigned valueIndex) {
32 if (!((::llvm::isa<::mlir::IndexType>(type)))) {
33 return op->emitOpError(valueKind) <<
" #" << valueIndex
34 <<
" must be variadic of index, 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 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) {
53 return op->emitOpError(valueKind) <<
" #" << valueIndex
54 <<
" must be integral, felt, or typevar type, 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::AffineMapAttr>(attr))))
72 return emitError() <<
"attribute '" << attrName
73 <<
"' failed to satisfy constraint: AffineMap 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::IntegerAttr>(attr))) && ((::llvm::isa<::mlir::IndexType>(::llvm::cast<::mlir::IntegerAttr>(attr).getType())))))
86 return emitError() <<
"attribute '" << attrName
87 <<
"' failed to satisfy constraint: index 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();
123 bool isVariadic[] = {
true};
124 int prevVariadicCount = 0;
125 for (
unsigned i = 0; i < index; ++i)
126 if (isVariadic[i]) ++prevVariadicCount;
130 int variadicSize = (odsOperandsSize - 0) / 1;
135 int start = index + (variadicSize - 1) * prevVariadicCount;
136 int size = isVariadic[index] ? variadicSize : 1;
137 return {start, size};
142 return attr.getValue();
147 return attr.getValue();
155 if (!tblgen_map)
return emitError(loc,
"'poly.applymap' op ""requires attribute 'map'");
157 if (!tblgen_numDims)
return emitError(loc,
"'poly.applymap' op ""requires attribute 'numDims'");
159 if (tblgen_map && !((::llvm::isa<::mlir::AffineMapAttr>(tblgen_map))))
160 return emitError(loc,
"'poly.applymap' op ""attribute 'map' failed to satisfy constraint: AffineMap attribute");
162 if (tblgen_numDims && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_numDims))) && ((::llvm::isa<::mlir::IndexType>(::llvm::cast<::mlir::IntegerAttr>(tblgen_numDims).getType())))))
163 return emitError(loc,
"'poly.applymap' op ""attribute 'numDims' failed to satisfy constraint: index attribute");
164 return ::mlir::success();
168 bool isVariadic[] = {
true};
169 int prevVariadicCount = 0;
170 for (
unsigned i = 0; i < index; ++i)
171 if (isVariadic[i]) ++prevVariadicCount;
175 int variadicSize = (getOperation()->getNumOperands() - 0) / 1;
180 int start = index + (variadicSize - 1) * prevVariadicCount;
181 int size = isVariadic[index] ? variadicSize : 1;
182 return {start, size};
187 auto mutableRange = ::mlir::MutableOperandRange(getOperation(), range.first, range.second);
192 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
194 emitError() <<
"expected DictionaryAttr to set properties";
195 return ::mlir::failure();
199 auto &propStorage = prop.
map;
200 auto attr = dict.get(
"map");
202 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
204 propStorage = convertedAttr;
206 emitError() <<
"Invalid attribute `map` in property conversion: " << attr;
207 return ::mlir::failure();
213 auto &propStorage = prop.
numDims;
214 auto attr = dict.get(
"numDims");
216 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
218 propStorage = convertedAttr;
220 emitError() <<
"Invalid attribute `numDims` in property conversion: " << attr;
221 return ::mlir::failure();
225 return ::mlir::success();
229 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
230 ::mlir::Builder odsBuilder{ctx};
233 const auto &propStorage = prop.
map;
235 attrs.push_back(odsBuilder.getNamedAttr(
"map",
240 const auto &propStorage = prop.
numDims;
242 attrs.push_back(odsBuilder.getNamedAttr(
"numDims",
247 return odsBuilder.getDictionaryAttr(attrs);
252 return llvm::hash_combine(
253 llvm::hash_value(prop.
map.getAsOpaquePointer()),
254 llvm::hash_value(prop.
numDims.getAsOpaquePointer()));
261 if (
name ==
"numDims")
268 prop.
map = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
map)>>(value);
272 if (
name ==
"numDims") {
273 prop.
numDims = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
numDims)>>(value);
279 if (prop.
map) attrs.append(
"map", prop.
map);
284::llvm::LogicalResult
ApplyMapOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
287 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(attr,
"map", emitError)))
288 return ::mlir::failure();
293 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(attr,
"numDims", emitError)))
294 return ::mlir::failure();
296 return ::mlir::success();
300 auto &prop = state.getOrAddProperties<
Properties>(); (void)prop;
301 if (::mlir::failed(reader.readAttribute(prop.
map)))
302 return ::mlir::failure();
304 if (::mlir::failed(reader.readAttribute(prop.
numDims)))
305 return ::mlir::failure();
306 return ::mlir::success();
310 auto &prop = getProperties(); (void)prop;
311 writer.writeAttribute(prop.
map);
312 writer.writeAttribute(prop.
numDims);
317 return attr.getValue();
322 return attr.getValue();
326 getProperties().map = ::mlir::AffineMapAttr::get(attrValue);
330 getProperties().numDims = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIndexType(), attrValue);
333void ApplyMapOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::AffineMapAttr map, ::mlir::ValueRange mapOperands) {
334 odsState.addOperands(mapOperands);
337 props.
setNumDims(odsBuilder.getIntegerAttr(odsBuilder.getIndexType(),
338 map.getAffineMap().getNumDims()));
339 odsState.addTypes(odsBuilder.getIndexType());
343void ApplyMapOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::AffineMap map, ::mlir::ValueRange mapOperands) {
344 build(odsBuilder, odsState, ::mlir::AffineMapAttr::get(map), mapOperands);
348void ApplyMapOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::AffineExpr expr, ::mlir::ValueRange mapOperands) {
349 auto map = ::mlir::AffineMap::inferFromExprList({expr}, odsBuilder.getContext()).front();
350 build(odsBuilder, odsState, map, mapOperands);
355 auto tblgen_map = getProperties().map; (void)tblgen_map;
356 if (!tblgen_map)
return emitOpError(
"requires attribute 'map'");
357 auto tblgen_numDims = getProperties().numDims; (void)tblgen_numDims;
358 if (!tblgen_numDims)
return emitOpError(
"requires attribute 'numDims'");
360 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops1(*
this, tblgen_map,
"map")))
361 return ::mlir::failure();
363 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops2(*
this, tblgen_numDims,
"numDims")))
364 return ::mlir::failure();
366 unsigned index = 0; (void)index;
369 for (
auto v : valueGroup0) {
370 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops1(*
this, v.getType(),
"operand", index++)))
371 return ::mlir::failure();
375 unsigned index = 0; (void)index;
378 for (
auto v : valueGroup0) {
379 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops2(*
this, v.getType(),
"result", index++)))
380 return ::mlir::failure();
383 return ::mlir::success();
388 return ::mlir::success();
389 return ::mlir::failure();
392::mlir::ParseResult
ApplyMapOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
393 ::llvm::SmallVector<::mlir::OpAsmParser::UnresolvedOperand, 4> mapOperandsOperands;
394 ::llvm::SMLoc mapOperandsOperandsLoc;
395 (void)mapOperandsOperandsLoc;
396 ::mlir::IntegerAttr numDimsAttr;
397 ::mlir::AffineMapAttr mapAttr;
399 mapOperandsOperandsLoc = parser.getCurrentLocation();
401 if (odsResult) return ::mlir::failure();
405 if (parser.parseCustomAttributeWithFallback(mapAttr, parser.getBuilder().getIndexType())) {
406 return ::mlir::failure();
410 auto loc = parser.getCurrentLocation();(void)loc;
411 if (parser.parseOptionalAttrDict(result.attributes))
412 return ::mlir::failure();
414 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
416 return ::mlir::failure();
418 ::mlir::Type odsBuildableType0 = parser.getBuilder().getIndexType();
419 result.addTypes(odsBuildableType0);
420 if (parser.resolveOperands(mapOperandsOperands, odsBuildableType0, mapOperandsOperandsLoc, result.operands))
421 return ::mlir::failure();
422 return ::mlir::success();
429 _odsPrinter.printAttributeWithoutType(
getMapAttr());
430 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
431 elidedAttrs.push_back(
"numDims");
432 elidedAttrs.push_back(
"map");
433 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
436void ApplyMapOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
444namespace polymorphic {
455 return attr.getValue();
463 if (!tblgen_const_name)
return emitError(loc,
"'poly.read_const' op ""requires attribute 'const_name'");
465 if (tblgen_const_name && !((::llvm::isa<::mlir::FlatSymbolRefAttr>(tblgen_const_name))))
466 return emitError(loc,
"'poly.read_const' op ""attribute 'const_name' failed to satisfy constraint: flat symbol reference attribute");
467 return ::mlir::success();
471 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
473 emitError() <<
"expected DictionaryAttr to set properties";
474 return ::mlir::failure();
479 auto attr = dict.get(
"const_name");
481 auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<
decltype(propStorage)>>(attr);
483 propStorage = convertedAttr;
485 emitError() <<
"Invalid attribute `const_name` in property conversion: " << attr;
486 return ::mlir::failure();
490 return ::mlir::success();
494 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
495 ::mlir::Builder odsBuilder{ctx};
500 attrs.push_back(odsBuilder.getNamedAttr(
"const_name",
505 return odsBuilder.getDictionaryAttr(attrs);
510 return llvm::hash_combine(
511 llvm::hash_value(prop.
const_name.getAsOpaquePointer()));
515 if (
name ==
"const_name")
521 if (
name ==
"const_name") {
522 prop.
const_name = ::llvm::dyn_cast_or_null<std::remove_reference_t<
decltype(prop.
const_name)>>(value);
531::llvm::LogicalResult
ConstReadOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
534 if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_Ops3(attr,
"const_name", emitError)))
535 return ::mlir::failure();
537 return ::mlir::success();
541 auto &prop = state.getOrAddProperties<
Properties>(); (void)prop;
542 if (::mlir::failed(reader.readAttribute(prop.
const_name)))
543 return ::mlir::failure();
544 return ::mlir::success();
548 auto &prop = getProperties(); (void)prop;
554 return attr.getValue();
558 getProperties().const_name = ::mlir::SymbolRefAttr::get(::mlir::Builder((*this)->getContext()).getContext(), attrValue);
561void ConstReadOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type val, ::mlir::FlatSymbolRefAttr const_name) {
562 odsState.getOrAddProperties<
Properties>().const_name = const_name;
563 odsState.addTypes(val);
566void ConstReadOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::FlatSymbolRefAttr const_name) {
567 odsState.getOrAddProperties<
Properties>().const_name = const_name;
568 assert(resultTypes.size() == 1u &&
"mismatched number of results");
569 odsState.addTypes(resultTypes);
572void ConstReadOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type val, ::llvm::StringRef const_name) {
573 odsState.getOrAddProperties<
Properties>().const_name = ::mlir::SymbolRefAttr::get(odsBuilder.getContext(), const_name);
574 odsState.addTypes(val);
577void ConstReadOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llvm::StringRef const_name) {
578 odsState.getOrAddProperties<
Properties>().const_name = ::mlir::SymbolRefAttr::get(odsBuilder.getContext(), const_name);
579 assert(resultTypes.size() == 1u &&
"mismatched number of results");
580 odsState.addTypes(resultTypes);
583void ConstReadOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
584 assert(operands.size() == 0u &&
"mismatched number of parameters");
585 odsState.addOperands(operands);
586 odsState.addAttributes(attributes);
587 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
588 odsState.addTypes(resultTypes);
590 if (!attributes.empty()) {
591 ::mlir::OpaqueProperties properties =
593 std::optional<::mlir::RegisteredOperationName> info =
594 odsState.name.getRegisteredInfo();
595 if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
596 odsState.attributes.getDictionary(odsState.getContext()),
nullptr)))
597 ::llvm::report_fatal_error(
"Property conversion failed.");
602 auto tblgen_const_name = getProperties().const_name; (void)tblgen_const_name;
603 if (!tblgen_const_name)
return emitOpError(
"requires attribute 'const_name'");
605 if (::mlir::failed(__mlir_ods_local_attr_constraint_Ops3(*
this, tblgen_const_name,
"const_name")))
606 return ::mlir::failure();
608 unsigned index = 0; (void)index;
611 for (
auto v : valueGroup0) {
612 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops3(*
this, v.getType(),
"result", index++)))
613 return ::mlir::failure();
616 return ::mlir::success();
624 ::mlir::FlatSymbolRefAttr const_nameAttr;
625 ::mlir::Type valRawType{};
626 ::llvm::ArrayRef<::mlir::Type> valTypes(&valRawType, 1);
628 if (parser.parseCustomAttributeWithFallback(const_nameAttr, parser.getBuilder().getType<::mlir::NoneType>())) {
629 return ::mlir::failure();
632 if (parser.parseColon())
633 return ::mlir::failure();
637 if (parser.parseCustomTypeWithFallback(type))
638 return ::mlir::failure();
642 auto loc = parser.getCurrentLocation();(void)loc;
643 if (parser.parseOptionalAttrDict(result.attributes))
644 return ::mlir::failure();
646 return parser.emitError(loc) <<
"'" << result.name.getStringRef() <<
"' op ";
648 return ::mlir::failure();
650 result.addTypes(valTypes);
651 return ::mlir::success();
657 _odsPrinter <<
' ' <<
":";
660 auto type =
getVal().getType();
661 if (
auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
662 _odsPrinter.printStrippedAttrOrType(validType);
666 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
667 elidedAttrs.push_back(
"const_name");
668 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
676namespace polymorphic {
687 return ::mlir::success();
690void UnifiableCastOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input) {
691 odsState.addOperands(input);
692 odsState.addTypes(result);
695void UnifiableCastOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value input) {
696 odsState.addOperands(input);
697 assert(resultTypes.size() == 1u &&
"mismatched number of results");
698 odsState.addTypes(resultTypes);
701void UnifiableCastOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
702 assert(operands.size() == 1u &&
"mismatched number of parameters");
703 odsState.addOperands(operands);
704 odsState.addAttributes(attributes);
705 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
706 odsState.addTypes(resultTypes);
711 unsigned index = 0; (void)index;
714 for (
auto v : valueGroup0) {
715 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops4(*
this, v.getType(),
"operand", index++)))
716 return ::mlir::failure();
720 unsigned index = 0; (void)index;
723 for (
auto v : valueGroup0) {
724 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops4(*
this, v.getType(),
"result", index++)))
725 return ::mlir::failure();
728 return ::mlir::success();
733 return ::mlir::success();
734 return ::mlir::failure();
738 ::mlir::OpAsmParser::UnresolvedOperand inputRawOperand{};
739 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> inputOperands(&inputRawOperand, 1); ::llvm::SMLoc inputOperandsLoc;
740 (void)inputOperandsLoc;
741 ::llvm::ArrayRef<::mlir::Type> inputTypes;
742 ::llvm::ArrayRef<::mlir::Type> allResultTypes;
744 inputOperandsLoc = parser.getCurrentLocation();
745 if (parser.parseOperand(inputRawOperand))
746 return ::mlir::failure();
747 if (parser.parseColon())
748 return ::mlir::failure();
750 ::mlir::FunctionType input__allResult_functionType;
751 if (parser.parseType(input__allResult_functionType))
752 return ::mlir::failure();
753 inputTypes = input__allResult_functionType.getInputs();
754 allResultTypes = input__allResult_functionType.getResults();
756 auto loc = parser.getCurrentLocation();(void)loc;
757 if (parser.parseOptionalAttrDict(result.attributes))
758 return ::mlir::failure();
760 result.addTypes(allResultTypes);
761 if (parser.resolveOperands(inputOperands, inputTypes, inputOperandsLoc, result.operands))
762 return ::mlir::failure();
763 return ::mlir::success();
769 _odsPrinter <<
' ' <<
":";
771 _odsPrinter.printFunctionalType(::llvm::ArrayRef<::mlir::Type>(
getInput().getType()), getOperation()->getResultTypes());
772 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
773 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
ApplyMapOpAdaptor(ApplyMapOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
ApplyMapOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::ValueRange getOperands()
::mlir::AffineMapAttr getMapAttr()
::mlir::IntegerAttr getNumDimsAttr()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::mlir::Operation::result_range getODSResults(unsigned index)
::llvm::APInt getNumDims()
::mlir::Operation::operand_range getMapOperands()
::llvm::LogicalResult verify()
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::llvm::LogicalResult verifyInvariants()
static llvm::hash_code computePropertiesHash(const Properties &prop)
FoldAdaptor::Properties Properties
::mlir::Operation::operand_range getODSOperands(unsigned index)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::AffineMapAttr map, ::mlir::ValueRange mapOperands={})
::mlir::StringAttr getMapAttrName()
::mlir::AffineMap getMap()
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
void setMap(::mlir::AffineMap attrValue)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::mlir::StringAttr getNumDimsAttrName()
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::MutableOperandRange getMapOperandsMutable()
::llvm::LogicalResult verifyInvariantsImpl()
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
void setNumDims(::llvm::APInt attrValue)
::llvm::LogicalResult verify(::mlir::Location loc)
ConstReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
ConstReadOpAdaptor(ConstReadOp op)
::mlir::ValueRange getOperands()
void writeProperties(::mlir::DialectBytecodeWriter &writer)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
void print(::mlir::OpAsmPrinter &_odsPrinter)
FoldAdaptor::Properties Properties
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::TypedValue<::mlir::Type > getVal()
::mlir::StringAttr getConstNameAttrName()
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::mlir::Operation::result_range getODSResults(unsigned index)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static llvm::hash_code computePropertiesHash(const Properties &prop)
void setConstName(::llvm::StringRef attrValue)
::llvm::LogicalResult verifyInvariantsImpl()
::mlir::FlatSymbolRefAttr getConstNameAttr()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type val, ::mlir::FlatSymbolRefAttr const_name)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
::llvm::LogicalResult verifyInvariants()
::llvm::StringRef getConstName()
UnifiableCastOpAdaptor(UnifiableCastOp op)
UnifiableCastOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
::mlir::ValueRange getOperands()
::llvm::LogicalResult verify()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::mlir::Operation::operand_range getODSOperands(unsigned index)
::mlir::TypedValue<::mlir::Type > getInput()
::llvm::LogicalResult verifyInvariantsImpl()
::llvm::LogicalResult verifyInvariants()
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
void print(::mlir::OpAsmPrinter &_odsPrinter)
const Properties & getProperties()
::mlir::AffineMap getMap()
::mlir::IntegerAttr getNumDimsAttr()
ApplyMapOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::DictionaryAttr odsAttrs
::mlir::AffineMapAttr getMapAttr()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::llvm::APInt getNumDims()
::mlir::RegionRange odsRegions
::std::optional<::mlir::OperationName > odsOpName
const Properties & getProperties()
::mlir::FlatSymbolRefAttr getConstNameAttr()
ConstReadOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::std::optional<::mlir::OperationName > odsOpName
::mlir::RegionRange odsRegions
::llvm::StringRef getConstName()
::mlir::DictionaryAttr odsAttrs
void printDimAndSymbolList(mlir::OpAsmPrinter &printer, mlir::Operation *op, mlir::OperandRange mapOperands, mlir::IntegerAttr numDims)
bool isValidType(Type type)
mlir::ParseResult parseDimAndSymbolList(mlir::OpAsmParser &parser, mlir::SmallVector< mlir::OpAsmParser::UnresolvedOperand, N > &mapOperands, mlir::IntegerAttr &numDims)
bool isValidConstReadType(Type type)
void setMap(const ::mlir::AffineMapAttr &propValue)
void setNumDims(const ::mlir::IntegerAttr &propValue)