145 auto &propStorage = this->arg_attrs;
146 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage);
149 this->arg_attrs = propValue;
155 auto &propStorage = this->callee;
156 return ::llvm::cast<::mlir::SymbolRefAttr>(propStorage);
158 void setCallee(const ::mlir::SymbolRefAttr &propValue) {
159 this->callee = propValue;
165 auto &propStorage = this->mapOpGroupSizes;
166 return ::llvm::cast<::mlir::DenseI32ArrayAttr>(propStorage);
169 this->mapOpGroupSizes = propValue;
175 auto &propStorage = this->numDimsPerMap;
176 return ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(propStorage);
179 this->numDimsPerMap = propValue;
185 auto &propStorage = this->res_attrs;
186 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage);
189 this->res_attrs = propValue;
195 auto &propStorage = this->templateParams;
196 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage);
199 this->templateParams = propValue;
204 auto &propStorage = this->operandSegmentSizes;
208 auto &propStorage = this->operandSegmentSizes;
209 ::llvm::copy(propValue, propStorage.begin());
214 rhs.
callee == this->callee &&
223 return !(*
this == rhs);
248 auto attr = ::llvm::cast<::mlir::SymbolRefAttr>(
getProperties().callee);
254 auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(
getProperties().templateParams);
262 auto attr = ::llvm::cast<::mlir::DenseI32ArrayAttr>(
getProperties().mapOpGroupSizes);
268 auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(
getProperties().arg_attrs);
272 ::std::optional< ::mlir::ArrayAttr >
getArgAttrs();
274 auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(
getProperties().res_attrs);
278 ::std::optional< ::mlir::ArrayAttr >
getResAttrs();
282template <
typename RangeT>
284 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
286 static constexpr int odsIndex_argOperands = 0;
287 static constexpr int odsIndex_mapOperands = 1;
297 template <
typename LateInst = CallOp,
typename = std::enable_if_t<std::is_same_v<LateInst, CallOp>>>
306 return {std::next(odsOperands.begin(), valueRange.first),
307 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
318 ::llvm::SmallVector<RangeT> tblgenTmpOperandGroups;
319 for (
int i = 0, e = sizes.size(); i < e; ++i) {
320 tblgenTmpOperandGroups.push_back(tblgenTmpOperands.take_front(sizes[i]));
321 tblgenTmpOperands = tblgenTmpOperands.drop_front(sizes[i]);
323 return tblgenTmpOperandGroups;
338 ::llvm::LogicalResult
verify(::mlir::Location loc);
340class CallOp :
public ::mlir::Op<CallOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::VariadicResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::VariadicOperands, ::mlir::OpTrait::AttrSizedOperandSegments, ::llzk::VerifySizesForMultiAffineOps<1>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::MemRefsNormalizable, ::mlir::ArgAndResultAttrsOpInterface::Trait, ::mlir::CallOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait, ::llzk::LLZKCallLikeOpInterface::Trait> {
345 template <
typename RangeT>
351 using ::llzk::LLZKCallLikeOpInterface::Trait<CallOp>::getTypeSignature;
352 using ::llzk::LLZKCallLikeOpInterface::Trait<CallOp>::unifyTypeSignatureWithNamespace;
353 using ::llzk::LLZKCallLikeOpInterface::Trait<CallOp>::unifyTypeSignature;
354 using ::llzk::LLZKCallLikeOpInterface::Trait<CallOp>::toVectorOfValueRange;
355 using ::llzk::LLZKCallLikeOpInterface::Trait<CallOp>::verifyTemplateParamValueCompatibility;
356 using ::llzk::LLZKCallLikeOpInterface::Trait<CallOp>::verifyTemplateParamValuesCompatibility;
357 using ::llzk::LLZKCallLikeOpInterface::Trait<CallOp>::verifyTemplateParamsMatchInferred;
359 static ::llvm::StringRef attrNames[] = {::llvm::StringRef(
"arg_attrs"), ::llvm::StringRef(
"callee"), ::llvm::StringRef(
"mapOpGroupSizes"), ::llvm::StringRef(
"numDimsPerMap"), ::llvm::StringRef(
"res_attrs"), ::llvm::StringRef(
"templateParams"), ::llvm::StringRef(
"operandSegmentSizes")};
360 return ::llvm::ArrayRef(attrNames);
364 return getAttributeNameForIndex(0);
368 return getAttributeNameForIndex(name, 0);
372 return getAttributeNameForIndex(1);
376 return getAttributeNameForIndex(name, 1);
380 return getAttributeNameForIndex(2);
384 return getAttributeNameForIndex(name, 2);
388 return getAttributeNameForIndex(3);
392 return getAttributeNameForIndex(name, 3);
396 return getAttributeNameForIndex(4);
400 return getAttributeNameForIndex(name, 4);
404 return getAttributeNameForIndex(5);
408 return getAttributeNameForIndex(name, 5);
412 return (*this)->getName().getAttributeNames().back();
416 return name.getAttributeNames().back();
420 return ::llvm::StringLiteral(
"function.call");
426 return {std::next(getOperation()->operand_begin(), valueRange.first),
427 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
443 return {std::next(getOperation()->result_begin(), valueRange.first),
444 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
447 static ::llvm::LogicalResult
setPropertiesFromAttr(
Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
450 static std::optional<mlir::Attribute>
getInherentAttr(::mlir::MLIRContext *ctx,
const Properties &prop, llvm::StringRef name);
453 static ::llvm::LogicalResult
verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
454 static ::llvm::LogicalResult
readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
457 return ::llvm::cast<::mlir::SymbolRefAttr>(getProperties().callee);
462 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().templateParams);
467 return ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(getProperties().numDimsPerMap);
472 return ::llvm::cast<::mlir::DenseI32ArrayAttr>(getProperties().mapOpGroupSizes);
477 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().arg_attrs);
480 ::std::optional< ::mlir::ArrayAttr >
getArgAttrs();
482 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().res_attrs);
485 ::std::optional< ::mlir::ArrayAttr >
getResAttrs();
487 getProperties().callee = attr;
491 getProperties().templateParams = attr;
495 getProperties().numDimsPerMap = attr;
500 getProperties().mapOpGroupSizes = attr;
505 getProperties().arg_attrs = attr;
509 getProperties().res_attrs = attr;
513 auto attr = getProperties().templateParams;
514 getProperties().templateParams = {};
519 auto attr = getProperties().arg_attrs;
520 getProperties().arg_attrs = {};
525 auto attr = getProperties().res_attrs;
526 getProperties().res_attrs = {};
530 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::SymbolRefAttr callee, ::mlir::ValueRange argOperands = {}, ::llvm::ArrayRef<::mlir::Attribute> templateParams = {});
531 static CallOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::SymbolRefAttr callee, ::mlir::ValueRange argOperands = {}, ::llvm::ArrayRef<::mlir::Attribute> templateParams = {});
532 static CallOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::SymbolRefAttr callee, ::mlir::ValueRange argOperands = {}, ::llvm::ArrayRef<::mlir::Attribute> templateParams = {});
533 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::SymbolRefAttr callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap, ::mlir::ValueRange argOperands = {}, ::llvm::ArrayRef<::mlir::Attribute> templateParams = {});
534 static CallOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::SymbolRefAttr callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap, ::mlir::ValueRange argOperands = {}, ::llvm::ArrayRef<::mlir::Attribute> templateParams = {});
535 static CallOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::SymbolRefAttr callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap, ::mlir::ValueRange argOperands = {}, ::llvm::ArrayRef<::mlir::Attribute> templateParams = {});
536 static void 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 = {});
537 static CallOp
create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::SymbolRefAttr callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::llvm::ArrayRef<int32_t> numDimsPerMap, ::mlir::ValueRange argOperands = {}, ::llvm::ArrayRef<::mlir::Attribute> templateParams = {});
538 static CallOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::SymbolRefAttr callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::llvm::ArrayRef<int32_t> numDimsPerMap, ::mlir::ValueRange argOperands = {}, ::llvm::ArrayRef<::mlir::Attribute> templateParams = {});
539 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::function::FuncDefOp callee, ::mlir::ValueRange argOperands = {}, ::llvm::ArrayRef<::mlir::Attribute> templateParams = {});
540 static CallOp
create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llzk::function::FuncDefOp callee, ::mlir::ValueRange argOperands = {}, ::llvm::ArrayRef<::mlir::Attribute> templateParams = {});
541 static CallOp
create(::mlir::ImplicitLocOpBuilder &builder, ::llzk::function::FuncDefOp callee, ::mlir::ValueRange argOperands = {}, ::llvm::ArrayRef<::mlir::Attribute> templateParams = {});
542 static void 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 = {});
543 static CallOp
create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llzk::function::FuncDefOp callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap, ::mlir::ValueRange argOperands = {}, ::llvm::ArrayRef<::mlir::Attribute> templateParams = {});
544 static CallOp
create(::mlir::ImplicitLocOpBuilder &builder, ::llzk::function::FuncDefOp callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap, ::mlir::ValueRange argOperands = {}, ::llvm::ArrayRef<::mlir::Attribute> templateParams = {});
545 static void 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 = {});
546 static CallOp
create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llzk::function::FuncDefOp callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::llvm::ArrayRef<int32_t> numDimsPerMap, ::mlir::ValueRange argOperands = {}, ::llvm::ArrayRef<::mlir::Attribute> templateParams = {});
547 static CallOp
create(::mlir::ImplicitLocOpBuilder &builder, ::llzk::function::FuncDefOp callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::llvm::ArrayRef<int32_t> numDimsPerMap, ::mlir::ValueRange argOperands = {}, ::llvm::ArrayRef<::mlir::Attribute> templateParams = {});
555 ::llvm::LogicalResult
verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
557 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
559 void print(::mlir::OpAsmPrinter &_odsPrinter);
561 ::mlir::StringAttr getAttributeNameForIndex(
unsigned index) {
562 return getAttributeNameForIndex((*this)->getName(), index);
565 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name,
unsigned index) {
566 assert(index < 6 &&
"invalid attribute index");
567 assert(name.getStringRef() ==
getOperationName() &&
"invalid operation name");
568 assert(name.isRegistered() &&
"Operation isn't registered, missing a "
569 "dependent dialect loading?");
570 return name.getAttributeNames()[index];
623 ::mlir::FailureOr<::llzk::SymbolLookupResult<::llzk::function::FuncDefOp>>
654 auto &propStorage = this->arg_attrs;
655 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage);
658 this->arg_attrs = propValue;
664 auto &propStorage = this->function_type;
665 return ::llvm::cast<::mlir::TypeAttr>(propStorage);
668 this->function_type = propValue;
674 auto &propStorage = this->res_attrs;
675 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage);
678 this->res_attrs = propValue;
684 auto &propStorage = this->sym_name;
685 return ::llvm::cast<::mlir::StringAttr>(propStorage);
688 this->sym_name = propValue;
699 return !(*
this == rhs);
727 auto attr = ::llvm::cast<::mlir::StringAttr>(
getProperties().sym_name);
733 auto attr = ::llvm::cast<::mlir::TypeAttr>(
getProperties().function_type);
739 auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(
getProperties().arg_attrs);
743 ::std::optional< ::mlir::ArrayAttr >
getArgAttrs();
745 auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(
getProperties().res_attrs);
749 ::std::optional< ::mlir::ArrayAttr >
getResAttrs();
761template <
typename RangeT>
763 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
774 template <
typename LateInst = FuncDefOp,
typename = std::enable_if_t<std::is_same_v<LateInst, FuncDefOp>>>
783 return {std::next(odsOperands.begin(), valueRange.first),
784 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
799 ::llvm::LogicalResult
verify(::mlir::Location loc);
801class FuncDefOp :
public ::mlir::Op<FuncDefOp, ::mlir::OpTrait::OneRegion, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::HasParent<::mlir::ModuleOp, ::llzk::component::StructDefOp, ::llzk::polymorphic::TemplateOp>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait, ::mlir::OpTrait::AffineScope, ::mlir::OpTrait::AutomaticAllocationScope, ::mlir::SymbolOpInterface::Trait, ::mlir::ArgAndResultAttrsOpInterface::Trait, ::mlir::CallableOpInterface::Trait, ::mlir::FunctionOpInterface::Trait, ::mlir::OpTrait::IsIsolatedFromAbove, ::llzk::verif::ContractTargetOpInterface::Trait> {
806 template <
typename RangeT>
811 static ::llvm::StringRef attrNames[] = {::llvm::StringRef(
"arg_attrs"), ::llvm::StringRef(
"function_type"), ::llvm::StringRef(
"res_attrs"), ::llvm::StringRef(
"sym_name")};
812 return ::llvm::ArrayRef(attrNames);
816 return getAttributeNameForIndex(0);
820 return getAttributeNameForIndex(name, 0);
824 return getAttributeNameForIndex(1);
828 return getAttributeNameForIndex(name, 1);
832 return getAttributeNameForIndex(2);
836 return getAttributeNameForIndex(name, 2);
840 return getAttributeNameForIndex(3);
844 return getAttributeNameForIndex(name, 3);
848 return ::llvm::StringLiteral(
"function.def");
857 return {std::next(getOperation()->operand_begin(), valueRange.first),
858 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
867 return {std::next(getOperation()->result_begin(), valueRange.first),
868 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
872 return (*this)->getRegion(0);
875 static ::llvm::LogicalResult
setPropertiesFromAttr(
Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
878 static std::optional<mlir::Attribute>
getInherentAttr(::mlir::MLIRContext *ctx,
const Properties &prop, llvm::StringRef name);
881 static ::llvm::LogicalResult
verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
882 static ::llvm::LogicalResult
readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
885 return ::llvm::cast<::mlir::StringAttr>(getProperties().sym_name);
890 return ::llvm::cast<::mlir::TypeAttr>(getProperties().function_type);
895 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().arg_attrs);
898 ::std::optional< ::mlir::ArrayAttr >
getArgAttrs();
900 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().res_attrs);
903 ::std::optional< ::mlir::ArrayAttr >
getResAttrs();
905 getProperties().sym_name = attr;
910 getProperties().function_type = attr;
915 getProperties().arg_attrs = attr;
919 getProperties().res_attrs = attr;
923 auto attr = getProperties().arg_attrs;
924 getProperties().arg_attrs = {};
929 auto attr = getProperties().res_attrs;
930 getProperties().res_attrs = {};
934 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 = {});
935 static FuncDefOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llvm::StringRef name, ::mlir::FunctionType type, ::llvm::ArrayRef<::mlir::NamedAttribute> attrs = {}, ::llvm::ArrayRef<::mlir::DictionaryAttr> argAttrs = {});
936 static FuncDefOp
create(::mlir::ImplicitLocOpBuilder &builder, ::llvm::StringRef name, ::mlir::FunctionType type, ::llvm::ArrayRef<::mlir::NamedAttribute> attrs = {}, ::llvm::ArrayRef<::mlir::DictionaryAttr> argAttrs = {});
937 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, ::mlir::TypeAttr function_type, ::mlir::ArrayAttr arg_attrs, ::mlir::ArrayAttr res_attrs);
938 static FuncDefOp
create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::StringAttr sym_name, ::mlir::TypeAttr function_type, ::mlir::ArrayAttr arg_attrs, ::mlir::ArrayAttr res_attrs);
939 static FuncDefOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::StringAttr sym_name, ::mlir::TypeAttr function_type, ::mlir::ArrayAttr arg_attrs, ::mlir::ArrayAttr res_attrs);
940 static void 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);
941 static FuncDefOp
create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name, ::mlir::TypeAttr function_type, ::mlir::ArrayAttr arg_attrs, ::mlir::ArrayAttr res_attrs);
942 static FuncDefOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name, ::mlir::TypeAttr function_type, ::mlir::ArrayAttr arg_attrs, ::mlir::ArrayAttr res_attrs);
943 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name, ::mlir::FunctionType function_type, ::mlir::ArrayAttr arg_attrs, ::mlir::ArrayAttr res_attrs);
944 static FuncDefOp
create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llvm::StringRef sym_name, ::mlir::FunctionType function_type, ::mlir::ArrayAttr arg_attrs, ::mlir::ArrayAttr res_attrs);
945 static FuncDefOp
create(::mlir::ImplicitLocOpBuilder &builder, ::llvm::StringRef sym_name, ::mlir::FunctionType function_type, ::mlir::ArrayAttr arg_attrs, ::mlir::ArrayAttr res_attrs);
946 static void 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);
947 static FuncDefOp
create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name, ::mlir::FunctionType function_type, ::mlir::ArrayAttr arg_attrs, ::mlir::ArrayAttr res_attrs);
948 static FuncDefOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name, ::mlir::FunctionType function_type, ::mlir::ArrayAttr arg_attrs, ::mlir::ArrayAttr res_attrs);
949 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
950 static FuncDefOp
create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
951 static FuncDefOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
952 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
953 static FuncDefOp
create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
954 static FuncDefOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
955 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
956 void print(::mlir::OpAsmPrinter &p);
959 ::llvm::LogicalResult
verify();
960 ::llvm::LogicalResult
verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
963 ::mlir::StringAttr getAttributeNameForIndex(
unsigned index) {
964 return getAttributeNameForIndex((*this)->getName(), index);
967 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name,
unsigned index) {
968 assert(index < 4 &&
"invalid attribute index");
969 assert(name.getStringRef() ==
getOperationName() &&
"invalid operation name");
970 assert(name.isRegistered() &&
"Operation isn't registered, missing a "
971 "dependent dialect loading?");
972 return name.getAttributeNames()[index];
976 static FuncDefOp create(::mlir::Location location, ::llvm::StringRef name, ::mlir::FunctionType type,
977 ::llvm::ArrayRef<::mlir::NamedAttribute> attrs = {});
978 static FuncDefOp create(::mlir::Location location, ::llvm::StringRef name, ::mlir::FunctionType type,
979 ::mlir::Operation::dialect_attr_range attrs);
980 static FuncDefOp create(::mlir::Location location, ::llvm::StringRef name, ::mlir::FunctionType type,
981 ::llvm::ArrayRef<::mlir::NamedAttribute> attrs,
982 ::llvm::ArrayRef<::mlir::DictionaryAttr> argAttrs);
1002 return getOperation()->hasAttr(llzk::function::AllowConstraintAttr::name);
1010 return getOperation()->hasAttr(llzk::function::AllowWitnessAttr::name);
1018 return getOperation()->hasAttr(llzk::function::AllowNonNativeFieldOpsAttr::name);
1026 return getOperation()->hasAttr(llzk::function::AllowVerifOpsAttr::name);
1039 ::std::optional<::mlir::StringAttr>
getArgNameAttr(
unsigned index);
1042 void setArgNameAttr(
unsigned index, const ::mlir::StringAttr &attr);
1045 void setArgName(
unsigned index, ::llvm::StringRef name);
1051 ::std::optional<::mlir::StringAttr>
getResNameAttr(
unsigned index);
1054 void setResNameAttr(
unsigned index, const ::mlir::StringAttr &attr);
1057 void setResName(
unsigned index, ::llvm::StringRef name);
1093 inline bool isInStruct() { return ::llzk::component::isInStruct(*
this); }
1160template <
typename RangeT>
1162 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
1164 static constexpr int odsIndex_operands = 0;
1174 template <
typename LateInst = ReturnOp,
typename = std::enable_if_t<std::is_same_v<LateInst, ReturnOp>>>
1183 return {std::next(odsOperands.begin(), valueRange.first),
1184 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
1199 ::llvm::LogicalResult
verify(::mlir::Location loc);
1201class ReturnOp :
public ::mlir::Op<ReturnOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::VariadicOperands, ::mlir::OpTrait::HasParent<::llzk::function::FuncDefOp>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::MemRefsNormalizable, ::mlir::RegionBranchTerminatorOpInterface::Trait, ::mlir::OpTrait::ReturnLike, ::mlir::OpTrait::IsTerminator> {
1206 template <
typename RangeT>
1211 using ::mlir::RegionBranchTerminatorOpInterface::Trait<ReturnOp>::getMutableSuccessorOperands;
1212 using ::mlir::RegionBranchTerminatorOpInterface::Trait<ReturnOp>::getSuccessorRegions;
1218 return ::llvm::StringLiteral(
"function.return");
1224 return {std::next(getOperation()->operand_begin(), valueRange.first),
1225 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1239 return {std::next(getOperation()->result_begin(), valueRange.first),
1240 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1243 static ::llvm::LogicalResult
setPropertiesFromAttr(
Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1246 static std::optional<mlir::Attribute>
getInherentAttr(::mlir::MLIRContext *ctx,
const Properties &prop, llvm::StringRef name);
1249 static ::llvm::LogicalResult
verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1250 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
1251 static ReturnOp create(::mlir::OpBuilder &builder, ::mlir::Location location);
1253 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands);
1254 static ReturnOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands);
1255 static ReturnOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands);
1256 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1257 static ReturnOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1258 static ReturnOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1259 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1260 static ReturnOp
create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1261 static ReturnOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1264 ::llvm::LogicalResult
verify();
1265 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1266 void print(::mlir::OpAsmPrinter &_odsPrinter);
1267 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
::llvm::LogicalResult verify(::mlir::Location loc)
CallOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
CallOpGenericAdaptor(RangeT values, LateInst op)
::llvm::SmallVector< RangeT > getMapOperands()
CallOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs)
CallOpGenericAdaptor(RangeT values, const CallOpGenericAdaptorBase &base)
RangeT getODSOperands(unsigned index)
CallOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
CallOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::SymbolRefAttr callee, ::mlir::ValueRange argOperands={}, ::llvm::ArrayRef<::mlir::Attribute > templateParams={})
bool calleeContainsWitnessGen()
Return true iff the callee function can contain witness generation code (this does not check if the c...
void setNumDimsPerMap(::llvm::ArrayRef< int32_t > attrValue)
bool calleeIsStructConstrain()
Return true iff the callee function name is FUNC_NAME_CONSTRAIN within a StructDefOp.
::mlir::StringAttr getTemplateParamsAttrName(::mlir::OperationName name)
::mlir::StringAttr getOperandSegmentSizesAttrName()
::mlir::CallInterfaceCallable getCallableForCallee()
Return the callee of this operation.
static constexpr int odsIndex_mapOperands
::llzk::component::StructType getSingleResultTypeOfCompute()
Assuming the callee is FUNC_NAME_COMPUTE, return the single StructType result.
::mlir::SymbolRefAttr getCalleeAttr()
::mlir::Value getSelfValueFromProduct()
Return the "self" value (i.e.
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
static constexpr int odsIndex_argOperands
::mlir::Operation * resolveCallableInTable(::mlir::SymbolTableCollection *symbolTable)
::mlir::StringAttr getResAttrsAttrName(::mlir::OperationName name)
bool calleeIsInStruct()
Return true iff the callee function is within a StructDefOp.
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static llvm::hash_code computePropertiesHash(const Properties &prop)
::mlir::Value getSelfValue()
bool calleeIsStructCompute()
Return true iff the callee function name is FUNC_NAME_COMPUTE within a StructDefOp.
::mlir::StringAttr getNumDimsPerMapAttrName(::mlir::OperationName name)
bool calleeIsConstrain()
Return true iff the callee function name is FUNC_NAME_CONSTRAIN (this does not check if the callee fu...
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties)
::mlir::StringAttr getResAttrsAttrName()
::std::optional< ::mlir::ArrayAttr > getArgAttrs()
bool calleeIsProduct()
Return true iff the callee function name is FUNC_NAME_PRODUCT (this does not check if the callee func...
::mlir::SymbolRefAttr getCallee()
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
::mlir::Operation * resolveCallable()
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
void setMapOpGroupSizesAttr(::mlir::DenseI32ArrayAttr attr)
::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::StringAttr getArgAttrsAttrName(::mlir::OperationName name)
::mlir::ArrayAttr getArgAttrsAttr()
::mlir::StringAttr getArgAttrsAttrName()
void setArgAttrsAttr(::mlir::ArrayAttr attr)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
void setMapOpGroupSizes(::llvm::ArrayRef< int32_t > attrValue)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::StringAttr getTemplateParamsAttrName()
bool calleeIsStructProduct()
Return true iff the callee function name is FUNC_NAME_PRODUCT within a StructDefOp.
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
bool calleeIsCompute()
Return true iff the callee function name is FUNC_NAME_COMPUTE (this does not check if the callee func...
::mlir::StringAttr getCalleeAttrName(::mlir::OperationName name)
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::mlir::MutableOperandRange getArgOperandsMutable()
void setTemplateParamsAttr(::mlir::ArrayAttr attr)
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
::mlir::Operation::operand_range getArgOperands()
static CallOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::SymbolRefAttr callee, ::mlir::ValueRange argOperands={}, ::llvm::ArrayRef<::mlir::Attribute > templateParams={})
::mlir::Value getSelfValueFromConstrain()
Return the "self" value (i.e.
::llvm::LogicalResult verifyInvariants()
::mlir::StringAttr getMapOpGroupSizesAttrName()
void setResAttrsAttr(::mlir::ArrayAttr attr)
::mlir::ArrayAttr getTemplateParamsAttr()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::SymbolRefAttr callee, ::llvm::ArrayRef<::mlir::ValueRange > mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap, ::mlir::ValueRange argOperands={}, ::llvm::ArrayRef<::mlir::Attribute > templateParams={})
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
void print(::mlir::OpAsmPrinter &_odsPrinter)
static constexpr ::llvm::StringLiteral getOperationName()
::mlir::OperandRangeRange getMapOperands()
::mlir::ArrayAttr getResAttrsAttr()
::llzk::component::StructType getSingleResultTypeOfWitnessGen()
Assuming the callee contains witness generation code, return the single StructType result.
FoldAdaptor::Properties Properties
void setCalleeAttr(::mlir::SymbolRefAttr attr)
::mlir::Attribute removeResAttrsAttr()
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name)
::mlir::Attribute removeTemplateParamsAttr()
CallOpGenericAdaptor< RangeT > GenericAdaptor
::std::optional< ::mlir::ArrayAttr > getTemplateParams()
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
void setNumDimsPerMapAttr(::mlir::DenseI32ArrayAttr attr)
::mlir::StringAttr getNumDimsPerMapAttrName()
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::mlir::Attribute removeArgAttrsAttr()
::mlir::MutableOperandRangeRange getMapOperandsMutable()
::mlir::StringAttr getMapOpGroupSizesAttrName(::mlir::OperationName name)
::llvm::LogicalResult verifyInvariantsImpl()
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::StringAttr getCalleeAttrName()
::std::optional< ::mlir::ArrayAttr > getResAttrs()
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
::mlir::Value getSelfValueFromCompute()
Return the "self" value (i.e.
void setCalleeFromCallable(::mlir::CallInterfaceCallable callee)
Set the callee for this operation.
::mlir::FailureOr<::llzk::SymbolLookupResult<::llzk::function::FuncDefOp > > getCalleeTarget(::mlir::SymbolTableCollection &tables)
Resolve and return the target FuncDefOp for this CallOp.
::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)
FuncDefOpGenericAdaptor(RangeT values, const FuncDefOpGenericAdaptorBase &base)
FuncDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
FuncDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
RangeT getODSOperands(unsigned index)
FuncDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
FuncDefOpGenericAdaptor(RangeT values, LateInst op)
::mlir::StringAttr getFunctionTypeAttrName(::mlir::OperationName name)
FuncDefOp clone(::mlir::IRMapping &mapper)
Create a deep copy of this function and all of its blocks, remapping any operands that use values out...
::mlir::StringAttr getResAttrsAttrName(::mlir::OperationName name)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
void setAllowWitnessAttr(bool newValue=true)
Add (resp. remove) the allow_witness attribute to (resp. from) the function def.
static FuncDefOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llvm::StringRef name, ::mlir::FunctionType type, ::llvm::ArrayRef<::mlir::NamedAttribute > attrs={}, ::llvm::ArrayRef<::mlir::DictionaryAttr > argAttrs={})
void setArgNameAttr(unsigned index, const ::mlir::StringAttr &attr)
Set the function.arg_name attribute for the argument at the given index.
static llvm::hash_code computePropertiesHash(const Properties &prop)
FoldAdaptor::Properties Properties
void setArgName(unsigned index, ::llvm::StringRef name)
Set the function.arg_name attribute for the argument at the given index from a string.
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
::mlir::Value getSelfValueFromCompute()
Return the "self" value (i.e.
::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()
void setAllowNonNativeFieldOpsAttr(bool newValue=true)
Add (resp. remove) the allow_non_native_field_ops attribute to (resp. from) the function def.
::mlir::Operation::result_range getODSResults(unsigned index)
::llvm::ArrayRef<::mlir::Type > getArgumentTypes()
Required by FunctionOpInterface.
void setSymNameAttr(::mlir::StringAttr attr)
void setResNameAttr(unsigned index, const ::mlir::StringAttr &attr)
Set the function.res_name attribute for the result at the given index.
::mlir::StringAttr getFunctionTypeAttrName()
bool hasAllowNonNativeFieldOpsAttr()
Return true iff the function def has the allow_non_native_field_ops attribute.
::llvm::LogicalResult verifyInvariants()
::mlir::Value getSelfValueFromConstrain()
Return the "self" value (i.e.
::mlir::Value getSelfValueFromProduct()
Return the "self" value (i.e.
FuncDefOpGenericAdaptor< RangeT > GenericAdaptor
static FuncDefOp create(::mlir::Location location, ::llvm::StringRef name, ::mlir::FunctionType type, ::llvm::ArrayRef<::mlir::NamedAttribute > attrs, ::llvm::ArrayRef<::mlir::DictionaryAttr > argAttrs)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
void print(::mlir::OpAsmPrinter &p)
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
bool nameIsCompute()
Return true iff the function name is FUNC_NAME_COMPUTE (if needed, a check that this FuncDefOp is loc...
bool hasAllowWitnessAttr()
Return true iff the function def has the allow_witness attribute.
void setResAttrsAttr(::mlir::ArrayAttr attr)
::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::llzk::component::StructType getSingleResultTypeOfCompute()
Assuming the name is FUNC_NAME_COMPUTE, return the single StructType result.
::mlir::Attribute removeResAttrsAttr()
::mlir::StringAttr getResAttrsAttrName()
::std::optional< ::mlir::ArrayAttr > getResAttrs()
::mlir::StringAttr getArgAttrsAttrName(::mlir::OperationName name)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
bool hasArgName(unsigned index)
Return true iff the argument at the given index has a function.arg_name attribute.
void cloneInto(FuncDefOp dest, ::mlir::IRMapping &mapper)
Clone the internal blocks and attributes from this function into dest.
::std::optional< ::mlir::ArrayAttr > getArgAttrs()
void setAllowVerifOpsAttr(bool newValue=true)
Add (resp. remove) the allow_verif_ops attribute to (resp. from) the function def.
bool hasResName(unsigned index)
Return true iff the result at the given index has a function.res_name attribute.
bool nameIsProduct()
Return true iff the function name is FUNC_NAME_PRODUCT (if needed, a check that this FuncDefOp is loc...
::std::optional<::mlir::StringAttr > getArgNameAttr(unsigned index)
Return the function.arg_name attribute for the argument at the given index.
::mlir::ArrayAttr getArgAttrsAttr()
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::mlir::Operation::operand_range getODSOperands(unsigned index)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
::std::optional<::mlir::StringAttr > getResNameAttr(unsigned index)
Return the function.res_name attribute for the result at the given index.
::llvm::StringRef getSymName()
bool nameIsConstrain()
Return true iff the function name is FUNC_NAME_CONSTRAIN (if needed, a check that this FuncDefOp is l...
static FuncDefOp create(::mlir::Location location, ::llvm::StringRef name, ::mlir::FunctionType type, ::mlir::Operation::dialect_attr_range attrs)
bool hasAllowVerifOpsAttr()
Return true iff the function def has the allow_verif_ops attribute.
bool isStructCompute()
Return true iff the function is within a StructDefOp and named FUNC_NAME_COMPUTE.
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
void setResName(unsigned index, ::llvm::StringRef name)
Set the function.res_name attribute for the result at the given index from a string.
bool isInStruct()
Return true iff the function is within a StructDefOp.
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
::mlir::StringAttr getSymNameAttrName(::mlir::OperationName name)
void setFunctionType(::mlir::FunctionType attrValue)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
bool isDeclaration()
Required by SymbolOpInterface.
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
::llvm::ArrayRef<::mlir::Type > getResultTypes()
Required by FunctionOpInterface.
static constexpr ::llvm::StringLiteral getOperationName()
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
bool isStructConstrain()
Return true iff the function is within a StructDefOp and named FUNC_NAME_CONSTRAIN.
void setAllowConstraintAttr(bool newValue=true)
Add (resp. remove) the allow_constraint attribute to (resp. from) the function def.
void setSymName(::llvm::StringRef attrValue)
static FuncDefOp create(::mlir::Location location, ::llvm::StringRef name, ::mlir::FunctionType type, ::llvm::ArrayRef<::mlir::NamedAttribute > attrs={})
::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()
bool hasArgPublicAttr(unsigned index)
Return true iff the argument at the given index has pub attribute.
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::Region * getCallableRegion()
Required by FunctionOpInterface.
::llvm::LogicalResult verify()
::mlir::Region & getBody()
::mlir::StringAttr getSymNameAttr()
::mlir::ArrayAttr getResAttrsAttr()
::llvm::LogicalResult verifyInvariantsImpl()
bool isStructProduct()
Return true iff the function is within a StructDefOp and named FUNC_NAME_PRODUCT.
bool hasAllowConstraintAttr()
Return true iff the function def has the allow_constraint attribute.
void setFunctionTypeAttr(::mlir::TypeAttr attr)
::mlir::StringAttr getArgAttrsAttrName()
::mlir::Attribute removeArgAttrsAttr()
ReturnOpAdaptor(ReturnOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
ReturnOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
ReturnOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
ReturnOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
ReturnOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
RangeT getODSOperands(unsigned index)
ReturnOpGenericAdaptor(RangeT values, const ReturnOpGenericAdaptorBase &base)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
ReturnOpGenericAdaptor(RangeT values, LateInst op)
void print(::mlir::OpAsmPrinter &_odsPrinter)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::mlir::Operation::result_range getODSResults(unsigned index)
FoldAdaptor::Properties Properties
static ReturnOp create(::mlir::OpBuilder &builder, ::mlir::Location location)
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::llvm::LogicalResult verifyInvariantsImpl()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState)
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
static llvm::hash_code computePropertiesHash(const Properties &prop)
::mlir::Operation::operand_range getODSOperands(unsigned index)
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
::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)
::llvm::LogicalResult verify()
static constexpr ::llvm::StringLiteral getOperationName()
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::mlir::MutableOperandRange getOperandsMutable()
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
ReturnOpGenericAdaptor< RangeT > GenericAdaptor
::mlir::Operation::operand_range getOperands()
::llvm::LogicalResult verifyInvariants()
static constexpr int odsIndex_operands
::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
::std::optional< ::mlir::ArrayAttr > getArgAttrs()
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
::mlir::ArrayAttr getResAttrsAttr()
::std::optional< ::mlir::ArrayAttr > getTemplateParams()
::mlir::DictionaryAttr getAttributes()
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
::mlir::SymbolRefAttr getCalleeAttr()
::std::optional<::mlir::OperationName > odsOpName
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::ArrayAttr getArgAttrsAttr()
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
::std::optional< ::mlir::ArrayAttr > getResAttrs()
::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()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::DictionaryAttr odsAttrs
const Properties & getProperties()
FuncDefOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::FunctionType getFunctionType()
::std::optional<::mlir::OperationName > odsOpName
::mlir::Region & getBody()
::llvm::StringRef getSymName()
::mlir::DictionaryAttr getAttributes()
::mlir::RegionRange odsRegions
::mlir::ArrayAttr getResAttrsAttr()
const Properties & getProperties()
::mlir::DictionaryAttr odsAttrs
::mlir::EmptyProperties Properties
ReturnOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::std::optional<::mlir::OperationName > odsOpName
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::RegionRange odsRegions
::mlir::DictionaryAttr getAttributes()
constexpr char FUNC_NAME_COMPUTE[]
Symbol name for the witness generation (and resp.
constexpr char FUNC_NAME_CONSTRAIN[]
constexpr char FUNC_NAME_PRODUCT[]
auto getMapOpGroupSizes() const
::mlir::DenseI32ArrayAttr numDimsPerMapTy
bool operator==(const Properties &rhs) const
operandSegmentSizesTy operandSegmentSizes
auto getTemplateParams() const
bool operator!=(const Properties &rhs) const
numDimsPerMapTy numDimsPerMap
void setTemplateParams(const ::mlir::ArrayAttr &propValue)
void setArgAttrs(const ::mlir::ArrayAttr &propValue)
mapOpGroupSizesTy mapOpGroupSizes
void setOperandSegmentSizes(::llvm::ArrayRef< int32_t > propValue)
::mlir::ArrayAttr res_attrsTy
::mlir::ArrayAttr arg_attrsTy
void setResAttrs(const ::mlir::ArrayAttr &propValue)
::mlir::ArrayAttr templateParamsTy
void setNumDimsPerMap(const ::mlir::DenseI32ArrayAttr &propValue)
templateParamsTy templateParams
void setMapOpGroupSizes(const ::mlir::DenseI32ArrayAttr &propValue)
std::array< int32_t, 2 > operandSegmentSizesTy
::mlir::DenseI32ArrayAttr mapOpGroupSizesTy
::mlir::SymbolRefAttr calleeTy
void setCallee(const ::mlir::SymbolRefAttr &propValue)
auto getNumDimsPerMap() const
::llvm::ArrayRef< int32_t > getOperandSegmentSizes() const
bool operator==(const Properties &rhs) const
void setResAttrs(const ::mlir::ArrayAttr &propValue)
bool operator!=(const Properties &rhs) const
void setSymName(const ::mlir::StringAttr &propValue)
::mlir::ArrayAttr res_attrsTy
void setArgAttrs(const ::mlir::ArrayAttr &propValue)
void setFunctionType(const ::mlir::TypeAttr &propValue)
::mlir::ArrayAttr arg_attrsTy
::mlir::StringAttr sym_nameTy
::mlir::TypeAttr function_typeTy
function_typeTy function_type
auto getFunctionType() const