pub struct DceConfig {
pub eliminate_constant_and: bool,
pub eliminate_constant_or: bool,
pub eliminate_constant_not: bool,
pub eliminate_if_branches: bool,
pub eliminate_unused_let: bool,
pub max_passes: u32,
}Expand description
Configuration controlling which DCE rules are active.
Fields§
§eliminate_constant_and: boolEnable And(False, x) → False, And(True, x) → x, and symmetric variants.
eliminate_constant_or: boolEnable Or(True, x) → True, Or(False, x) → x, and symmetric variants.
eliminate_constant_not: boolEnable Not(True) → False, Not(False) → True.
eliminate_if_branches: boolEnable IfThenElse(True, then, _) → then and IfThenElse(False, _, else) → else.
eliminate_unused_let: boolEnable removal of Let(x, e, body) when x does not appear free in body.
max_passes: u32Maximum number of passes before giving up (fixed-point iteration).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DceConfig
impl RefUnwindSafe for DceConfig
impl Send for DceConfig
impl Sync for DceConfig
impl Unpin for DceConfig
impl UnsafeUnpin for DceConfig
impl UnwindSafe for DceConfig
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