pub struct StrengthConfig {
pub max_shift_count: u32,
pub optimize_div: bool,
pub optimize_inc: bool,
}Expand description
Configuration for the strength-reduction pass.
Fields§
§max_shift_count: u32Maximum shift count to consider for multiplication decomposition. Multiplications that require more than this many shifts+adds are left as-is.
optimize_div: boolWhether to apply the division-by-constant reciprocal optimization.
optimize_inc: boolWhether to apply x + 1 → incr(x) for targets that have an
efficient increment instruction.
Trait Implementations§
Source§impl Clone for StrengthConfig
impl Clone for StrengthConfig
Source§fn clone(&self) -> StrengthConfig
fn clone(&self) -> StrengthConfig
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 StrengthConfig
impl Debug for StrengthConfig
Source§impl Default for StrengthConfig
impl Default for StrengthConfig
Auto Trait Implementations§
impl Freeze for StrengthConfig
impl RefUnwindSafe for StrengthConfig
impl Send for StrengthConfig
impl Sync for StrengthConfig
impl Unpin for StrengthConfig
impl UnsafeUnpin for StrengthConfig
impl UnwindSafe for StrengthConfig
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