pub struct MirInlineConfig {
pub max_instructions: usize,
pub max_single_call_instructions: usize,
pub max_single_call_sanity_instructions: usize,
pub max_blocks: usize,
pub inline_single_call: bool,
pub max_cold_code_growth: usize,
pub max_hot_code_growth: usize,
pub max_caller_inlined_instructions: usize,
pub min_call_savings: u64,
}Expand description
Configuration for MIR-level internal-call inlining.
Fields§
§max_instructions: usizeMaximum instruction count for ordinary inline candidates.
max_single_call_instructions: usizeMaximum instruction count for functions that have exactly one call site.
max_single_call_sanity_instructions: usizeHard sanity limit for single-call-site callees. These bypass the normal size and block caps because function DCE removes their original body.
max_blocks: usizeMaximum number of blocks to clone from one callee.
inline_single_call: boolWhether a single call site may use the larger threshold.
max_cold_code_growth: usizeMaximum estimated runtime bytecode growth for a cold call site.
max_hot_code_growth: usizeMaximum estimated runtime bytecode growth for a call site inside a loop.
max_caller_inlined_instructions: usizeMaximum number of instructions a single caller may gain from inlining multi-use callees, bounding total code growth per function.
min_call_savings: u64Minimum estimated internal-call protocol gas saved before inlining.
Trait Implementations§
Source§impl Clone for MirInlineConfig
impl Clone for MirInlineConfig
Source§fn clone(&self) -> MirInlineConfig
fn clone(&self) -> MirInlineConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MirInlineConfig
impl Debug for MirInlineConfig
Source§impl Default for MirInlineConfig
impl Default for MirInlineConfig
Source§fn default() -> MirInlineConfig
fn default() -> MirInlineConfig
Auto Trait Implementations§
impl Freeze for MirInlineConfig
impl RefUnwindSafe for MirInlineConfig
impl Send for MirInlineConfig
impl Sync for MirInlineConfig
impl Unpin for MirInlineConfig
impl UnsafeUnpin for MirInlineConfig
impl UnwindSafe for MirInlineConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more