pub enum Analysis {
Cfg,
Dominators,
PostDominators,
Loops,
Frontiers,
ControlDependence,
Frequencies,
}Expand description
One analysis this cache holds.
The order matters and is checked by a test: an analysis is built out of analyses that come before it in this list and never out of one that comes after. That is what lets the invalidation walk settle in one pass over the list rather than in a loop to a fixed point.
Variants§
Cfg
Cfg, which everything else here is built on.
Dominators
PostDominators
Loops
Frontiers
ControlDependence
Frequencies
Frequencies, which carries the branch predictions it was worked out from.
Implementations§
Source§impl Analysis
impl Analysis
Sourcepub const fn name(self) -> &'static str
pub const fn name(self) -> &'static str
What it is called in a message to somebody debugging a pass.
Sourcepub const fn needs(self) -> &'static [Analysis]
pub const fn needs(self) -> &'static [Analysis]
The analyses this one is built out of, which cannot outlive it.
Section 4.4 of the design has a table of these and the entry for almost every row is
“any CFG change”, which is why Analysis::Cfg is what the other three name.
Trait Implementations§
impl Copy for Analysis
impl Eq for Analysis
Source§impl Ord for Analysis
impl Ord for Analysis
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Analysis
impl PartialOrd for Analysis
impl StructuralPartialEq for Analysis
Auto Trait Implementations§
impl Freeze for Analysis
impl RefUnwindSafe for Analysis
impl Send for Analysis
impl Sync for Analysis
impl Unpin for Analysis
impl UnsafeUnpin for Analysis
impl UnwindSafe for Analysis
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