pub struct ConstPropConfig {
pub fold_arithmetic: bool,
pub fold_comparisons: bool,
pub fold_boolean: bool,
pub max_passes: u32,
pub float_tolerance: f64,
}Expand description
Configuration for the constant propagation pass.
Fields§
§fold_arithmetic: boolFold arithmetic binary operations when both operands are constants.
fold_comparisons: boolFold comparison operations when both operands are constants.
fold_boolean: boolFold unary operations (Abs, Floor, Ceil, Round, Sqrt, Exp, Log, Sin, Cos, Tan, Not) on constants.
max_passes: u32Maximum number of convergence passes to perform.
float_tolerance: f64Absolute tolerance used when comparing floats for equality (Eq comparison).
Trait Implementations§
Source§impl Clone for ConstPropConfig
impl Clone for ConstPropConfig
Source§fn clone(&self) -> ConstPropConfig
fn clone(&self) -> ConstPropConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConstPropConfig
impl Debug for ConstPropConfig
Auto Trait Implementations§
impl Freeze for ConstPropConfig
impl RefUnwindSafe for ConstPropConfig
impl Send for ConstPropConfig
impl Sync for ConstPropConfig
impl Unpin for ConstPropConfig
impl UnsafeUnpin for ConstPropConfig
impl UnwindSafe for ConstPropConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more