pub struct GreedyRewriteDriverConfig { /* private fields */ }Expand description
Configuration for the greedy rewrite driver.
Implementations§
Source§impl GreedyRewriteDriverConfig
impl GreedyRewriteDriverConfig
Sourcepub fn set_max_iterations(&self, max: i64)
pub fn set_max_iterations(&self, max: i64)
Sets the maximum number of iterations. Use -1 for no limit.
Sourcepub fn max_iterations(&self) -> i64
pub fn max_iterations(&self) -> i64
Returns the maximum number of iterations.
Sourcepub fn set_max_num_rewrites(&self, max: i64)
pub fn set_max_num_rewrites(&self, max: i64)
Sets the maximum number of rewrites per iteration. Use -1 for no limit.
Sourcepub fn max_num_rewrites(&self) -> i64
pub fn max_num_rewrites(&self) -> i64
Returns the maximum number of rewrites per iteration.
Sourcepub fn set_use_top_down_traversal(&self, enabled: bool)
pub fn set_use_top_down_traversal(&self, enabled: bool)
Sets whether to use top-down traversal.
Sourcepub fn use_top_down_traversal(&self) -> bool
pub fn use_top_down_traversal(&self) -> bool
Returns whether top-down traversal is enabled.
Sourcepub fn enable_folding(&self, enabled: bool)
pub fn enable_folding(&self, enabled: bool)
Enables or disables folding during greedy rewriting.
Sourcepub fn is_folding_enabled(&self) -> bool
pub fn is_folding_enabled(&self) -> bool
Returns whether folding is enabled.
Sourcepub fn set_strictness(&self, strictness: GreedyRewriteStrictness)
pub fn set_strictness(&self, strictness: GreedyRewriteStrictness)
Sets the strictness level.
Sourcepub fn strictness(&self) -> GreedyRewriteStrictness
pub fn strictness(&self) -> GreedyRewriteStrictness
Returns the strictness level.
Sourcepub fn set_region_simplification_level(&self, level: GreedySimplifyRegionLevel)
pub fn set_region_simplification_level(&self, level: GreedySimplifyRegionLevel)
Sets the region simplification level.
Sourcepub fn region_simplification_level(&self) -> GreedySimplifyRegionLevel
pub fn region_simplification_level(&self) -> GreedySimplifyRegionLevel
Returns the region simplification level.
Sourcepub fn enable_constant_cse(&self, enabled: bool)
pub fn enable_constant_cse(&self, enabled: bool)
Enables or disables constant CSE.
Sourcepub fn is_constant_cse_enabled(&self) -> bool
pub fn is_constant_cse_enabled(&self) -> bool
Returns whether constant CSE is enabled.
Sourcepub const fn to_raw(&self) -> MlirGreedyRewriteDriverConfig
pub const fn to_raw(&self) -> MlirGreedyRewriteDriverConfig
Converts the config into a raw object.
Trait Implementations§
Source§impl Default for GreedyRewriteDriverConfig
impl Default for GreedyRewriteDriverConfig
Auto Trait Implementations§
impl Freeze for GreedyRewriteDriverConfig
impl RefUnwindSafe for GreedyRewriteDriverConfig
impl !Send for GreedyRewriteDriverConfig
impl !Sync for GreedyRewriteDriverConfig
impl Unpin for GreedyRewriteDriverConfig
impl UnwindSafe for GreedyRewriteDriverConfig
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