pub struct RedundantLoadInfo {
pub available_loads: HashMap<(LcnfVarId, u32), LcnfVarId>,
pub redundant_count: usize,
}Expand description
Identifies load-like operations (projections, field reads) that are redundant because the same value has already been loaded earlier in the same scope.
Fields§
§available_loads: HashMap<(LcnfVarId, u32), LcnfVarId>Maps (base_var, field_index) -> binding_var that holds the loaded value.
redundant_count: usizeNumber of redundant loads detected.
Implementations§
Source§impl RedundantLoadInfo
impl RedundantLoadInfo
Sourcepub fn register_load(
&mut self,
base: LcnfVarId,
field_idx: u32,
dest: LcnfVarId,
)
pub fn register_load( &mut self, base: LcnfVarId, field_idx: u32, dest: LcnfVarId, )
Register a load: reading field field_idx of base into dest.
Trait Implementations§
Source§impl Clone for RedundantLoadInfo
impl Clone for RedundantLoadInfo
Source§fn clone(&self) -> RedundantLoadInfo
fn clone(&self) -> RedundantLoadInfo
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 RedundantLoadInfo
impl Debug for RedundantLoadInfo
Source§impl Default for RedundantLoadInfo
impl Default for RedundantLoadInfo
Source§fn default() -> RedundantLoadInfo
fn default() -> RedundantLoadInfo
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RedundantLoadInfo
impl RefUnwindSafe for RedundantLoadInfo
impl Send for RedundantLoadInfo
impl Sync for RedundantLoadInfo
impl Unpin for RedundantLoadInfo
impl UnsafeUnpin for RedundantLoadInfo
impl UnwindSafe for RedundantLoadInfo
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