86 auto &propStorage = this->overflow;
87 return ::llvm::dyn_cast_or_null<::llzk::cast::OverflowSemanticsAttr>(propStorage);
89 void setOverflow(const ::llzk::cast::OverflowSemanticsAttr &propValue) {
90 this->overflow = propValue;
98 return !(*
this == rhs);
130template <
typename RangeT>
132 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
134 static constexpr int odsIndex_value = 0;
144 template <
typename LateInst = FeltToIndexOp,
typename = std::enable_if_t<std::is_same_v<LateInst, FeltToIndexOp>>>
153 return {std::next(odsOperands.begin(), valueRange.first),
154 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
173 ::llvm::LogicalResult
verify(::mlir::Location loc);
175class FeltToIndexOp :
public ::mlir::Op<FeltToIndexOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IndexType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::llzk::function::NotFieldNative, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::InferTypeOpInterface::Trait> {
180 template <
typename RangeT>
186 static ::llvm::StringRef attrNames[] = {::llvm::StringRef(
"overflow")};
187 return ::llvm::ArrayRef(attrNames);
191 return getAttributeNameForIndex(0);
195 return getAttributeNameForIndex(name, 0);
199 return ::llvm::StringLiteral(
"cast.toindex");
208 return {std::next(getOperation()->operand_begin(), valueRange.first),
209 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
212 ::mlir::TypedValue<::llzk::felt::FeltType>
getValue() {
213 return ::llvm::cast<::mlir::TypedValue<::llzk::felt::FeltType>>(*
getODSOperands(0).begin());
218 return getOperation()->getOpOperand(range.first);
227 return {std::next(getOperation()->result_begin(), valueRange.first),
228 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
232 return ::llvm::cast<::mlir::TypedValue<::mlir::IndexType>>(*
getODSResults(0).begin());
235 static ::llvm::LogicalResult
setPropertiesFromAttr(
Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
238 static std::optional<mlir::Attribute>
getInherentAttr(::mlir::MLIRContext *ctx,
const Properties &prop, llvm::StringRef name);
241 static ::llvm::LogicalResult
verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
242 static ::llvm::LogicalResult
readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
245 return ::llvm::dyn_cast_or_null<::llzk::cast::OverflowSemanticsAttr>(getProperties().overflow);
250 getProperties().overflow = attr;
254 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
255 static FeltToIndexOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
256 static FeltToIndexOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
257 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
258 static FeltToIndexOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
259 static FeltToIndexOp create(::mlir::ImplicitLocOpBuilder &builder, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
260 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
261 static FeltToIndexOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
262 static FeltToIndexOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
269 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes,
::llzk::cast::OverflowSemantics overflow, ::mlir::Value value);
272 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
273 static FeltToIndexOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
274 static FeltToIndexOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
275 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
276 static FeltToIndexOp
create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
277 static FeltToIndexOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
278 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
279 static FeltToIndexOp
create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
280 static FeltToIndexOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
281 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
282 static FeltToIndexOp
create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
283 static FeltToIndexOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
288 static ::llvm::LogicalResult
inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
289 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
291 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
292 void print(::mlir::OpAsmPrinter &_odsPrinter);
294 ::mlir::StringAttr getAttributeNameForIndex(
unsigned index) {
295 return getAttributeNameForIndex((*this)->getName(), index);
298 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name,
unsigned index) {
299 assert(index < 1 &&
"invalid attribute index");
300 assert(name.getStringRef() ==
getOperationName() &&
"invalid operation name");
301 assert(name.isRegistered() &&
"Operation isn't registered, missing a "
302 "dependent dialect loading?");
303 return name.getAttributeNames()[index];
308 ::mlir::OpAsmParser &parser, ::llzk::cast::OverflowSemanticsAttr &overflow
312 ::mlir::OpAsmPrinter &printer, FeltToIndexOp op,
313 ::llzk::cast::OverflowSemanticsAttr overflow
317 static ::mlir::ParseResult parseInferredOrParsedType(
318 ::mlir::OpAsmParser &parser, ::mlir::Type &opType,
bool isFirst
320 if (mlir::succeeded(isFirst ? parser.parseOptionalColon() : parser.parseOptionalComma())) {
323 if (parser.parseCustomTypeWithFallback(type)) {
324 return mlir::failure();
332 return mlir::success();
335 static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer,
336 ::mlir::Operation *op, ::mlir::Type opType,
bool isFirst
338 printer << (isFirst ?
" : " :
", ");
339 printer.printStrippedAttrOrType(opType);
363 auto &propStorage = this->overflow;
364 return ::llvm::dyn_cast_or_null<::llzk::cast::OverflowSemanticsAttr>(propStorage);
366 void setOverflow(const ::llzk::cast::OverflowSemanticsAttr &propValue) {
367 this->overflow = propValue;
375 return !(*
this == rhs);
407template <
typename RangeT>
409 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
411 static constexpr int odsIndex_value = 0;
421 template <
typename LateInst = IntToFeltOp,
typename = std::enable_if_t<std::is_same_v<LateInst, IntToFeltOp>>>
430 return {std::next(odsOperands.begin(), valueRange.first),
431 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
450 ::llvm::LogicalResult
verify(::mlir::Location loc);
452class 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::BytecodeOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait> {
457 template <
typename RangeT>
462 using ::mlir::InferTypeOpInterface::Trait<IntToFeltOp>::refineReturnTypes;
464 static ::llvm::StringRef attrNames[] = {::llvm::StringRef(
"overflow")};
465 return ::llvm::ArrayRef(attrNames);
469 return getAttributeNameForIndex(0);
473 return getAttributeNameForIndex(name, 0);
477 return ::llvm::StringLiteral(
"cast.tofelt");
486 return {std::next(getOperation()->operand_begin(), valueRange.first),
487 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
491 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*
getODSOperands(0).begin());
496 return getOperation()->getOpOperand(range.first);
505 return {std::next(getOperation()->result_begin(), valueRange.first),
506 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
509 ::mlir::TypedValue<::llzk::felt::FeltType>
getResult() {
510 return ::llvm::cast<::mlir::TypedValue<::llzk::felt::FeltType>>(*
getODSResults(0).begin());
513 static ::llvm::LogicalResult
setPropertiesFromAttr(
Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
516 static std::optional<mlir::Attribute>
getInherentAttr(::mlir::MLIRContext *ctx,
const Properties &prop, llvm::StringRef name);
519 static ::llvm::LogicalResult
verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
520 static ::llvm::LogicalResult
readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
523 return ::llvm::dyn_cast_or_null<::llzk::cast::OverflowSemanticsAttr>(getProperties().overflow);
528 getProperties().overflow = attr;
532 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
533 static IntToFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
534 static IntToFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
535 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
536 static IntToFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
537 static IntToFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
538 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
539 static IntToFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
540 static IntToFeltOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value);
547 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes,
::llzk::cast::OverflowSemantics overflow, ::mlir::Value value);
550 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
551 static IntToFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
552 static IntToFeltOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
553 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
554 static IntToFeltOp
create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
555 static IntToFeltOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
556 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
557 static IntToFeltOp
create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
558 static IntToFeltOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
559 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
560 static IntToFeltOp
create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
561 static IntToFeltOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
566 static ::llvm::LogicalResult
inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
567 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
569 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
570 void print(::mlir::OpAsmPrinter &_odsPrinter);
572 ::mlir::StringAttr getAttributeNameForIndex(
unsigned index) {
573 return getAttributeNameForIndex((*this)->getName(), index);
576 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name,
unsigned index) {
577 assert(index < 1 &&
"invalid attribute index");
578 assert(name.getStringRef() ==
getOperationName() &&
"invalid operation name");
579 assert(name.isRegistered() &&
"Operation isn't registered, missing a "
580 "dependent dialect loading?");
581 return name.getAttributeNames()[index];
587 ::mlir::OpAsmParser &parser, ::llzk::cast::OverflowSemanticsAttr &overflow
591 ::mlir::OpAsmPrinter &printer, IntToFeltOp op,
592 ::llzk::cast::OverflowSemanticsAttr overflow
596 static ::mlir::ParseResult parseInferredOrParsedType(
597 ::mlir::OpAsmParser &parser, ::mlir::Type &opType,
bool isFirst
599 if (mlir::succeeded(isFirst ? parser.parseOptionalColon() : parser.parseOptionalComma())) {
602 if (parser.parseCustomTypeWithFallback(type)) {
603 return mlir::failure();
611 return mlir::success();
614 static void printInferredOrParsedType(::mlir::OpAsmPrinter &printer,
615 ::mlir::Operation *op, ::mlir::Type opType,
bool isFirst
617 printer << (isFirst ?
" : " :
", ");
618 printer.printStrippedAttrOrType(opType);
::llvm::LogicalResult verify(::mlir::Location loc)
FeltToIndexOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
FeltToIndexOpAdaptor(FeltToIndexOp op)
FeltToIndexOpGenericAdaptor(RangeT values, LateInst op)
FeltToIndexOpGenericAdaptor(RangeT values, const FeltToIndexOpGenericAdaptorBase &base)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
FeltToIndexOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
FeltToIndexOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
RangeT getODSOperands(unsigned index)
FeltToIndexOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::llvm::LogicalResult verifyInvariants()
::llzk::cast::OverflowSemantics getOverflow()
void setOverflowAttr(::llzk::cast::OverflowSemanticsAttr attr)
::mlir::OpFoldResult fold(FoldAdaptor adaptor)
::mlir::StringAttr getOverflowAttrName(::mlir::OperationName name)
::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)
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Model possible assertion failure as program termination, like bool.assert.
static FeltToIndexOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value)
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value)
static llvm::hash_code computePropertiesHash(const Properties &prop)
::mlir::OpOperand & getValueMutable()
::mlir::TypedValue<::llzk::felt::FeltType > getValue()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::StringAttr getOverflowAttrName()
::llzk::cast::OverflowSemanticsAttr getOverflowAttr()
FoldAdaptor::Properties Properties
::mlir::TypedValue<::mlir::IndexType > getResult()
static constexpr int odsIndex_value
::mlir::Operation::result_range getODSResults(unsigned index)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
FeltToIndexOpAdaptor Adaptor
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
FeltToIndexOpGenericAdaptor< RangeT > GenericAdaptor
::mlir::Speculation::Speculatability getSpeculatability()
Only infallible casts may execute on paths where they were not present.
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static void printOptionalOverflowSemantics(::mlir::OpAsmPrinter &printer, FeltToIndexOp op, ::llzk::cast::OverflowSemanticsAttr overflow)
void setOverflow(::llzk::cast::OverflowSemantics attrValue)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::Operation::operand_range getODSOperands(unsigned index)
::llvm::LogicalResult verifyInvariantsImpl()
::mlir::ParseResult parseOptionalOverflowSemantics(::mlir::OpAsmParser &parser, ::llzk::cast::OverflowSemanticsAttr &overflow)
static constexpr ::llvm::StringLiteral getOperationName()
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::llvm::LogicalResult verify(::mlir::Location loc)
IntToFeltOpAdaptor(IntToFeltOp op)
IntToFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
IntToFeltOpGenericAdaptor(RangeT values, LateInst op)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
IntToFeltOpGenericAdaptor(RangeT values, const IntToFeltOpGenericAdaptorBase &base)
IntToFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
IntToFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
IntToFeltOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
RangeT getODSOperands(unsigned index)
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::OpFoldResult fold(FoldAdaptor adaptor)
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties)
void print(::mlir::OpAsmPrinter &_odsPrinter)
void setOverflow(::llzk::cast::OverflowSemantics attrValue)
::mlir::StringAttr getOverflowAttrName(::mlir::OperationName name)
::llvm::LogicalResult verifyInvariantsImpl()
::llzk::cast::OverflowSemanticsAttr getOverflowAttr()
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
static constexpr ::llvm::StringLiteral getOperationName()
::mlir::StringAttr getOverflowAttrName()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Model possible assertion failure as program termination, like bool.assert.
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value)
void setOverflowAttr(::llzk::cast::OverflowSemanticsAttr attr)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static constexpr int odsIndex_value
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
static llvm::hash_code computePropertiesHash(const Properties &prop)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
FoldAdaptor::Properties Properties
IntToFeltOpAdaptor Adaptor
static void printOptionalOverflowSemantics(::mlir::OpAsmPrinter &printer, IntToFeltOp op, ::llzk::cast::OverflowSemanticsAttr overflow)
::mlir::Operation::operand_range getODSOperands(unsigned index)
::mlir::ParseResult parseOptionalOverflowSemantics(::mlir::OpAsmParser &parser, ::llzk::cast::OverflowSemanticsAttr &overflow)
::mlir::TypedValue<::llzk::felt::FeltType > getResult()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
IntToFeltOpGenericAdaptor< RangeT > GenericAdaptor
::llzk::cast::OverflowSemantics getOverflow()
::mlir::Speculation::Speculatability getSpeculatability()
Only infallible casts may execute on paths where they were not present.
static IntToFeltOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::llzk::cast::OverflowSemanticsAttr overflow, ::mlir::Value value)
static bool isCompatibleReturnTypes(::mlir::TypeRange lhs, ::mlir::TypeRange rhs)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
::mlir::Operation::result_range getODSResults(unsigned index)
::llvm::LogicalResult verifyInvariants()
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
::mlir::TypedValue<::mlir::Type > getValue()
::mlir::OpOperand & getValueMutable()
FeltToIndexOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::RegionRange odsRegions
::std::optional<::mlir::OperationName > odsOpName
const Properties & getProperties()
::llzk::cast::OverflowSemanticsAttr getOverflowAttr()
::mlir::DictionaryAttr odsAttrs
::mlir::DictionaryAttr getAttributes()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::llzk::cast::OverflowSemantics getOverflow()
::std::optional<::mlir::OperationName > odsOpName
::mlir::DictionaryAttr odsAttrs
::llzk::cast::OverflowSemantics getOverflow()
::mlir::RegionRange odsRegions
::llzk::cast::OverflowSemanticsAttr getOverflowAttr()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
const Properties & getProperties()
IntToFeltOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::DictionaryAttr getAttributes()
static FeltType get(::mlir::MLIRContext *context, ::mlir::StringAttr fieldName)
::llzk::cast::OverflowSemanticsAttr overflowTy
bool operator==(const Properties &rhs) const
void setOverflow(const ::llzk::cast::OverflowSemanticsAttr &propValue)
bool operator!=(const Properties &rhs) const
void setOverflow(const ::llzk::cast::OverflowSemanticsAttr &propValue)
bool operator==(const Properties &rhs) const
bool operator!=(const Properties &rhs) const
::llzk::cast::OverflowSemanticsAttr overflowTy