43 auto &propStorage = this->callee;
44 return ::llvm::cast<::mlir::SymbolRefAttr>(propStorage);
46 void setCallee(const ::mlir::SymbolRefAttr &propValue) {
47 this->callee = propValue;
53 auto &propStorage = this->mapOpGroupSizes;
54 return ::llvm::cast<::mlir::DenseI32ArrayAttr>(propStorage);
57 this->mapOpGroupSizes = propValue;
63 auto &propStorage = this->numDimsPerMap;
64 return ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(propStorage);
67 this->numDimsPerMap = propValue;
72 auto &propStorage = this->operandSegmentSizes;
76 auto &propStorage = this->operandSegmentSizes;
77 ::llvm::copy(propValue, propStorage.begin());
81 rhs.
callee == this->callee &&
88 return !(*
this == rhs);
113 auto attr = ::llvm::cast<::mlir::SymbolRefAttr>(
getProperties().callee);
121 auto attr = ::llvm::cast<::mlir::DenseI32ArrayAttr>(
getProperties().mapOpGroupSizes);
128template <
typename RangeT>
130 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
141 template <
typename LateInst = CallOp,
typename = std::enable_if_t<std::is_same_v<LateInst, CallOp>>>
150 return {std::next(odsOperands.begin(), valueRange.first),
151 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
162 ::llvm::SmallVector<RangeT> tblgenTmpOperandGroups;
163 for (
int i = 0, e = sizes.size(); i < e; ++i) {
164 tblgenTmpOperandGroups.push_back(tblgenTmpOperands.take_front(sizes[i]));
165 tblgenTmpOperands = tblgenTmpOperands.drop_front(sizes[i]);
167 return tblgenTmpOperandGroups;
182 ::llvm::LogicalResult
verify(::mlir::Location loc);
184class 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::CallOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait> {
189 template <
typename RangeT>
194 static ::llvm::StringRef attrNames[] = {::llvm::StringRef(
"callee"), ::llvm::StringRef(
"mapOpGroupSizes"), ::llvm::StringRef(
"numDimsPerMap"), ::llvm::StringRef(
"operandSegmentSizes")};
195 return ::llvm::ArrayRef(attrNames);
199 return getAttributeNameForIndex(0);
203 return getAttributeNameForIndex(name, 0);
207 return getAttributeNameForIndex(1);
211 return getAttributeNameForIndex(name, 1);
215 return getAttributeNameForIndex(2);
219 return getAttributeNameForIndex(name, 2);
223 return (*this)->getName().getAttributeNames().back();
227 return name.getAttributeNames().back();
231 return ::llvm::StringLiteral(
"function.call");
237 return {std::next(getOperation()->operand_begin(), valueRange.first),
238 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
254 return {std::next(getOperation()->result_begin(), valueRange.first),
255 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
258 static ::llvm::LogicalResult
setPropertiesFromAttr(
Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
261 static std::optional<mlir::Attribute>
getInherentAttr(::mlir::MLIRContext *ctx,
const Properties &prop, llvm::StringRef name);
264 static ::llvm::LogicalResult
verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
265 static ::llvm::LogicalResult
readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
268 return ::llvm::cast<::mlir::SymbolRefAttr>(getProperties().callee);
273 return ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(getProperties().numDimsPerMap);
278 return ::llvm::cast<::mlir::DenseI32ArrayAttr>(getProperties().mapOpGroupSizes);
283 getProperties().callee = attr;
287 getProperties().numDimsPerMap = attr;
292 getProperties().mapOpGroupSizes = attr;
296 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::SymbolRefAttr callee, ::mlir::ValueRange argOperands = {});
297 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 = {});
298 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 = {});
299 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState,
::llzk::function::FuncDefOp callee, ::mlir::ValueRange argOperands = {});
300 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState,
::llzk::function::FuncDefOp callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap, ::mlir::ValueRange argOperands = {});
301 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 = {});
307 ::llvm::LogicalResult
verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
308 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
310 void print(::mlir::OpAsmPrinter &_odsPrinter);
312 ::mlir::StringAttr getAttributeNameForIndex(
unsigned index) {
313 return getAttributeNameForIndex((*this)->getName(), index);
316 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name,
unsigned index) {
317 assert(index < 3 &&
"invalid attribute index");
318 assert(name.getStringRef() ==
getOperationName() &&
"invalid operation name");
319 assert(name.isRegistered() &&
"Operation isn't registered, missing a "
320 "dependent dialect loading?");
321 return name.getAttributeNames()[index];
359 ::mlir::FailureOr<::llzk::SymbolLookupResult<::llzk::function::FuncDefOp>>
391 auto &propStorage = this->arg_attrs;
392 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage);
395 this->arg_attrs = propValue;
401 auto &propStorage = this->function_type;
402 return ::llvm::cast<::mlir::TypeAttr>(propStorage);
405 this->function_type = propValue;
411 auto &propStorage = this->res_attrs;
412 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage);
415 this->res_attrs = propValue;
421 auto &propStorage = this->sym_name;
422 return ::llvm::cast<::mlir::StringAttr>(propStorage);
425 this->sym_name = propValue;
436 return !(*
this == rhs);
464 auto attr = ::llvm::cast<::mlir::StringAttr>(
getProperties().sym_name);
470 auto attr = ::llvm::cast<::mlir::TypeAttr>(
getProperties().function_type);
476 auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(
getProperties().arg_attrs);
480 ::std::optional< ::mlir::ArrayAttr >
getArgAttrs();
482 auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(
getProperties().res_attrs);
486 ::std::optional< ::mlir::ArrayAttr >
getResAttrs();
497template <
typename RangeT>
499 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
510 template <
typename LateInst = FuncDefOp,
typename = std::enable_if_t<std::is_same_v<LateInst, FuncDefOp>>>
519 return {std::next(odsOperands.begin(), valueRange.first),
520 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
535 ::llvm::LogicalResult
verify(::mlir::Location loc);
537class 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>::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> {
542 template <
typename RangeT>
547 static ::llvm::StringRef attrNames[] = {::llvm::StringRef(
"arg_attrs"), ::llvm::StringRef(
"function_type"), ::llvm::StringRef(
"res_attrs"), ::llvm::StringRef(
"sym_name")};
548 return ::llvm::ArrayRef(attrNames);
552 return getAttributeNameForIndex(0);
556 return getAttributeNameForIndex(name, 0);
560 return getAttributeNameForIndex(1);
564 return getAttributeNameForIndex(name, 1);
568 return getAttributeNameForIndex(2);
572 return getAttributeNameForIndex(name, 2);
576 return getAttributeNameForIndex(3);
580 return getAttributeNameForIndex(name, 3);
584 return ::llvm::StringLiteral(
"function.def");
593 return {std::next(getOperation()->operand_begin(), valueRange.first),
594 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
603 return {std::next(getOperation()->result_begin(), valueRange.first),
604 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
608 return (*this)->getRegion(0);
611 static ::llvm::LogicalResult
setPropertiesFromAttr(
Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
614 static std::optional<mlir::Attribute>
getInherentAttr(::mlir::MLIRContext *ctx,
const Properties &prop, llvm::StringRef name);
617 static ::llvm::LogicalResult
verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
618 static ::llvm::LogicalResult
readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
621 return ::llvm::cast<::mlir::StringAttr>(getProperties().sym_name);
626 return ::llvm::cast<::mlir::TypeAttr>(getProperties().function_type);
631 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().arg_attrs);
634 ::std::optional< ::mlir::ArrayAttr >
getArgAttrs();
636 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().res_attrs);
639 ::std::optional< ::mlir::ArrayAttr >
getResAttrs();
641 getProperties().sym_name = attr;
646 getProperties().function_type = attr;
651 getProperties().arg_attrs = attr;
655 getProperties().res_attrs = attr;
659 auto &attr = getProperties().arg_attrs;
665 auto &attr = getProperties().res_attrs;
670 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 = {});
671 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);
672 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);
673 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);
674 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);
675 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
676 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
677 void print(::mlir::OpAsmPrinter &p);
680 ::llvm::LogicalResult
verify();
681 ::llvm::LogicalResult
verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
683 ::mlir::StringAttr getAttributeNameForIndex(
unsigned index) {
684 return getAttributeNameForIndex((*this)->getName(), index);
687 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name,
unsigned index) {
688 assert(index < 4 &&
"invalid attribute index");
689 assert(name.getStringRef() ==
getOperationName() &&
"invalid operation name");
690 assert(name.isRegistered() &&
"Operation isn't registered, missing a "
691 "dependent dialect loading?");
692 return name.getAttributeNames()[index];
696 static FuncDefOp create(::mlir::Location location, ::llvm::StringRef name, ::mlir::FunctionType type,
697 ::llvm::ArrayRef<::mlir::NamedAttribute> attrs = {});
698 static FuncDefOp create(::mlir::Location location, ::llvm::StringRef name, ::mlir::FunctionType type,
699 ::mlir::Operation::dialect_attr_range attrs);
700 static FuncDefOp create(::mlir::Location location, ::llvm::StringRef name, ::mlir::FunctionType type,
701 ::llvm::ArrayRef<::mlir::NamedAttribute> attrs,
702 ::llvm::ArrayRef<::mlir::DictionaryAttr> argAttrs);
722 return getOperation()->hasAttr(llzk::function::AllowConstraintAttr::name);
730 return getOperation()->hasAttr(llzk::function::AllowWitnessAttr::name);
781 inline bool isInStruct() { return ::llzk::component::isInStruct(*
this); }
835template <
typename RangeT>
837 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
840 ReturnOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
842 ReturnOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) :
ReturnOpGenericAdaptor(values, attrs, (properties ? *properties.as<::
mlir::EmptyProperties *>() : ::
mlir::EmptyProperties{}), regions) {}
846 template <
typename LateInst = ReturnOp,
typename = std::enable_if_t<std::is_same_v<LateInst, ReturnOp>>>
855 return {std::next(odsOperands.begin(), valueRange.first),
856 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
871 ::llvm::LogicalResult
verify(::mlir::Location loc);
873class 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> {
878 template <
typename RangeT>
886 return ::llvm::StringLiteral(
"function.return");
892 return {std::next(getOperation()->operand_begin(), valueRange.first),
893 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
907 return {std::next(getOperation()->result_begin(), valueRange.first),
908 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
911 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
912 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands);
913 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
916 ::llvm::LogicalResult
verify();
918 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
919 void print(::mlir::OpAsmPrinter &_odsPrinter);
920 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::OpaqueProperties properties, ::mlir::RegionRange regions={})
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 getOperandSegmentSizesAttrName()
::mlir::CallInterfaceCallable getCallableForCallee()
Return the callee of this operation.
::mlir::FunctionType getCalleeType()
::llzk::component::StructType getSingleResultTypeOfCompute()
Assuming the callee is FUNC_NAME_COMPUTE, return the single StructType result.
::mlir::SymbolRefAttr getCalleeAttr()
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static llvm::hash_code computePropertiesHash(const Properties &prop)
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::SymbolRefAttr getCallee()
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
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)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
void setMapOpGroupSizes(::llvm::ArrayRef< int32_t > attrValue)
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::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
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)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::SymbolRefAttr callee, ::mlir::ValueRange argOperands={})
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::mlir::MutableOperandRange getArgOperandsMutable()
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
::mlir::Operation::operand_range getArgOperands()
::mlir::Value getSelfValueFromConstrain()
Return the "self" value (i.e.
::llvm::LogicalResult verifyInvariants()
::mlir::StringAttr getMapOpGroupSizesAttrName()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
void print(::mlir::OpAsmPrinter &_odsPrinter)
static constexpr ::llvm::StringLiteral getOperationName()
::mlir::OperandRangeRange getMapOperands()
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 ...
::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::DenseI32ArrayAttr getMapOpGroupSizesAttr()
::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name)
CallOpGenericAdaptor< RangeT > GenericAdaptor
void setNumDimsPerMapAttr(::mlir::DenseI32ArrayAttr attr)
::mlir::StringAttr getNumDimsPerMapAttrName()
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::mlir::MutableOperandRangeRange getMapOperandsMutable()
::mlir::StringAttr getMapOpGroupSizesAttrName(::mlir::OperationName name)
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
::llvm::LogicalResult verifyInvariantsImpl()
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::StringAttr getCalleeAttrName()
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)
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)
FuncDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
::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 llvm::hash_code computePropertiesHash(const Properties &prop)
FoldAdaptor::Properties Properties
::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()
::mlir::Operation::result_range getODSResults(unsigned index)
::llvm::ArrayRef<::mlir::Type > getArgumentTypes()
Returns the argument types of this function.
void setSymNameAttr(::mlir::StringAttr attr)
::mlir::StringAttr getFunctionTypeAttrName()
::llvm::LogicalResult verifyInvariants()
::mlir::Value getSelfValueFromConstrain()
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)
::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)
void cloneInto(FuncDefOp dest, ::mlir::IRMapping &mapper)
Clone the internal blocks and attributes from this function into dest.
::std::optional< ::mlir::ArrayAttr > getArgAttrs()
bool nameIsProduct()
Return true iff the function name is FUNC_NAME_PRODUCT (if needed, a check that this FuncDefOp is loc...
::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)
::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 isStructCompute()
Return true iff the function is within a StructDefOp and named FUNC_NAME_COMPUTE.
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
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)
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
::llvm::ArrayRef<::mlir::Type > getResultTypes()
Returns the result types of this function.
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()
Returns the region on the current operation that is callable.
::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)
ReturnOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
ReturnOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
ReturnOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties 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)
::mlir::Operation::result_range getODSResults(unsigned index)
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
::mlir::Operation::operand_range getODSOperands(unsigned index)
::mlir::MutableOperandRange getMutableSuccessorOperands(::mlir::RegionBranchPoint point)
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::llvm::LogicalResult verify()
static constexpr ::llvm::StringLiteral getOperationName()
::mlir::MutableOperandRange getOperandsMutable()
ReturnOpGenericAdaptor< RangeT > GenericAdaptor
::mlir::Operation::operand_range getOperands()
::llvm::LogicalResult verifyInvariants()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
CallOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::SymbolRefAttr getCallee()
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
::mlir::DictionaryAttr odsAttrs
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
::mlir::DictionaryAttr getAttributes()
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
::mlir::SymbolRefAttr getCalleeAttr()
::std::optional<::mlir::OperationName > odsOpName
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
::mlir::RegionRange odsRegions
const Properties & getProperties()
::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()
::mlir::DictionaryAttr odsAttrs
ReturnOpGenericAdaptorBase(::mlir::Operation *op)
::std::optional<::mlir::OperationName > odsOpName
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::RegionRange odsRegions
::mlir::DictionaryAttr getAttributes()
ReturnOpGenericAdaptorBase(::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
constexpr char FUNC_NAME_COMPUTE[]
Symbol name for the witness generation (and resp.
constexpr char FUNC_NAME_CONSTRAIN[]
constexpr char FUNC_NAME_PRODUCT[]
::mlir::DenseI32ArrayAttr numDimsPerMapTy
auto getMapOpGroupSizes()
bool operator==(const Properties &rhs) const
operandSegmentSizesTy operandSegmentSizes
bool operator!=(const Properties &rhs) const
numDimsPerMapTy numDimsPerMap
mapOpGroupSizesTy mapOpGroupSizes
void setOperandSegmentSizes(::llvm::ArrayRef< int32_t > propValue)
void setNumDimsPerMap(const ::mlir::DenseI32ArrayAttr &propValue)
void setMapOpGroupSizes(const ::mlir::DenseI32ArrayAttr &propValue)
std::array< int32_t, 2 > operandSegmentSizesTy
::mlir::DenseI32ArrayAttr mapOpGroupSizesTy
::mlir::SymbolRefAttr calleeTy
void setCallee(const ::mlir::SymbolRefAttr &propValue)
::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