pub struct DceStats {
pub constant_folds: u64,
pub unreachable_branches: u64,
pub unused_let_bindings: u64,
pub total_nodes_before: u64,
pub total_nodes_after: u64,
pub passes: u32,
}Expand description
Statistics collected during a single or multi-pass DCE run.
Fields§
§constant_folds: u64Number of constant-fold eliminations (And/Or/Not with constant operands).
unreachable_branches: u64Number of unreachable branches eliminated (IfThenElse with constant condition).
unused_let_bindings: u64Number of unused Let bindings removed.
total_nodes_before: u64Total number of expression nodes before the first pass.
total_nodes_after: u64Total number of expression nodes after the final pass.
passes: u32Number of DCE passes that were executed.
Implementations§
Source§impl DceStats
impl DceStats
Sourcepub fn reduction_ratio(&self) -> f64
pub fn reduction_ratio(&self) -> f64
Fraction of nodes eliminated: (before − after) / before.
Returns 0.0 when total_nodes_before == 0.
Sourcepub fn total_eliminations(&self) -> u64
pub fn total_eliminations(&self) -> u64
Sum of all elimination counts across all categories.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DceStats
impl RefUnwindSafe for DceStats
impl Send for DceStats
impl Sync for DceStats
impl Unpin for DceStats
impl UnsafeUnpin for DceStats
impl UnwindSafe for DceStats
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