pub(crate) struct LivenessValues<N: Idx> {
    elements: Rc<RegionValueElements>,
    points: SparseIntervalMatrix<N, PointIndex>,
}
Expand description

When we initially compute liveness, we use an interval matrix storing liveness ranges for each region-vid.

Fields§

§elements: Rc<RegionValueElements>§points: SparseIntervalMatrix<N, PointIndex>

Implementations§

source§

impl<N: Idx> LivenessValues<N>

source

pub(crate) fn new(elements: Rc<RegionValueElements>) -> Self

Creates a new set of “region values” that tracks causal information. Each of the regions in num_region_variables will be initialized with an empty set of points and no causal information.

source

pub(crate) fn rows(&self) -> impl Iterator<Item = N>

Iterate through each region that has a value in this set.

source

pub(crate) fn add_element(&mut self, row: N, location: Location) -> bool

Adds the given element to the value for the given region. Returns whether the element is newly added (i.e., was not already present).

source

pub(crate) fn add_elements( &mut self, row: N, locations: &IntervalSet<PointIndex> ) -> bool

Adds all the elements in the given bit array into the given region. Returns whether any of them are newly added.

source

pub(crate) fn add_all_points(&mut self, row: N)

Adds all the control-flow points to the values for r.

source

pub(crate) fn contains(&self, row: N, location: Location) -> bool

Returns true if the region r contains the given element.

source

pub(crate) fn get_elements(&self, row: N) -> impl Iterator<Item = Location> + '_

Returns an iterator of all the elements contained by the region r

source

pub(crate) fn region_value_str(&self, r: N) -> String

Returns a “pretty” string value of the region. Meant for debugging.

Auto Trait Implementations§

§

impl<N> RefUnwindSafe for LivenessValues<N>

§

impl<N> !Send for LivenessValues<N>

§

impl<N> !Sync for LivenessValues<N>

§

impl<N> Unpin for LivenessValues<N>

§

impl<N> UnwindSafe for LivenessValues<N>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 40 bytes