pub enum InlineDecision {
Always,
Never,
Heuristic(f64),
OnceOnly,
}Expand description
Decision about whether a function should be inlined at a call site.
Variants§
Always
Always inline regardless of call count or size.
Never
Never inline this function.
Heuristic(f64)
Inline based on a heuristic score (0.0–1.0 probability).
OnceOnly
Inline only the first call site encountered.
Implementations§
Source§impl InlineDecision
impl InlineDecision
Sourcepub fn should_inline(&self, call_count: u64) -> bool
pub fn should_inline(&self, call_count: u64) -> bool
Decide whether to inline given the current call count for this site.
call_count is the number of times this decision has already resulted
in an inline for the same callee.
Trait Implementations§
Source§impl Clone for InlineDecision
impl Clone for InlineDecision
Source§fn clone(&self) -> InlineDecision
fn clone(&self) -> InlineDecision
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 InlineDecision
impl Debug for InlineDecision
Source§impl PartialEq for InlineDecision
impl PartialEq for InlineDecision
impl StructuralPartialEq for InlineDecision
Auto Trait Implementations§
impl Freeze for InlineDecision
impl RefUnwindSafe for InlineDecision
impl Send for InlineDecision
impl Sync for InlineDecision
impl Unpin for InlineDecision
impl UnsafeUnpin for InlineDecision
impl UnwindSafe for InlineDecision
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