[−][src]Struct c2rust_transpile::cfg::loops::LoopInfo
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]
&self,
entries: E
) -> Option<LoopId>
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]
&mut self,
id: LoopId,
contents: IndexSet<Lbl>,
outer_id: Option<LoopId>
)
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]
fn clone(&self) -> 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
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<E> SpecializationError for E
[src]
default fn not_found<S, T>(
trait_name: &'static str,
method_name: &'static str
) -> E where
T: ?Sized,
[src]
trait_name: &'static str,
method_name: &'static str
) -> E where
T: ?Sized,
impl<T> Erased for T
[src]
impl<T> Send for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Make for T
[src]
impl<T> MaybeResult for T
[src]
impl<'a, T> Captures for T where
T: ?Sized,
[src]
T: ?Sized,