[−][src]Struct llvm_ir_analysis::PostDominatorTree
The postdominator tree for a particular function.
To construct a PostDominatorTree
, use Analysis
.
Implementations
impl<'m> PostDominatorTree<'m>
[src]
pub fn ipostdom(&self, block: &'m Name) -> Option<CFGNode<'m>>
[src]
Get the immediate postdominator of the basic block with the given Name
.
This will be None
for unreachable blocks, and Some
for all other
blocks.
A block bbX is the immediate postdominator of bbY if and only if:
- bbX strictly postdominates bbY, i.e., bbX appears on every control-flow path from bbY to the function exit (but bbX =/= bbY)
- Of the blocks that strictly postdominate bbY, bbX is the closest to bbY (farthest from exit) along paths from bbY to the function exit
If the immediate postdominator is CFGNode::Return
, that indicates that
there is no single basic block that postdominates the given block.
pub fn children<'s>(
&'s self,
block: &'m Name
) -> impl Iterator<Item = CFGNode<'m>> + 's
[src]
&'s self,
block: &'m Name
) -> impl Iterator<Item = CFGNode<'m>> + 's
Get the children of the given basic block in the postdominator tree, i.e.,
get all the blocks which are immediately postdominated by block
.
See notes on ipostdom()
.
pub fn children_of_return<'s>(&'s self) -> impl Iterator<Item = &'m Name> + 's
[src]
Get the children of CFGNode::Return
in the postdominator tree, i.e.,
get all the blocks which are immediately postdominated by CFGNode::Return
.
See notes on ipostdom()
.
pub fn postdominates(&self, node_a: CFGNode<'m>, node_b: CFGNode<'m>) -> bool
[src]
Does node_a
postdominate node_b
?
Note that every node postdominates itself by definition, so if
node_a == node_b
, this returns true
.
See also strictly_postdominates()
pub fn strictly_postdominates(
&self,
node_a: CFGNode<'m>,
node_b: CFGNode<'m>
) -> bool
[src]
&self,
node_a: CFGNode<'m>,
node_b: CFGNode<'m>
) -> bool
Does node_a
strictly postdominate node_b
?
This is the same as postdominates()
, except that if
node_a == node_b
, this returns false
.
Auto Trait Implementations
impl<'m> RefUnwindSafe for PostDominatorTree<'m>
impl<'m> Send for PostDominatorTree<'m>
impl<'m> Sync for PostDominatorTree<'m>
impl<'m> Unpin for PostDominatorTree<'m>
impl<'m> UnwindSafe for PostDominatorTree<'m>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,