79template <
typename RangeT>
81 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
84 ContractEndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
90 template <
typename LateInst = ContractEndOp,
typename = std::enable_if_t<std::is_same_v<LateInst, ContractEndOp>>>
99 return {std::next(odsOperands.begin(), valueRange.first),
100 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
115 ::llvm::LogicalResult
verify(::mlir::Location loc);
117class ContractEndOp :
public ::mlir::Op<ContractEndOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::HasParent<::llzk::verif::ContractOp>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::IsTerminator> {
122 template <
typename RangeT>
130 return ::llvm::StringLiteral(
"verif.contract_end");
139 return {std::next(getOperation()->operand_begin(), valueRange.first),
140 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
149 return {std::next(getOperation()->result_begin(), valueRange.first),
150 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
153 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
154 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
155 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
158 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
159 void print(::mlir::OpAsmPrinter &_odsPrinter);
160 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
182 auto &propStorage = this->arg_attrs;
183 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage);
186 this->arg_attrs = propValue;
192 auto &propStorage = this->function_type;
193 return ::llvm::cast<::mlir::TypeAttr>(propStorage);
196 this->function_type = propValue;
202 auto &propStorage = this->sym_name;
203 return ::llvm::cast<::mlir::StringAttr>(propStorage);
206 this->sym_name = propValue;
212 auto &propStorage = this->target;
213 return ::llvm::cast<::mlir::SymbolRefAttr>(propStorage);
215 void setTarget(const ::mlir::SymbolRefAttr &propValue) {
216 this->target = propValue;
223 rhs.
target == this->target &&
227 return !(*
this == rhs);
255 auto attr = ::llvm::cast<::mlir::StringAttr>(
getProperties().sym_name);
261 auto attr = ::llvm::cast<::mlir::SymbolRefAttr>(
getProperties().target);
267 auto attr = ::llvm::cast<::mlir::TypeAttr>(
getProperties().function_type);
273 auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(
getProperties().arg_attrs);
277 ::std::optional< ::mlir::ArrayAttr >
getArgAttrs();
288template <
typename RangeT>
290 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
301 template <
typename LateInst = ContractOp,
typename = std::enable_if_t<std::is_same_v<LateInst, ContractOp>>>
310 return {std::next(odsOperands.begin(), valueRange.first),
311 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
326 ::llvm::LogicalResult
verify(::mlir::Location loc);
328class ContractOp :
public ::mlir::Op<ContractOp, ::mlir::OpTrait::OneRegion, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::HasParent<::mlir::ModuleOp, ::llzk::polymorphic::TemplateOp>::Impl, ::mlir::OpTrait::SingleBlock, ::mlir::OpTrait::SingleBlockImplicitTerminator<::llzk::verif::ContractEndOp>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait, ::mlir::OpTrait::AffineScope, ::mlir::OpTrait::AutomaticAllocationScope, ::mlir::SymbolOpInterface::Trait, ::mlir::CallableOpInterface::Trait, ::mlir::FunctionOpInterface::Trait, ::mlir::OpTrait::IsIsolatedFromAbove> {
333 template <
typename RangeT>
338 static ::llvm::StringRef attrNames[] = {::llvm::StringRef(
"arg_attrs"), ::llvm::StringRef(
"function_type"), ::llvm::StringRef(
"sym_name"), ::llvm::StringRef(
"target")};
339 return ::llvm::ArrayRef(attrNames);
343 return getAttributeNameForIndex(0);
347 return getAttributeNameForIndex(name, 0);
351 return getAttributeNameForIndex(1);
355 return getAttributeNameForIndex(name, 1);
359 return getAttributeNameForIndex(2);
363 return getAttributeNameForIndex(name, 2);
367 return getAttributeNameForIndex(3);
371 return getAttributeNameForIndex(name, 3);
375 return ::llvm::StringLiteral(
"verif.contract");
384 return {std::next(getOperation()->operand_begin(), valueRange.first),
385 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
394 return {std::next(getOperation()->result_begin(), valueRange.first),
395 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
399 return (*this)->getRegion(0);
402 static ::llvm::LogicalResult
setPropertiesFromAttr(
Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
405 static std::optional<mlir::Attribute>
getInherentAttr(::mlir::MLIRContext *ctx,
const Properties &prop, llvm::StringRef name);
408 static ::llvm::LogicalResult
verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
409 static ::llvm::LogicalResult
readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
412 return ::llvm::cast<::mlir::StringAttr>(getProperties().sym_name);
417 return ::llvm::cast<::mlir::SymbolRefAttr>(getProperties().target);
422 return ::llvm::cast<::mlir::TypeAttr>(getProperties().function_type);
427 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().arg_attrs);
430 ::std::optional< ::mlir::ArrayAttr >
getArgAttrs();
432 getProperties().sym_name = attr;
437 getProperties().target = attr;
441 getProperties().function_type = attr;
446 getProperties().arg_attrs = attr;
450 auto &attr = getProperties().arg_attrs;
455 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, ::mlir::SymbolRefAttr target, ::mlir::TypeAttr function_type, ::mlir::ArrayAttr arg_attrs = {});
456 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name, ::mlir::SymbolRefAttr target, ::mlir::TypeAttr function_type, ::mlir::ArrayAttr arg_attrs = {});
457 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name, ::mlir::SymbolRefAttr target, ::mlir::FunctionType function_type, ::mlir::ArrayAttr arg_attrs = {});
458 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name, ::mlir::SymbolRefAttr target, ::mlir::FunctionType function_type, ::mlir::ArrayAttr arg_attrs = {});
459 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef name, llvm::StringRef target);
460 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef name, ::mlir::SymbolRefAttr target);
461 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
462 void print(::mlir::OpAsmPrinter &p);
465 ::llvm::LogicalResult
verify();
467 ::llvm::LogicalResult
verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
469 ::mlir::StringAttr getAttributeNameForIndex(
unsigned index) {
470 return getAttributeNameForIndex((*this)->getName(), index);
473 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name,
unsigned index) {
474 assert(index < 4 &&
"invalid attribute index");
475 assert(name.getStringRef() ==
getOperationName() &&
"invalid operation name");
476 assert(name.isRegistered() &&
"Operation isn't registered, missing a "
477 "dependent dialect loading?");
478 return name.getAttributeNames()[index];
505 ::std::optional<::mlir::StringAttr>
getArgNameAttr(
unsigned index);
508 void setArgNameAttr(
unsigned index, const ::mlir::StringAttr &attr);
511 void setArgName(
unsigned index, ::llvm::StringRef name);
538 ::mlir::FailureOr<SymbolLookupResult<component::StructDefOp>>
getStructTarget(::mlir::SymbolTableCollection &tables);
541 ::mlir::SymbolTableCollection tables;
554 ::mlir::FailureOr<SymbolLookupResult<function::FuncDefOp>>
getFuncTarget(::mlir::SymbolTableCollection &tables);
556 ::mlir::FailureOr<SymbolLookupResult<function::FuncDefOp>>
getFuncTarget() {
557 ::mlir::SymbolTableCollection tables;
564 static void initializeEmptyBody(
565 ::mlir::OpBuilder &builder, ::mlir::OperationState &state,
566 ::mlir::FunctionType functionType
604template <
typename RangeT>
606 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
609 EnsureComputeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
615 template <
typename LateInst = EnsureComputeOp,
typename = std::enable_if_t<std::is_same_v<LateInst, EnsureComputeOp>>>
624 return {std::next(odsOperands.begin(), valueRange.first),
625 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
644 ::llvm::LogicalResult
verify(::mlir::Location loc);
646class EnsureComputeOp :
public ::mlir::Op<EnsureComputeOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::llzk::HasAncestor<::llzk::verif::ContractOp>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::MemoryEffectOpInterface::Trait, ::llzk::verif::ConditionOpInterface::Trait, ::llzk::verif::PostconditionOpInterface::Trait> {
651 template <
typename RangeT>
659 return ::llvm::StringLiteral(
"verif.ensure_compute");
668 return {std::next(getOperation()->operand_begin(), valueRange.first),
669 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
673 return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*
getODSOperands(0).begin());
678 return getOperation()->getOpOperand(range.first);
687 return {std::next(getOperation()->result_begin(), valueRange.first),
688 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
691 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition);
692 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition);
693 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
696 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
697 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
698 void print(::mlir::OpAsmPrinter &_odsPrinter);
736template <
typename RangeT>
738 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
741 EnsureConstrainOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
747 template <
typename LateInst = EnsureConstrainOp,
typename = std::enable_if_t<std::is_same_v<LateInst, EnsureConstrainOp>>>
756 return {std::next(odsOperands.begin(), valueRange.first),
757 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
776 ::llvm::LogicalResult
verify(::mlir::Location loc);
778class EnsureConstrainOp :
public ::mlir::Op<EnsureConstrainOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::llzk::HasAncestor<::llzk::verif::ContractOp>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::MemoryEffectOpInterface::Trait, ::llzk::verif::ConditionOpInterface::Trait, ::llzk::verif::PostconditionOpInterface::Trait> {
783 template <
typename RangeT>
791 return ::llvm::StringLiteral(
"verif.ensure_constrain");
800 return {std::next(getOperation()->operand_begin(), valueRange.first),
801 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
805 return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*
getODSOperands(0).begin());
810 return getOperation()->getOpOperand(range.first);
819 return {std::next(getOperation()->result_begin(), valueRange.first),
820 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
823 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition);
824 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition);
825 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
828 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
829 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
830 void print(::mlir::OpAsmPrinter &_odsPrinter);
852 auto &propStorage = this->callee;
853 return ::llvm::cast<::mlir::SymbolRefAttr>(propStorage);
855 void setCallee(const ::mlir::SymbolRefAttr &propValue) {
856 this->callee = propValue;
862 auto &propStorage = this->mapOpGroupSizes;
863 return ::llvm::cast<::mlir::DenseI32ArrayAttr>(propStorage);
866 this->mapOpGroupSizes = propValue;
872 auto &propStorage = this->numDimsPerMap;
873 return ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(propStorage);
876 this->numDimsPerMap = propValue;
882 auto &propStorage = this->templateParams;
883 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage);
886 this->templateParams = propValue;
891 auto &propStorage = this->operandSegmentSizes;
895 auto &propStorage = this->operandSegmentSizes;
896 ::llvm::copy(propValue, propStorage.begin());
900 rhs.
callee == this->callee &&
908 return !(*
this == rhs);
933 auto attr = ::llvm::cast<::mlir::SymbolRefAttr>(
getProperties().callee);
939 auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(
getProperties().templateParams);
947 auto attr = ::llvm::cast<::mlir::DenseI32ArrayAttr>(
getProperties().mapOpGroupSizes);
954template <
typename RangeT>
956 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
967 template <
typename LateInst = IncludeOp,
typename = std::enable_if_t<std::is_same_v<LateInst, IncludeOp>>>
976 return {std::next(odsOperands.begin(), valueRange.first),
977 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
988 ::llvm::SmallVector<RangeT> tblgenTmpOperandGroups;
989 for (
int i = 0, e = sizes.size(); i < e; ++i) {
990 tblgenTmpOperandGroups.push_back(tblgenTmpOperands.take_front(sizes[i]));
991 tblgenTmpOperands = tblgenTmpOperands.drop_front(sizes[i]);
993 return tblgenTmpOperandGroups;
1008 ::llvm::LogicalResult
verify(::mlir::Location loc);
1010class IncludeOp :
public ::mlir::Op<IncludeOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::VariadicOperands, ::mlir::OpTrait::AttrSizedOperandSegments, ::llzk::VerifySizesForMultiAffineOps<1>::Impl, ::llzk::HasAncestor<::llzk::verif::ContractOp>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::MemRefsNormalizable, ::mlir::CallOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait> {
1015 template <
typename RangeT>
1020 static ::llvm::StringRef attrNames[] = {::llvm::StringRef(
"callee"), ::llvm::StringRef(
"mapOpGroupSizes"), ::llvm::StringRef(
"numDimsPerMap"), ::llvm::StringRef(
"templateParams"), ::llvm::StringRef(
"operandSegmentSizes")};
1021 return ::llvm::ArrayRef(attrNames);
1025 return getAttributeNameForIndex(0);
1029 return getAttributeNameForIndex(name, 0);
1033 return getAttributeNameForIndex(1);
1037 return getAttributeNameForIndex(name, 1);
1041 return getAttributeNameForIndex(2);
1045 return getAttributeNameForIndex(name, 2);
1049 return getAttributeNameForIndex(3);
1053 return getAttributeNameForIndex(name, 3);
1057 return (*this)->getName().getAttributeNames().back();
1061 return name.getAttributeNames().back();
1065 return ::llvm::StringLiteral(
"verif.include");
1071 return {std::next(getOperation()->operand_begin(), valueRange.first),
1072 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1091 return {std::next(getOperation()->result_begin(), valueRange.first),
1092 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1095 static ::llvm::LogicalResult
setPropertiesFromAttr(
Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1098 static std::optional<mlir::Attribute>
getInherentAttr(::mlir::MLIRContext *ctx,
const Properties &prop, llvm::StringRef name);
1101 static ::llvm::LogicalResult
verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1102 static ::llvm::LogicalResult
readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
1105 return ::llvm::cast<::mlir::SymbolRefAttr>(getProperties().callee);
1110 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().templateParams);
1115 return ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(getProperties().numDimsPerMap);
1120 return ::llvm::cast<::mlir::DenseI32ArrayAttr>(getProperties().mapOpGroupSizes);
1125 getProperties().callee = attr;
1129 getProperties().templateParams = attr;
1133 getProperties().numDimsPerMap = attr;
1138 getProperties().mapOpGroupSizes = attr;
1143 auto &attr = getProperties().templateParams;
1148 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::SymbolRefAttr callee, ::mlir::ValueRange argOperands = {}, ::llvm::ArrayRef<::mlir::Attribute> templateParams = {});
1149 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::SymbolRefAttr callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap, ::mlir::ValueRange argOperands = {}, ::llvm::ArrayRef<::mlir::Attribute> templateParams = {});
1150 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::SymbolRefAttr callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::llvm::ArrayRef<int32_t> numDimsPerMap, ::mlir::ValueRange argOperands = {}, ::llvm::ArrayRef<::mlir::Attribute> templateParams = {});
1151 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::verif::ContractOp callee, ::mlir::ValueRange argOperands = {}, ::llvm::ArrayRef<::mlir::Attribute> templateParams = {});
1152 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::verif::ContractOp callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap, ::mlir::ValueRange argOperands = {}, ::llvm::ArrayRef<::mlir::Attribute> templateParams = {});
1153 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::verif::ContractOp callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::llvm::ArrayRef<int32_t> numDimsPerMap, ::mlir::ValueRange argOperands = {}, ::llvm::ArrayRef<::mlir::Attribute> templateParams = {});
1159 ::llvm::LogicalResult
verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
1160 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1162 void print(::mlir::OpAsmPrinter &_odsPrinter);
1164 ::mlir::StringAttr getAttributeNameForIndex(
unsigned index) {
1165 return getAttributeNameForIndex((*this)->getName(), index);
1168 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name,
unsigned index) {
1169 assert(index < 4 &&
"invalid attribute index");
1170 assert(name.getStringRef() ==
getOperationName() &&
"invalid operation name");
1171 assert(name.isRegistered() &&
"Operation isn't registered, missing a "
1172 "dependent dialect loading?");
1173 return name.getAttributeNames()[index];
1201 ::mlir::FailureOr<::llzk::SymbolLookupResult<::llzk::verif::ContractOp>>
1206 static ::llvm::SmallVector<::mlir::ValueRange>
toVectorOfValueRange(::mlir::OperandRangeRange);
1221 ::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp>> targetParamDefs
1233 ::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp>> targetParamDefs,
1272template <
typename RangeT>
1274 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
1277 RequireComputeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
1283 template <
typename LateInst = RequireComputeOp,
typename = std::enable_if_t<std::is_same_v<LateInst, RequireComputeOp>>>
1292 return {std::next(odsOperands.begin(), valueRange.first),
1293 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
1312 ::llvm::LogicalResult
verify(::mlir::Location loc);
1314class RequireComputeOp :
public ::mlir::Op<RequireComputeOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::llzk::HasAncestor<::llzk::verif::ContractOp>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::MemoryEffectOpInterface::Trait, ::llzk::verif::ConditionOpInterface::Trait, ::llzk::verif::PreconditionOpInterface::Trait> {
1319 template <
typename RangeT>
1327 return ::llvm::StringLiteral(
"verif.require_compute");
1336 return {std::next(getOperation()->operand_begin(), valueRange.first),
1337 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1341 return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*
getODSOperands(0).begin());
1346 return getOperation()->getOpOperand(range.first);
1355 return {std::next(getOperation()->result_begin(), valueRange.first),
1356 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1359 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition);
1360 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition);
1361 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1364 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
1365 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1366 void print(::mlir::OpAsmPrinter &_odsPrinter);
1404template <
typename RangeT>
1406 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
1409 RequireConstrainOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
1415 template <
typename LateInst = RequireConstrainOp,
typename = std::enable_if_t<std::is_same_v<LateInst, RequireConstrainOp>>>
1424 return {std::next(odsOperands.begin(), valueRange.first),
1425 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
1444 ::llvm::LogicalResult
verify(::mlir::Location loc);
1446class RequireConstrainOp :
public ::mlir::Op<RequireConstrainOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::llzk::HasAncestor<::llzk::verif::ContractOp>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::MemoryEffectOpInterface::Trait, ::llzk::verif::ConditionOpInterface::Trait, ::llzk::verif::PreconditionOpInterface::Trait> {
1451 template <
typename RangeT>
1459 return ::llvm::StringLiteral(
"verif.require_constrain");
1468 return {std::next(getOperation()->operand_begin(), valueRange.first),
1469 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1473 return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*
getODSOperands(0).begin());
1478 return getOperation()->getOpOperand(range.first);
1487 return {std::next(getOperation()->result_begin(), valueRange.first),
1488 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1491 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition);
1492 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value condition);
1493 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1496 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
1497 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1498 void print(::mlir::OpAsmPrinter &_odsPrinter);
ContractEndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
ContractEndOpAdaptor(ContractEndOp op)
ContractEndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
ContractEndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
RangeT getODSOperands(unsigned index)
ContractEndOpGenericAdaptor(RangeT values, const ContractEndOpGenericAdaptorBase &base)
ContractEndOpGenericAdaptor(RangeT values, LateInst op)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
static constexpr ::llvm::StringLiteral getOperationName()
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::llvm::LogicalResult verifyInvariantsImpl()
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
::llvm::LogicalResult verifyInvariants()
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
::mlir::Operation::operand_range getODSOperands(unsigned index)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState)
ContractEndOpGenericAdaptor< RangeT > GenericAdaptor
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
void print(::mlir::OpAsmPrinter &_odsPrinter)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
ContractEndOpAdaptor Adaptor
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
ContractOpAdaptor(ContractOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
ContractOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
ContractOpGenericAdaptor(RangeT values, const ContractOpGenericAdaptorBase &base)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
ContractOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
RangeT getODSOperands(unsigned index)
ContractOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
ContractOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
ContractOpGenericAdaptor(RangeT values, LateInst op)
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::StringAttr getFunctionTypeAttrName()
::llvm::LogicalResult verifyRegions()
void setSymNameAttr(::mlir::StringAttr attr)
ContractOpAdaptor Adaptor
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
void setArgNameAttr(unsigned index, const ::mlir::StringAttr &attr)
Set the function.arg_name attribute for the argument at the given index.
::mlir::FailureOr< SymbolLookupResult< function::FuncDefOp > > getFuncTarget(::mlir::SymbolTableCollection &tables)
Return the FuncDefOp that this contract targets, or failure if it does not target a function or the f...
void setTargetAttr(::mlir::SymbolRefAttr attr)
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
bool hasArgName(unsigned index)
Return true iff the argument at the given index has a function.arg_name attribute.
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
static llvm::hash_code computePropertiesHash(const Properties &prop)
::llvm::ArrayRef<::mlir::Type > getResultTypes()
Required by FunctionOpInterface.
bool hasArgPublicAttr(unsigned index)
Return true iff the argument at the given index has pub attribute.
void cloneInto(ContractOp dest, ::mlir::IRMapping &mapper)
Clone the internal blocks and attributes from this contract into dest.
static constexpr ::llvm::StringLiteral getOperationName()
void setFunctionTypeAttr(::mlir::TypeAttr attr)
::mlir::StringAttr getTargetAttrName()
void setFunctionType(::mlir::FunctionType attrValue)
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
::mlir::StringAttr getSymNameAttr()
::llvm::LogicalResult verifyInvariants()
::llvm::LogicalResult verify()
void print(::mlir::OpAsmPrinter &p)
::std::optional< ::mlir::ArrayAttr > getArgAttrs()
::mlir::FunctionType getFunctionType()
void setArgName(unsigned index, ::llvm::StringRef name)
Set the function.arg_name attribute for the argument at the given index from a string.
::mlir::Attribute removeArgAttrsAttr()
ContractOp clone(::mlir::IRMapping &mapper)
Create a deep copy of this contract and all of its blocks, remapping any operands that use values out...
::mlir::StringAttr getSymNameAttrName()
bool hasStructTarget()
Return true iff the contract targets a struct type.
::std::optional<::mlir::StringAttr > getArgNameAttr(unsigned index)
Return the function.arg_name attribute for the argument at the given index.
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
::llvm::ArrayRef<::mlir::Type > getArgumentTypes()
Required by FunctionOpInterface.
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::Region & getBody()
void setArgAttrsAttr(::mlir::ArrayAttr attr)
::mlir::StringAttr getArgAttrsAttrName()
::mlir::StringAttr getArgAttrsAttrName(::mlir::OperationName name)
::mlir::TypeAttr getFunctionTypeAttr()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
::mlir::FailureOr< SymbolLookupResult< component::StructDefOp > > getStructTarget(::mlir::SymbolTableCollection &tables)
Return the StructDefOp that this contract targets, or failure if it does not target a struct or the s...
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::mlir::StringAttr getFunctionTypeAttrName(::mlir::OperationName name)
::mlir::Region * getCallableRegion()
Required by FunctionOpInterface.
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef name, llvm::StringRef target)
::mlir::SymbolRefAttr getTargetAttr()
::mlir::Operation::operand_range getODSOperands(unsigned index)
::mlir::SymbolRefAttr getFullyQualifiedName(bool requireParent=true)
Return the full name for this contract from the root module, including all surrounding symbol table n...
::llvm::LogicalResult verifyInvariantsImpl()
::mlir::FailureOr<::mlir::Value > getSelfValue()
Return the "self" value (i.e.
::mlir::ArrayAttr getArgAttrsAttr()
void writeProperties(::mlir::DialectBytecodeWriter &writer)
void setSymName(::llvm::StringRef attrValue)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::SymbolRefAttr getTarget()
FoldAdaptor::Properties Properties
::mlir::FailureOr< SymbolLookupResult< component::StructDefOp > > getStructTarget()
::mlir::FailureOr< SymbolLookupResult< function::FuncDefOp > > getFuncTarget()
::mlir::StringAttr getSymNameAttrName(::mlir::OperationName name)
ContractOpGenericAdaptor< RangeT > GenericAdaptor
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, ::mlir::SymbolRefAttr target, ::mlir::TypeAttr function_type, ::mlir::ArrayAttr arg_attrs={})
bool hasFuncTarget()
Return true iff the contract targets a function.
::llvm::StringRef getSymName()
::mlir::StringAttr getTargetAttrName(::mlir::OperationName name)
bool isDeclaration()
Required by SymbolOpInterface.
EnsureComputeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
EnsureComputeOpAdaptor(EnsureComputeOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
EnsureComputeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
EnsureComputeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
EnsureComputeOpGenericAdaptor(RangeT values, const EnsureComputeOpGenericAdaptorBase &base)
EnsureComputeOpGenericAdaptor(RangeT values, LateInst op)
RangeT getODSOperands(unsigned index)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::mlir::OpOperand & getConditionMutable()
::llvm::LogicalResult verifyInvariants()
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
EnsureComputeOpAdaptor Adaptor
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
static constexpr ::llvm::StringLiteral getOperationName()
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::Operation::operand_range getODSOperands(unsigned index)
::mlir::Operation::result_range getODSResults(unsigned index)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition)
EnsureComputeOpGenericAdaptor< RangeT > GenericAdaptor
::llvm::LogicalResult verifyInvariantsImpl()
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
::mlir::TypedValue<::mlir::IntegerType > getCondition()
::llvm::LogicalResult verify(::mlir::Location loc)
EnsureConstrainOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
EnsureConstrainOpAdaptor(EnsureConstrainOp op)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
EnsureConstrainOpGenericAdaptor(RangeT values, LateInst op)
EnsureConstrainOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
EnsureConstrainOpGenericAdaptor(RangeT values, const EnsureConstrainOpGenericAdaptorBase &base)
EnsureConstrainOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
RangeT getODSOperands(unsigned index)
::mlir::OpOperand & getConditionMutable()
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
EnsureConstrainOpAdaptor Adaptor
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
::mlir::Operation::operand_range getODSOperands(unsigned index)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
static constexpr ::llvm::StringLiteral getOperationName()
EnsureConstrainOpGenericAdaptor< RangeT > GenericAdaptor
::llvm::LogicalResult verifyInvariants()
void print(::mlir::OpAsmPrinter &_odsPrinter)
::llvm::LogicalResult verifyInvariantsImpl()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::TypedValue<::mlir::IntegerType > getCondition()
::llvm::LogicalResult verify(::mlir::Location loc)
IncludeOpAdaptor(IncludeOp op)
IncludeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
IncludeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs)
::llvm::SmallVector< RangeT > getMapOperands()
IncludeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
IncludeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
IncludeOpGenericAdaptor(RangeT values, LateInst op)
RangeT getODSOperands(unsigned index)
IncludeOpGenericAdaptor(RangeT values, const IncludeOpGenericAdaptorBase &base)
void setNumDimsPerMap(::llvm::ArrayRef< int32_t > attrValue)
::mlir::LogicalResult verifyTemplateParamCompatibility(::mlir::Attribute paramFromCallOp, ::llzk::polymorphic::TemplateParamOp targetParam)
Check type compatibility of the given template parameter value from this CallOp against the declared ...
::mlir::MutableOperandRange getArgOperandsMutable()
::mlir::StringAttr getMapOpGroupSizesAttrName(::mlir::OperationName name)
::mlir::ArrayAttr getTemplateParamsAttr()
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::llvm::LogicalResult verifyInvariantsImpl()
static llvm::hash_code computePropertiesHash(const Properties &prop)
::mlir::Operation::operand_range getODSOperands(unsigned index)
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
void setMapOpGroupSizes(::llvm::ArrayRef< int32_t > attrValue)
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
::mlir::OperandRangeRange getMapOperands()
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
void setNumDimsPerMapAttr(::mlir::DenseI32ArrayAttr attr)
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
void writeProperties(::mlir::DialectBytecodeWriter &writer)
::mlir::StringAttr getNumDimsPerMapAttrName(::mlir::OperationName name)
::mlir::SymbolRefAttr getCalleeAttr()
FoldAdaptor::Properties Properties
void setMapOpGroupSizesAttr(::mlir::DenseI32ArrayAttr attr)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::mlir::Operation::operand_range getArgOperands()
void setCalleeAttr(::mlir::SymbolRefAttr attr)
::mlir::FailureOr<::llzk::SymbolLookupResult<::llzk::verif::ContractOp > > getCalleeTarget(::mlir::SymbolTableCollection &tables)
Resolve and return the target Contract for this CallOp.
::mlir::Operation * resolveCallable()
Required by CallOpInterface.
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::mlir::SymbolRefAttr getCallee()
::mlir::StringAttr getCalleeAttrName()
::mlir::StringAttr getTemplateParamsAttrName(::mlir::OperationName name)
::mlir::StringAttr getMapOpGroupSizesAttrName()
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name)
::mlir::Value getSelfValue()
Return the "self" value (i.e.
::mlir::MutableOperandRangeRange getMapOperandsMutable()
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
::mlir::StringAttr getOperandSegmentSizesAttrName()
::std::optional< ::mlir::ArrayAttr > getTemplateParams()
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
void setCalleeFromCallable(::mlir::CallInterfaceCallable callee)
Set the callee for this operation.
bool contractTargetsStruct()
Return true iff the contract targets a struct type.
::mlir::Operation::result_range getODSResults(unsigned index)
void setTemplateParamsAttr(::mlir::ArrayAttr attr)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::SymbolRefAttr callee, ::mlir::ValueRange argOperands={}, ::llvm::ArrayRef<::mlir::Attribute > templateParams={})
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::StringAttr getCalleeAttrName(::mlir::OperationName name)
::mlir::LogicalResult verifyTemplateParamCompatibility(::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp > > targetParamDefs)
Check type compatibility of each template parameter value provided in this CallOp against the declare...
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties)
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
::mlir::FunctionType getTypeSignature()
Return the FunctionType inferred from the arg operands of this CallOp.
::mlir::Attribute removeTemplateParamsAttr()
::mlir::LogicalResult verifyTemplateParamsMatchInferred(::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp > > targetParamDefs, const UnificationMap &unifications)
Verify that each template parameter value provided in this CallOp is consistent with the value inferr...
::mlir::StringAttr getNumDimsPerMapAttrName()
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
::llvm::LogicalResult verifyInvariants()
::mlir::FailureOr< UnificationMap > unifyTypeSignature(::mlir::FunctionType other)
Attempt type unfication between the inferred FunctionType from this CallOp (as LHS) and the given Fun...
::mlir::Operation * resolveCallableInTable(::mlir::SymbolTableCollection *symbolTable)
Required by CallOpInterface.
IncludeOpGenericAdaptor< RangeT > GenericAdaptor
static ::llvm::SmallVector<::mlir::ValueRange > toVectorOfValueRange(::mlir::OperandRangeRange)
Allocate consecutive storage of the ValueRange instances in the parameter so it can be passed to the ...
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::SymbolRefAttr callee, ::llvm::ArrayRef<::mlir::ValueRange > mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap, ::mlir::ValueRange argOperands={}, ::llvm::ArrayRef<::mlir::Attribute > templateParams={})
static constexpr ::llvm::StringLiteral getOperationName()
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
::mlir::CallInterfaceCallable getCallableForCallee()
Return the callee of this operation.
::mlir::StringAttr getTemplateParamsAttrName()
RequireComputeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
RequireComputeOpAdaptor(RequireComputeOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
RequireComputeOpGenericAdaptor(RangeT values, LateInst op)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
RequireComputeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
RequireComputeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
RangeT getODSOperands(unsigned index)
RequireComputeOpGenericAdaptor(RangeT values, const RequireComputeOpGenericAdaptorBase &base)
RequireComputeOpAdaptor Adaptor
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
static constexpr ::llvm::StringLiteral getOperationName()
RequireComputeOpGenericAdaptor< RangeT > GenericAdaptor
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::llvm::LogicalResult verifyInvariantsImpl()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::llvm::LogicalResult verifyInvariants()
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
::mlir::TypedValue<::mlir::IntegerType > getCondition()
::mlir::Operation::operand_range getODSOperands(unsigned index)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition)
::mlir::Operation::result_range getODSResults(unsigned index)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::OpOperand & getConditionMutable()
RequireConstrainOpAdaptor(RequireConstrainOp op)
RequireConstrainOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
RangeT getODSOperands(unsigned index)
RequireConstrainOpGenericAdaptor(RangeT values, LateInst op)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
RequireConstrainOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
RequireConstrainOpGenericAdaptor(RangeT values, const RequireConstrainOpGenericAdaptorBase &base)
RequireConstrainOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
::mlir::OpOperand & getConditionMutable()
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
RequireConstrainOpAdaptor Adaptor
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
::mlir::Operation::result_range getODSResults(unsigned index)
::llvm::LogicalResult verifyInvariants()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::mlir::TypedValue<::mlir::IntegerType > getCondition()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
RequireConstrainOpGenericAdaptor< RangeT > GenericAdaptor
::llvm::LogicalResult verifyInvariantsImpl()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value condition)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
static constexpr ::llvm::StringLiteral getOperationName()
::mlir::Operation::operand_range getODSOperands(unsigned index)
void print(::mlir::OpAsmPrinter &_odsPrinter)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
ContractEndOpGenericAdaptorBase(::mlir::Operation *op)
::std::optional<::mlir::OperationName > odsOpName
ContractEndOpGenericAdaptorBase(::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::mlir::DictionaryAttr getAttributes()
::mlir::RegionRange odsRegions
::mlir::DictionaryAttr odsAttrs
::mlir::FunctionType getFunctionType()
::mlir::TypeAttr getFunctionTypeAttr()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::llvm::StringRef getSymName()
::std::optional<::mlir::OperationName > odsOpName
::mlir::DictionaryAttr getAttributes()
const Properties & getProperties()
ContractOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::ArrayAttr getArgAttrsAttr()
::mlir::DictionaryAttr odsAttrs
::mlir::SymbolRefAttr getTargetAttr()
::std::optional< ::mlir::ArrayAttr > getArgAttrs()
::mlir::StringAttr getSymNameAttr()
::mlir::Region & getBody()
::mlir::SymbolRefAttr getTarget()
::mlir::RegionRange getRegions()
::mlir::RegionRange odsRegions
::mlir::DictionaryAttr odsAttrs
EnsureComputeOpGenericAdaptorBase(::mlir::Operation *op)
EnsureComputeOpGenericAdaptorBase(::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::std::optional<::mlir::OperationName > odsOpName
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::DictionaryAttr getAttributes()
::mlir::RegionRange odsRegions
::std::optional<::mlir::OperationName > odsOpName
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::RegionRange odsRegions
EnsureConstrainOpGenericAdaptorBase(::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
EnsureConstrainOpGenericAdaptorBase(::mlir::Operation *op)
::mlir::DictionaryAttr getAttributes()
::mlir::DictionaryAttr odsAttrs
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
::mlir::RegionRange odsRegions
::mlir::SymbolRefAttr getCalleeAttr()
::std::optional<::mlir::OperationName > odsOpName
::mlir::ArrayAttr getTemplateParamsAttr()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::SymbolRefAttr getCallee()
::mlir::DictionaryAttr getAttributes()
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
const Properties & getProperties()
::std::optional< ::mlir::ArrayAttr > getTemplateParams()
IncludeOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
::mlir::DictionaryAttr odsAttrs
RequireComputeOpGenericAdaptorBase(::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
RequireComputeOpGenericAdaptorBase(::mlir::Operation *op)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::std::optional<::mlir::OperationName > odsOpName
::mlir::DictionaryAttr getAttributes()
::mlir::DictionaryAttr odsAttrs
::mlir::RegionRange odsRegions
::mlir::RegionRange odsRegions
::mlir::DictionaryAttr getAttributes()
::mlir::DictionaryAttr odsAttrs
RequireConstrainOpGenericAdaptorBase(::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::std::optional<::mlir::OperationName > odsOpName
RequireConstrainOpGenericAdaptorBase(::mlir::Operation *op)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
mlir::DenseMap< std::pair< mlir::SymbolRefAttr, Side >, mlir::Attribute > UnificationMap
Optional result from type unifications.
llvm::StringLiteral getOperationName()
Get the operation name, like "constrain.eq" for the given OpClass.
bool operator==(const Properties &rhs) const
::mlir::StringAttr sym_nameTy
bool operator!=(const Properties &rhs) const
function_typeTy function_type
::mlir::TypeAttr function_typeTy
::mlir::ArrayAttr arg_attrsTy
void setTarget(const ::mlir::SymbolRefAttr &propValue)
void setFunctionType(const ::mlir::TypeAttr &propValue)
void setSymName(const ::mlir::StringAttr &propValue)
void setArgAttrs(const ::mlir::ArrayAttr &propValue)
::mlir::SymbolRefAttr targetTy
::mlir::DenseI32ArrayAttr mapOpGroupSizesTy
operandSegmentSizesTy operandSegmentSizes
templateParamsTy templateParams
::mlir::DenseI32ArrayAttr numDimsPerMapTy
bool operator==(const Properties &rhs) const
void setMapOpGroupSizes(const ::mlir::DenseI32ArrayAttr &propValue)
::mlir::ArrayAttr templateParamsTy
::mlir::SymbolRefAttr calleeTy
::llvm::ArrayRef< int32_t > getOperandSegmentSizes() const
void setNumDimsPerMap(const ::mlir::DenseI32ArrayAttr &propValue)
auto getMapOpGroupSizes()
bool operator!=(const Properties &rhs) const
numDimsPerMapTy numDimsPerMap
mapOpGroupSizesTy mapOpGroupSizes
std::array< int32_t, 2 > operandSegmentSizesTy
void setOperandSegmentSizes(::llvm::ArrayRef< int32_t > propValue)
void setCallee(const ::mlir::SymbolRefAttr &propValue)
void setTemplateParams(const ::mlir::ArrayAttr &propValue)