pub struct PipelineConfig {
pub enable_negation_opt: bool,
pub enable_constant_folding: bool,
pub enable_algebraic_simplification: bool,
pub enable_strength_reduction: bool,
pub enable_distributivity: bool,
pub enable_quantifier_opt: bool,
pub enable_dead_code_elimination: bool,
pub max_iterations: usize,
pub stop_on_fixed_point: bool,
}Expand description
Configuration for the optimization pipeline.
Fields§
§enable_negation_opt: boolEnable negation optimization pass
enable_constant_folding: boolEnable constant folding pass
enable_algebraic_simplification: boolEnable algebraic simplification pass
enable_strength_reduction: boolEnable strength reduction pass
enable_distributivity: boolEnable distributivity optimization pass
enable_quantifier_opt: boolEnable quantifier optimization pass
enable_dead_code_elimination: boolEnable dead code elimination pass
max_iterations: usizeMaximum number of iterations before stopping
stop_on_fixed_point: boolStop early if an iteration makes no changes
Implementations§
Source§impl PipelineConfig
impl PipelineConfig
Sourcepub fn constant_folding_only() -> Self
pub fn constant_folding_only() -> Self
Create a configuration with only constant folding enabled.
Sourcepub fn algebraic_only() -> Self
pub fn algebraic_only() -> Self
Create a configuration with only algebraic simplification enabled.
Sourcepub fn aggressive() -> Self
pub fn aggressive() -> Self
Create a configuration for aggressive optimization (more iterations).
Sourcepub fn with_negation_opt(self, enable: bool) -> Self
pub fn with_negation_opt(self, enable: bool) -> Self
Builder method to enable/disable negation optimization.
Sourcepub fn with_constant_folding(self, enable: bool) -> Self
pub fn with_constant_folding(self, enable: bool) -> Self
Builder method to enable/disable constant folding.
Sourcepub fn with_algebraic_simplification(self, enable: bool) -> Self
pub fn with_algebraic_simplification(self, enable: bool) -> Self
Builder method to enable/disable algebraic simplification.
Sourcepub fn with_max_iterations(self, max: usize) -> Self
pub fn with_max_iterations(self, max: usize) -> Self
Builder method to set maximum iterations.
Sourcepub fn with_stop_on_fixed_point(self, stop: bool) -> Self
pub fn with_stop_on_fixed_point(self, stop: bool) -> Self
Builder method to enable/disable fixed-point detection.
Sourcepub fn with_strength_reduction(self, enable: bool) -> Self
pub fn with_strength_reduction(self, enable: bool) -> Self
Builder method to enable/disable strength reduction.
Sourcepub fn with_distributivity(self, enable: bool) -> Self
pub fn with_distributivity(self, enable: bool) -> Self
Builder method to enable/disable distributivity optimization.
Sourcepub fn with_quantifier_opt(self, enable: bool) -> Self
pub fn with_quantifier_opt(self, enable: bool) -> Self
Builder method to enable/disable quantifier optimization.
Sourcepub fn with_dead_code_elimination(self, enable: bool) -> Self
pub fn with_dead_code_elimination(self, enable: bool) -> Self
Builder method to enable/disable dead code elimination.
Trait Implementations§
Source§impl Clone for PipelineConfig
impl Clone for PipelineConfig
Source§fn clone(&self) -> PipelineConfig
fn clone(&self) -> PipelineConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more