diff --git a/melior/src/helpers/arith.rs b/melior/src/helpers/arith.rs index fa680fc7c4..b4538b6b43 100644 --- a/melior/src/helpers/arith.rs +++ b/melior/src/helpers/arith.rs @@ -31,6 +31,7 @@ pub trait ArithBlockExt<'c>: BuiltinBlockExt<'c> { location: Location<'c>, ) -> Result, Error>; + /// Creates an `arith.extui` operation. fn extsi( &self, lhs: Value<'c, '_>, @@ -38,6 +39,7 @@ pub trait ArithBlockExt<'c>: BuiltinBlockExt<'c> { location: Location<'c>, ) -> Result, Error>; + /// Creates an `arith.extui` operation. fn trunci( &self, lhs: Value<'c, '_>, @@ -45,6 +47,7 @@ pub trait ArithBlockExt<'c>: BuiltinBlockExt<'c> { location: Location<'c>, ) -> Result, Error>; + /// Creates an `arith.shri` operation. fn shrui( &self, lhs: Value<'c, '_>, @@ -52,6 +55,7 @@ pub trait ArithBlockExt<'c>: BuiltinBlockExt<'c> { location: Location<'c>, ) -> Result, Error>; + /// Creates an `arith.shli` operation. fn shli( &self, lhs: Value<'c, '_>, @@ -59,6 +63,7 @@ pub trait ArithBlockExt<'c>: BuiltinBlockExt<'c> { location: Location<'c>, ) -> Result, Error>; + /// Creates an `arith.addi` operation. fn addi( &self, lhs: Value<'c, '_>, @@ -66,6 +71,7 @@ pub trait ArithBlockExt<'c>: BuiltinBlockExt<'c> { location: Location<'c>, ) -> Result, Error>; + /// Creates an `arith.subi` operation. fn subi( &self, lhs: Value<'c, '_>, @@ -73,49 +79,55 @@ pub trait ArithBlockExt<'c>: BuiltinBlockExt<'c> { location: Location<'c>, ) -> Result, Error>; - fn divui( + /// Creates an `arith.muli` operation. + fn muli( &self, lhs: Value<'c, '_>, rhs: Value<'c, '_>, location: Location<'c>, ) -> Result, Error>; - fn divsi( + /// Creates an `arith.divui` operation. + fn divui( &self, lhs: Value<'c, '_>, rhs: Value<'c, '_>, location: Location<'c>, ) -> Result, Error>; - fn xori( + /// Creates an `arith.divsi` operation. + fn divsi( &self, lhs: Value<'c, '_>, rhs: Value<'c, '_>, location: Location<'c>, ) -> Result, Error>; - fn ori( + /// Creates an `arith.xori` operation. + fn xori( &self, lhs: Value<'c, '_>, rhs: Value<'c, '_>, location: Location<'c>, ) -> Result, Error>; - fn andi( + /// Creates an `arith.ori` operation. + fn ori( &self, lhs: Value<'c, '_>, rhs: Value<'c, '_>, location: Location<'c>, ) -> Result, Error>; - fn muli( + /// Creates an `arith.andi` operation. + fn andi( &self, lhs: Value<'c, '_>, rhs: Value<'c, '_>, location: Location<'c>, ) -> Result, Error>; - /// Creates a constant of the given integer bit width. Do not use for felt252. + /// Creates a constant of the given integer bit width. fn const_int( &self, context: &'c Context, @@ -124,7 +136,7 @@ pub trait ArithBlockExt<'c>: BuiltinBlockExt<'c> { bits: u32, ) -> Result, Error>; - /// Creates a constant of the given integer type. Do not use for felt252. + /// Creates a constant of the given integer type. fn const_int_from_type( &self, context: &'c Context,