[][src]Struct c2rust_transpile::cfg::loops::LoopInfo

pub struct LoopInfo<Lbl: Hash + Eq> { /* fields omitted */ }

Stores information about loops in a CFG.

Methods

impl<Lbl: Hash + Eq + Clone> LoopInfo<Lbl>[src]

pub fn new() -> Self[src]

pub fn absorb(&mut self, other: LoopInfo<Lbl>)[src]

Merge the information from another LoopInfo into this LoopInfo

pub fn tightest_common_loop<E: Iterator<Item = Lbl>>(
    &self,
    entries: E
) -> Option<LoopId>
[src]

Find the smallest possible loop that contains all of the items

pub fn filter_unreachable(&mut self, reachable: &IndexSet<Lbl>)[src]

Filter out any nodes which need to be pruned from the entire CFG due to being unreachable.

pub fn rewrite_blocks(&mut self, rewrites: &IndexMap<Lbl, Lbl>)[src]

Rewrite nodes to take into account a node remapping. Note that the remapping is usually going to be very much not injective - the whole point of remapping is to merge some nodes.

pub fn add_loop(
    &mut self,
    id: LoopId,
    contents: IndexSet<Lbl>,
    outer_id: Option<LoopId>
)
[src]

Add in information about a new loop

pub fn enclosing_loops(&self, lbl: &Lbl) -> Vec<LoopId>[src]

Get all of the LoopId's corresponding to loops of increasing size around the given label

pub fn get_loop_contents<'a>(&'a self, id: LoopId) -> &'a IndexSet<Lbl>[src]

Get all of the nodes contained in a given loop

Trait Implementations

impl<Lbl: Clone + Hash + Eq> Clone for LoopInfo<Lbl>[src]

default fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<Lbl: Debug + Hash + Eq> Debug for LoopInfo<Lbl>[src]

Auto Trait Implementations

impl<Lbl> Send for LoopInfo<Lbl> where
    Lbl: Send

impl<Lbl> Sync for LoopInfo<Lbl> where
    Lbl: Sync

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<E> SpecializationError for E[src]

impl<T> Erased for T[src]

impl<T> Send for T where
    T: ?Sized
[src]

impl<T> Sync for T where
    T: ?Sized
[src]

impl<T> Make for T[src]

impl<T> MaybeResult for T[src]

impl<'a, T> Captures for T where
    T: ?Sized
[src]

impl<T> Erased for T