86template <
typename RangeT>
88 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
90 static constexpr int odsIndex_addr = 0;
100 template <
typename LateInst = LoadOp,
typename = std::enable_if_t<std::is_same_v<LateInst, LoadOp>>>
109 return {std::next(odsOperands.begin(), valueRange.first),
110 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
129 ::llvm::LogicalResult
verify(::mlir::Location loc);
131class LoadOp :
public ::mlir::Op<LoadOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::llzk::felt::FeltType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::llzk::function::WitnessGen, ::mlir::OpTrait::OpInvariants, ::mlir::MemoryEffectOpInterface::Trait> {
136 template <
typename RangeT>
146 return ::llvm::StringLiteral(
"ram.load");
155 return {std::next(getOperation()->operand_begin(), valueRange.first),
156 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
159 ::mlir::TypedValue<::mlir::IndexType>
getAddr() {
160 return ::llvm::cast<::mlir::TypedValue<::mlir::IndexType>>(*
getODSOperands(0).begin());
165 return getOperation()->getOpOperand(range.first);
174 return {std::next(getOperation()->result_begin(), valueRange.first),
175 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
178 ::mlir::TypedValue<::llzk::felt::FeltType>
getVal() {
179 return ::llvm::cast<::mlir::TypedValue<::llzk::felt::FeltType>>(*
getODSResults(0).begin());
182 static ::llvm::LogicalResult
setPropertiesFromAttr(
Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
185 static std::optional<mlir::Attribute>
getInherentAttr(::mlir::MLIRContext *ctx,
const Properties &prop, llvm::StringRef name);
188 static ::llvm::LogicalResult
verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
189 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type val, ::mlir::Value addr);
190 static LoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type val, ::mlir::Value addr);
191 static LoadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type val, ::mlir::Value addr);
192 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr);
193 static LoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr);
194 static LoadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr);
195 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
196 static LoadOp
create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
197 static LoadOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
198 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
199 static LoadOp
create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
200 static LoadOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
203 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
204 void print(::mlir::OpAsmPrinter &_odsPrinter);
205 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
251template <
typename RangeT>
253 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
255 static constexpr int odsIndex_addr = 0;
256 static constexpr int odsIndex_val = 1;
266 template <
typename LateInst = StoreOp,
typename = std::enable_if_t<std::is_same_v<LateInst, StoreOp>>>
275 return {std::next(odsOperands.begin(), valueRange.first),
276 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
299 ::llvm::LogicalResult
verify(::mlir::Location loc);
301class StoreOp :
public ::mlir::Op<StoreOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::llzk::function::WitnessGen, ::mlir::OpTrait::OpInvariants, ::mlir::MemoryEffectOpInterface::Trait> {
306 template <
typename RangeT>
317 return ::llvm::StringLiteral(
"ram.store");
326 return {std::next(getOperation()->operand_begin(), valueRange.first),
327 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
330 ::mlir::TypedValue<::mlir::IndexType>
getAddr() {
331 return ::llvm::cast<::mlir::TypedValue<::mlir::IndexType>>(*
getODSOperands(0).begin());
334 ::mlir::TypedValue<::llzk::felt::FeltType>
getVal() {
335 return ::llvm::cast<::mlir::TypedValue<::llzk::felt::FeltType>>(*
getODSOperands(1).begin());
340 return getOperation()->getOpOperand(range.first);
345 return getOperation()->getOpOperand(range.first);
354 return {std::next(getOperation()->result_begin(), valueRange.first),
355 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
358 static ::llvm::LogicalResult
setPropertiesFromAttr(
Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
361 static std::optional<mlir::Attribute>
getInherentAttr(::mlir::MLIRContext *ctx,
const Properties &prop, llvm::StringRef name);
364 static ::llvm::LogicalResult
verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
365 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, ::mlir::Value val);
366 static StoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, ::mlir::Value val);
367 static StoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr, ::mlir::Value val);
368 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value val);
369 static StoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value val);
370 static StoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::Value val);
371 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
372 static StoreOp
create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
373 static StoreOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
374 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
375 static StoreOp
create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
376 static StoreOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
379 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
380 void print(::mlir::OpAsmPrinter &_odsPrinter);
381 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
LoadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
LoadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
LoadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
RangeT getODSOperands(unsigned index)
LoadOpGenericAdaptor(RangeT values, LateInst op)
LoadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
LoadOpGenericAdaptor(RangeT values, const LoadOpGenericAdaptorBase &base)
static llvm::hash_code computePropertiesHash(const Properties &prop)
LoadOpGenericAdaptor< RangeT > GenericAdaptor
static LoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type val, ::mlir::Value addr)
::llvm::LogicalResult verifyInvariants()
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
::llvm::LogicalResult verifyInvariantsImpl()
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::mlir::OpOperand & getAddrMutable()
void print(::mlir::OpAsmPrinter &_odsPrinter)
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
static constexpr ::llvm::StringLiteral getOperationName()
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
FoldAdaptor::Properties Properties
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::TypedValue<::llzk::felt::FeltType > getVal()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::mlir::TypedValue<::mlir::IndexType > getAddr()
::mlir::Operation::operand_range getODSOperands(unsigned index)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type val, ::mlir::Value addr)
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static constexpr int odsIndex_addr
::llvm::LogicalResult verify(::mlir::Location loc)
StoreOpAdaptor(StoreOp op)
StoreOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
StoreOpGenericAdaptor(RangeT values, LateInst op)
StoreOpGenericAdaptor(RangeT values, const StoreOpGenericAdaptorBase &base)
StoreOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
StoreOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
RangeT getODSOperands(unsigned index)
StoreOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, ::mlir::Value val)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static llvm::hash_code computePropertiesHash(const Properties &prop)
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::TypedValue<::llzk::felt::FeltType > getVal()
static constexpr ::llvm::StringLiteral getOperationName()
static constexpr int odsIndex_addr
StoreOpGenericAdaptor< RangeT > GenericAdaptor
::mlir::OpOperand & getAddrMutable()
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::mlir::Operation::operand_range getODSOperands(unsigned index)
static StoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, ::mlir::Value val)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::mlir::OpOperand & getValMutable()
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::TypedValue<::mlir::IndexType > getAddr()
static constexpr int odsIndex_val
::llvm::LogicalResult verifyInvariants()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
FoldAdaptor::Properties Properties
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::llvm::LogicalResult verifyInvariantsImpl()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::mlir::Operation::result_range getODSResults(unsigned index)
LoadOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::DictionaryAttr odsAttrs
::mlir::DictionaryAttr getAttributes()
const Properties & getProperties()
::mlir::RegionRange odsRegions
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::EmptyProperties Properties
::std::optional<::mlir::OperationName > odsOpName
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::DictionaryAttr odsAttrs
::mlir::EmptyProperties Properties
::mlir::RegionRange odsRegions
::mlir::DictionaryAttr getAttributes()
::std::optional<::mlir::OperationName > odsOpName
StoreOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
const Properties & getProperties()