pub struct ControlFlowGraph {
pub control_inst_on_exit_from: EntityOrientedDenseMap<ControlRegion, ControlInst>,
pub loop_merge_to_loop_header: IndexMap<ControlRegion, ControlRegion, BuildHasherDefault<FxHasher>>,
}
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>
§loop_merge_to_loop_header: IndexMap<ControlRegion, ControlRegion, BuildHasherDefault<FxHasher>>
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 dominators are visited before the entire subgraph they dominate.
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 Freeze for ControlFlowGraph
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more