[−][src]Struct cranelift_codegen::dominator_tree::DominatorTreePreorder
Optional pre-order information that can be computed for a dominator tree.
This data structure is computed from a DominatorTree
and provides:
- A forward traversable dominator tree through the
children()
iterator. - An ordering of EBBs according to a dominator tree pre-order.
- Constant time dominance checks at the EBB granularity.
The information in this auxiliary data structure is not easy to update when the control flow graph changes, which is why it is kept separate.
Methods
impl DominatorTreePreorder
[src]
Creating and computing the dominator tree pre-order.
pub fn new() -> Self
[src]
Create a new blank DominatorTreePreorder
.
pub fn compute(&mut self, domtree: &DominatorTree, layout: &Layout)
[src]
Recompute this data structure to match domtree
.
impl DominatorTreePreorder
[src]
Query interface for the dominator tree pre-order.
ⓘImportant traits for ChildIter<'a>pub fn children(&self, ebb: Ebb) -> ChildIter
[src]
Get an iterator over the direct children of ebb
in the dominator tree.
These are the EBB's whose immediate dominator is an instruction in ebb
, ordered according
to the CFG reverse post-order.
pub fn dominates(&self, a: Ebb, b: Ebb) -> bool
[src]
Fast, constant time dominance check with EBB granularity.
This computes the same result as domtree.dominates(a, b)
, but in guaranteed fast constant
time. This is less general than the DominatorTree
method because it only works with EBB
program points.
An EBB is considered to dominate itself.
pub fn pre_cmp_ebb(&self, a: Ebb, b: Ebb) -> Ordering
[src]
Compare two EBBs according to the dominator pre-order.
pub fn pre_cmp<A, B>(&self, a: A, b: B, layout: &Layout) -> Ordering where
A: Into<ExpandedProgramPoint>,
B: Into<ExpandedProgramPoint>,
[src]
A: Into<ExpandedProgramPoint>,
B: Into<ExpandedProgramPoint>,
Compare two program points according to the dominator tree pre-order.
This ordering of program points have the property that given a program point, pp, all the program points dominated by pp follow immediately and contiguously after pp in the order.
pub fn pre_cmp_def(&self, a: Value, b: Value, func: &Function) -> Ordering
[src]
Compare two value defs according to the dominator tree pre-order.
Two values defined at the same program point are compared according to their parameter or result order.
This is a total ordering of the values in the function.
Auto Trait Implementations
impl Send for DominatorTreePreorder
impl Sync for DominatorTreePreorder
impl Unpin for DominatorTreePreorder
impl RefUnwindSafe for DominatorTreePreorder
impl UnwindSafe for DominatorTreePreorder
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,