[−][src]Struct rustc_passes::liveness::RWUTable
Conceptually, this is like a Vec<RWU>. But the number of RWUs can get
very large, so it uses a more compact representation that takes advantage
of the fact that when the number of RWUs is large, most of them have an
invalid reader and an invalid writer.
Fields
packed_rwus: Vec<u32>Each entry in packed_rwus is either INV_INV_FALSE, INV_INV_TRUE, or
an index into unpacked_rwus. In the common cases, this compacts the
65 bits of data into 32; in the uncommon cases, it expands the 65 bits
in 96.
More compact representations are possible -- e.g., use only 2 bits per
packed RWU and make the secondary table a HashMap that maps from
indices to RWUs -- but this one strikes a good balance between size
and speed.
unpacked_rwus: Vec<RWU>Implementations
impl RWUTable[src]
fn new(num_rwus: usize) -> RWUTable[src]
fn get(&self, idx: usize) -> RWU[src]
fn get_reader(&self, idx: usize) -> Option<LiveNode>[src]
fn get_writer(&self, idx: usize) -> Option<LiveNode>[src]
fn get_used(&self, idx: usize) -> bool[src]
fn copy_packed(&mut self, dst_idx: usize, src_idx: usize)[src]
fn assign_unpacked(&mut self, idx: usize, rwu: RWU)[src]
fn assign_inv_inv(&mut self, idx: usize)[src]
Auto Trait Implementations
impl RefUnwindSafe for RWUTable
impl Send for RWUTable
impl Sync for RWUTable
impl Unpin for RWUTable
impl UnwindSafe for RWUTable
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,