pub struct RedundancyOptimizer {
pub aggressive_function_inlining: bool,
}
Expand description
Removes useless nodes
Optimizations:
- Removes assignments to variables that are never read
- If a value a is copied to value b and value a is assigned directly before, remove assign directly to b
- If a value is copied but the original value could be used, the copy gets removed
- If a branch’s condition in-directs to another condition, inline that other condition (right now only checks the previous node)
- If both branches of a branch end up at the same next node, add one goto after the branch
- Removes function calls to functions which are empty
Fields§
§aggressive_function_inlining: bool
Trait Implementations§
source§impl Default for RedundancyOptimizer
impl Default for RedundancyOptimizer
source§fn default() -> RedundancyOptimizer
fn default() -> RedundancyOptimizer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for RedundancyOptimizer
impl Send for RedundancyOptimizer
impl Sync for RedundancyOptimizer
impl Unpin for RedundancyOptimizer
impl UnwindSafe for RedundancyOptimizer
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