pub struct Reads { /* private fields */ }Expand description
How many times each register is read, kept across the commits of one pass.
A removal has to know whether anything still reads what the instruction wrote, and asking the function that question once per commit is the length of the function once per commit. So it is asked once and the answer is carried, which each commit brings up to date with what it did.
A virtual register is counted by its number in a list rather than in a map, since the numbers run from nought with no gaps and this is asked about every operand of every function. The few physical registers an instruction names before allocation are counted the same way by their number, which is one byte. They used to go in a map, and hashing one was most of what counting it cost.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Reads
impl RefUnwindSafe for Reads
impl Send for Reads
impl Sync for Reads
impl Unpin for Reads
impl UnsafeUnpin for Reads
impl UnwindSafe for Reads
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more