54template <
typename RangeT>
56 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
59 FeltToIndexOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
65 template <
typename LateInst = FeltToIndexOp,
typename = std::enable_if_t<std::is_same_v<LateInst, FeltToIndexOp>>>
74 return {std::next(odsOperands.begin(), valueRange.first),
75 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
94 ::llvm::LogicalResult
verify(::mlir::Location loc);
96class FeltToIndexOp :
public ::mlir::Op<FeltToIndexOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IndexType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
101 template <
typename RangeT>
109 return ::llvm::StringLiteral(
"cast.toindex");
118 return {std::next(getOperation()->operand_begin(), valueRange.first),
119 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
122 ::mlir::TypedValue<::llzk::felt::FeltType>
getValue() {
123 return ::llvm::cast<::mlir::TypedValue<::llzk::felt::FeltType>>(*
getODSOperands(0).begin());
128 return getOperation()->getOpOperand(range.first);
137 return {std::next(getOperation()->result_begin(), valueRange.first),
138 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
142 return ::llvm::cast<::mlir::TypedValue<::mlir::IndexType>>(*
getODSResults(0).begin());
145 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value value);
146 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value value);
147 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
150 ::llvm::LogicalResult
verify();
151 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
152 void print(::mlir::OpAsmPrinter &_odsPrinter);
153 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
191template <
typename RangeT>
193 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
196 IntToFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
202 template <
typename LateInst = IntToFeltOp,
typename = std::enable_if_t<std::is_same_v<LateInst, IntToFeltOp>>>
211 return {std::next(odsOperands.begin(), valueRange.first),
212 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
231 ::llvm::LogicalResult
verify(::mlir::Location loc);
233class IntToFeltOp :
public ::mlir::Op<IntToFeltOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::llzk::felt::FeltType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
238 template <
typename RangeT>
246 return ::llvm::StringLiteral(
"cast.tofelt");
255 return {std::next(getOperation()->operand_begin(), valueRange.first),
256 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
260 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*
getODSOperands(0).begin());
265 return getOperation()->getOpOperand(range.first);
274 return {std::next(getOperation()->result_begin(), valueRange.first),
275 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
278 ::mlir::TypedValue<::llzk::felt::FeltType>
getResult() {
279 return ::llvm::cast<::mlir::TypedValue<::llzk::felt::FeltType>>(*
getODSResults(0).begin());
282 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value value);
283 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value value);
284 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
287 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
288 void print(::mlir::OpAsmPrinter &_odsPrinter);
289 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
::llvm::LogicalResult verify(::mlir::Location loc)
FeltToIndexOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
FeltToIndexOpAdaptor(FeltToIndexOp op)
FeltToIndexOpGenericAdaptor(RangeT values, LateInst op)
FeltToIndexOpGenericAdaptor(RangeT values, const FeltToIndexOpGenericAdaptorBase &base)
FeltToIndexOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
FeltToIndexOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
RangeT getODSOperands(unsigned index)
::llvm::LogicalResult verifyInvariants()
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::llvm::LogicalResult verify()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value value)
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
::mlir::OpOperand & getValueMutable()
::mlir::TypedValue<::llzk::felt::FeltType > getValue()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::TypedValue<::mlir::IndexType > getResult()
::mlir::Operation::result_range getODSResults(unsigned index)
FeltToIndexOpAdaptor Adaptor
FeltToIndexOpGenericAdaptor< RangeT > GenericAdaptor
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::Operation::operand_range getODSOperands(unsigned index)
::llvm::LogicalResult verifyInvariantsImpl()
static constexpr ::llvm::StringLiteral getOperationName()
::llvm::LogicalResult verify(::mlir::Location loc)
IntToFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
IntToFeltOpAdaptor(IntToFeltOp op)
IntToFeltOpGenericAdaptor(RangeT values, LateInst op)
IntToFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
IntToFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
IntToFeltOpGenericAdaptor(RangeT values, const IntToFeltOpGenericAdaptorBase &base)
RangeT getODSOperands(unsigned index)
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
void print(::mlir::OpAsmPrinter &_odsPrinter)
::llvm::LogicalResult verifyInvariantsImpl()
static constexpr ::llvm::StringLiteral getOperationName()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
IntToFeltOpAdaptor Adaptor
::mlir::Operation::operand_range getODSOperands(unsigned index)
::mlir::TypedValue<::llzk::felt::FeltType > getResult()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
IntToFeltOpGenericAdaptor< RangeT > GenericAdaptor
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value value)
::mlir::Operation::result_range getODSResults(unsigned index)
::llvm::LogicalResult verifyInvariants()
::mlir::TypedValue<::mlir::Type > getValue()
::mlir::OpOperand & getValueMutable()
FeltToIndexOpGenericAdaptorBase(::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::mlir::RegionRange odsRegions
::std::optional<::mlir::OperationName > odsOpName
::mlir::DictionaryAttr odsAttrs
::mlir::DictionaryAttr getAttributes()
FeltToIndexOpGenericAdaptorBase(::mlir::Operation *op)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::std::optional<::mlir::OperationName > odsOpName
::mlir::DictionaryAttr odsAttrs
::mlir::RegionRange odsRegions
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
IntToFeltOpGenericAdaptorBase(::mlir::Operation *op)
::mlir::DictionaryAttr getAttributes()
IntToFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})