pub struct CfgFingerprint {
pub loops: usize,
pub switch_cases: usize,
pub conditionals: usize,
pub returns: usize,
}Expand description
A coarse, optimization-tolerant control-flow signature of a function, from its CFG.
Fields§
§loops: usizeNatural-loop back-edges: a branch from block B to block T where T
dominates B (every path from entry to B passes through T). The
dominance check is what stops a function that has several
if (cond) goto epilog; exits to a common tail from being reported
as having multiple “loops” — those are forward jumps in source layout
that look like back-edges once the compiler lays the tail at a lower
address, but the tail doesn’t dominate the goto sites, so they
aren’t iteration.
switch_cases: usizeTotal case count across jump-table switches.
conditionals: usizeConditional-branch terminators.
returns: usizeReturn / interrupt / tail-call terminators.
Trait Implementations§
Source§impl Clone for CfgFingerprint
impl Clone for CfgFingerprint
impl Copy for CfgFingerprint
Source§impl Debug for CfgFingerprint
impl Debug for CfgFingerprint
Auto Trait Implementations§
impl Forget for CfgFingerprint
impl Freeze for CfgFingerprint
impl RefUnwindSafe for CfgFingerprint
impl Send for CfgFingerprint
impl Sync for CfgFingerprint
impl Unpin for CfgFingerprint
impl UnsafeUnpin for CfgFingerprint
impl UnwindSafe for CfgFingerprint
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