pub struct RedundantCopyOptimizer {
pending_commands: OptimizeCommandDeque<OptimizeCommand>,
}
Expand description
A node which copies a value a
to b
is often redundant.
This is especially important, because the compiler tends to generate operations
in the shape of let temp = a; operation_with_temp(temp); a = temp
.
This optimizer aggressively removes copy instructions (let temp = a
) and changes all
subsequent reads to the previous variable (a
).
Fields§
§pending_commands: OptimizeCommandDeque<OptimizeCommand>
Trait Implementations§
source§impl Default for RedundantCopyOptimizer
impl Default for RedundantCopyOptimizer
source§fn default() -> RedundantCopyOptimizer
fn default() -> RedundantCopyOptimizer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for RedundantCopyOptimizer
impl !Send for RedundantCopyOptimizer
impl !Sync for RedundantCopyOptimizer
impl Unpin for RedundantCopyOptimizer
impl UnwindSafe for RedundantCopyOptimizer
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