pub struct ControlFlowGraph<'p> { /* private fields */ }
Expand description
A control flow graph (CFG) is a representation of a program’s control flow as a directed graph. Each node in the graph is a basic block, a sequence of instructions with a single entry point and a single exit point. The edges in the graph represent control flow between basic blocks.
Implementations§
Source§impl<'p> ControlFlowGraph<'p>
impl<'p> ControlFlowGraph<'p>
Sourcepub fn has_dynamic_control_flow(&self) -> bool
pub fn has_dynamic_control_flow(&self) -> bool
Returns true
if the program contains dynamic control flow, i.e. JUMP-WHEN
or JUMP-UNLESS
Sourcepub fn into_blocks(self) -> Vec<BasicBlock<'p>>
pub fn into_blocks(self) -> Vec<BasicBlock<'p>>
Returns the basic blocks in the control flow graph.
Trait Implementations§
Source§impl<'p> Clone for ControlFlowGraph<'p>
impl<'p> Clone for ControlFlowGraph<'p>
Source§fn clone(&self) -> ControlFlowGraph<'p>
fn clone(&self) -> ControlFlowGraph<'p>
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<'p> Debug for ControlFlowGraph<'p>
impl<'p> Debug for ControlFlowGraph<'p>
Source§impl<'p> Default for ControlFlowGraph<'p>
impl<'p> Default for ControlFlowGraph<'p>
Source§fn default() -> ControlFlowGraph<'p>
fn default() -> ControlFlowGraph<'p>
Returns the “default value” for a type. Read more
Source§impl<'p> From<&'p ControlFlowGraphOwned> for ControlFlowGraph<'p>
impl<'p> From<&'p ControlFlowGraphOwned> for ControlFlowGraph<'p>
Source§fn from(value: &'p ControlFlowGraphOwned) -> Self
fn from(value: &'p ControlFlowGraphOwned) -> Self
Converts to this type from the input type.
Source§impl<'p> From<&'p Program> for ControlFlowGraph<'p>
impl<'p> From<&'p Program> for ControlFlowGraph<'p>
Source§impl From<ControlFlowGraph<'_>> for ControlFlowGraphOwned
impl From<ControlFlowGraph<'_>> for ControlFlowGraphOwned
Source§fn from(value: ControlFlowGraph<'_>) -> Self
fn from(value: ControlFlowGraph<'_>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'p> Freeze for ControlFlowGraph<'p>
impl<'p> RefUnwindSafe for ControlFlowGraph<'p>
impl<'p> Send for ControlFlowGraph<'p>
impl<'p> Sync for ControlFlowGraph<'p>
impl<'p> Unpin for ControlFlowGraph<'p>
impl<'p> UnwindSafe for ControlFlowGraph<'p>
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.