pub struct InlineConfig {
pub inline_single_use: bool,
pub inline_constants: bool,
pub inline_vars: bool,
pub max_passes: u32,
pub max_inline_depth: usize,
}Expand description
Configuration for the let-inlining pass.
All flags default to true so that the pass is aggressive by default.
Disable individual flags for conservative inlining or debugging.
Fields§
§inline_single_use: boolInline Let(x, e, body) whenever x occurs free exactly once in
body, regardless of how complex e is (subject to max_inline_depth).
inline_constants: boolInline Let(x, Constant(_), body) regardless of how many times x
is used; constant duplication is essentially free.
inline_vars: boolInline Let(x, Pred(y, []), body) — i.e. variable aliases — regardless
of use count; these are pure renames.
max_passes: u32Maximum number of fixed-point passes before stopping.
max_inline_depth: usizeDo not inline a binding whose value expression has depth greater than this threshold. Prevents unbounded code-size growth.
Trait Implementations§
Source§impl Clone for InlineConfig
impl Clone for InlineConfig
Source§fn clone(&self) -> InlineConfig
fn clone(&self) -> InlineConfig
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 InlineConfig
impl Debug for InlineConfig
Auto Trait Implementations§
impl Freeze for InlineConfig
impl RefUnwindSafe for InlineConfig
impl Send for InlineConfig
impl Sync for InlineConfig
impl Unpin for InlineConfig
impl UnsafeUnpin for InlineConfig
impl UnwindSafe for InlineConfig
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