pub struct LICMProfileData {
pub loop_counts: HashMap<LcnfVarId, u64>,
pub binding_counts: HashMap<LcnfVarId, u64>,
}Expand description
Profiling data used to guide LICM decisions.
Fields§
§loop_counts: HashMap<LcnfVarId, u64>Execution counts for each loop (by header var id).
binding_counts: HashMap<LcnfVarId, u64>Execution counts for each let-binding (by var id).
Implementations§
Source§impl LICMProfileData
impl LICMProfileData
Sourcepub fn record_loop(&mut self, header: LcnfVarId, count: u64)
pub fn record_loop(&mut self, header: LcnfVarId, count: u64)
Record an execution count for a loop.
Sourcepub fn loop_count(&self, header: LcnfVarId) -> u64
pub fn loop_count(&self, header: LcnfVarId) -> u64
Get the execution count for a loop (default 1 if unknown).
Sourcepub fn record_binding(&mut self, var: LcnfVarId, count: u64)
pub fn record_binding(&mut self, var: LcnfVarId, count: u64)
Record an execution count for a binding.
Sourcepub fn dynamic_savings(&self, candidate: &HoistCandidate) -> u64
pub fn dynamic_savings(&self, candidate: &HoistCandidate) -> u64
Compute the dynamic savings for a hoist candidate given profile data.
Trait Implementations§
Source§impl Clone for LICMProfileData
impl Clone for LICMProfileData
Source§fn clone(&self) -> LICMProfileData
fn clone(&self) -> LICMProfileData
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 LICMProfileData
impl Debug for LICMProfileData
Source§impl Default for LICMProfileData
impl Default for LICMProfileData
Source§fn default() -> LICMProfileData
fn default() -> LICMProfileData
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LICMProfileData
impl RefUnwindSafe for LICMProfileData
impl Send for LICMProfileData
impl Sync for LICMProfileData
impl Unpin for LICMProfileData
impl UnsafeUnpin for LICMProfileData
impl UnwindSafe for LICMProfileData
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