Struct spirt::cfg::ControlFlowGraph
source · pub struct ControlFlowGraph {
pub control_inst_on_exit_from: EntityOrientedDenseMap<ControlRegion, ControlInst>,
}
Expand description
The control-flow graph (CFG) of a function, as control-flow instructions
(ControlInst
s) attached to ControlRegion
s, as an “action on exit”, i.e.
“terminator” (while intra-region control-flow is strictly structured).
Fields§
§control_inst_on_exit_from: EntityOrientedDenseMap<ControlRegion, ControlInst>
Implementations§
source§impl ControlFlowGraph
impl ControlFlowGraph
sourcepub fn rev_post_order(
&self,
func_def_body: &FuncDefBody
) -> impl DoubleEndedIterator<Item = ControlRegion>
pub fn rev_post_order( &self, func_def_body: &FuncDefBody ) -> impl DoubleEndedIterator<Item = ControlRegion>
Iterate over all ControlRegion
s making up func_def_body
’s CFG, in
reverse post-order (RPO).
RPO iteration over a CFG provides certain guarantees, most importantly that SSA definitions are visited before any of their uses.
Trait Implementations§
source§impl Clone for ControlFlowGraph
impl Clone for ControlFlowGraph
source§fn clone(&self) -> ControlFlowGraph
fn clone(&self) -> ControlFlowGraph
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for ControlFlowGraph
impl Default for ControlFlowGraph
source§fn default() -> ControlFlowGraph
fn default() -> ControlFlowGraph
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for ControlFlowGraph
impl Send for ControlFlowGraph
impl Sync for ControlFlowGraph
impl Unpin for ControlFlowGraph
impl UnwindSafe for ControlFlowGraph
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