rustc_mir_dataflow::impls

Type Alias EverInitializedPlacesDomain

Source
pub type EverInitializedPlacesDomain = MixedBitSet<InitIndex>;
Expand description

There can be many more InitIndex than there are locals in a MIR body. We use a mixed bitset to avoid paying too high a memory footprint.

Aliased Type§

enum EverInitializedPlacesDomain {
    Small(BitSet<InitIndex>),
    Large(ChunkedBitSet<InitIndex>),
}

Variants§

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

Size for each variant:

  • Small: 32 bytes
  • Large: 24 bytes

Implementations

Source§

impl<T> MixedBitSet<T>

Source

pub fn domain_size(&self) -> usize

Source§

impl<T> MixedBitSet<T>
where T: Idx,

Source

pub fn new_empty(domain_size: usize) -> MixedBitSet<T>

Source

pub fn is_empty(&self) -> bool

Source

pub fn contains(&self, elem: T) -> bool

Source

pub fn insert(&mut self, elem: T) -> bool

Source

pub fn insert_all(&mut self)

Source

pub fn remove(&mut self, elem: T) -> bool

Source

pub fn iter(&self) -> MixedBitIter<'_, T>

Source

pub fn clear(&mut self)

Source

pub fn union<Rhs>(&mut self, other: &Rhs) -> bool
where MixedBitSet<T>: BitRelations<Rhs>,

Sets self = self | other and returns true if self changed (i.e., if new bits were added).

Source

pub fn subtract<Rhs>(&mut self, other: &Rhs) -> bool
where MixedBitSet<T>: BitRelations<Rhs>,

Sets self = self - other and returns true if self changed. (i.e., if any bits were removed).

Source

pub fn intersect<Rhs>(&mut self, other: &Rhs) -> bool
where MixedBitSet<T>: BitRelations<Rhs>,

Sets self = self & other and return true if self changed. (i.e., if any bits were removed).

Trait Implementations

Source§

impl<T> BitRelations<MixedBitSet<T>> for MixedBitSet<T>
where T: Idx,

Source§

fn union(&mut self, other: &MixedBitSet<T>) -> bool

Source§

fn subtract(&mut self, other: &MixedBitSet<T>) -> bool

Source§

fn intersect(&mut self, _other: &MixedBitSet<T>) -> bool

Source§

impl<T: Idx> BitSetExt<T> for MixedBitSet<T>

Source§

fn contains(&self, elem: T) -> bool

Source§

impl<T> Clone for MixedBitSet<T>

Source§

fn clone_from(&mut self, from: &MixedBitSet<T>)

WARNING: this implementation of clone_from may panic if the two bitsets have different domain sizes. This constraint is not inherent to clone_from, but it works with the existing call sites and allows a faster implementation, which is important because this function is hot.

Source§

fn clone(&self) -> MixedBitSet<T>

Returns a copy of the value. Read more
Source§

impl<T> Debug for MixedBitSet<T>
where T: Idx,

Source§

fn fmt(&self, w: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<T, C> DebugWithContext<C> for MixedBitSet<T>
where T: Idx + DebugWithContext<C>,

Source§

fn fmt_with(&self, ctxt: &C, f: &mut Formatter<'_>) -> Result

Source§

fn fmt_diff_with(&self, old: &Self, ctxt: &C, f: &mut Formatter<'_>) -> Result

Print the difference between self and old. Read more
Source§

impl<T: Idx> GenKill<T> for MixedBitSet<T>

Source§

fn gen_(&mut self, elem: T)

Inserts elem into the state vector.
Source§

fn kill(&mut self, elem: T)

Removes elem from the state vector.
Source§

fn gen_all(&mut self, elems: impl IntoIterator<Item = T>)

Calls gen for each element in elems.
Source§

fn kill_all(&mut self, elems: impl IntoIterator<Item = T>)

Calls kill for each element in elems.
Source§

impl<T: Idx> JoinSemiLattice for MixedBitSet<T>

Source§

fn join(&mut self, other: &Self) -> bool

Computes the least upper bound of two elements, storing the result in self and returning true if self has changed. Read more
Source§

impl<T> PartialEq for MixedBitSet<T>
where T: PartialEq,

Source§

fn eq(&self, other: &MixedBitSet<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T> Eq for MixedBitSet<T>
where T: Eq,

Source§

impl<T> StructuralPartialEq for MixedBitSet<T>