Struct spirt::cfg::DeferredEdgeBundle
source · struct DeferredEdgeBundle<T> {
condition: LazyCond,
edge_bundle: IncomingEdgeBundle<T>,
}Expand description
A “deferred (incoming) edge bundle” is an IncomingEdgeBundle that cannot
be structurized immediately, but instead waits for its accumulated_count
to reach the full count of its target, before it can grafted into some
structured control-flow region.
While in the “deferred” state, its can accumulate a non-trivial condition,
every time it’s propagated to an “outer” region, e.g. for this pseudocode:
if a {
branch => label1
} else {
if b {
branch => label1
}
}
the deferral of branches to label1 will result in:
label1_condition = if a {
true
} else {
if b {
true
} else {
false
}
}
if label1_condition {
branch => label1
}
which could theoretically be simplified (after the Structurizer) to:
label1_condition = a | b
if label1_condition {
branch => label1
}
Note: edge_bundle.target has a generic type T to reduce redundancy
when it’s already implied (e.g. by the key in DeferredEdgeBundleSet’s map).
Fields§
§condition: LazyCond§edge_bundle: IncomingEdgeBundle<T>Implementations§
source§impl<T> DeferredEdgeBundle<T>
impl<T> DeferredEdgeBundle<T>
fn into_target_keyed_kv_pair(self) -> (T, DeferredEdgeBundle<()>)
Auto Trait Implementations§
impl<T> RefUnwindSafe for DeferredEdgeBundle<T>where
T: RefUnwindSafe,
impl<T> Send for DeferredEdgeBundle<T>where
T: Send,
impl<T> Sync for DeferredEdgeBundle<T>where
T: Sync,
impl<T> Unpin for DeferredEdgeBundle<T>where
T: Unpin,
impl<T> UnwindSafe for DeferredEdgeBundle<T>where
T: UnwindSafe,
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