GreedyRewriteDriverConfig

Struct GreedyRewriteDriverConfig 

Source
pub struct GreedyRewriteDriverConfig { /* private fields */ }
Expand description

Configuration for the greedy rewrite driver.

Implementations§

Source§

impl GreedyRewriteDriverConfig

Source

pub fn new() -> Self

Creates a greedy rewrite driver configuration with default settings.

Source

pub fn set_max_iterations(&self, max: i64)

Sets the maximum number of iterations. Use -1 for no limit.

Source

pub fn max_iterations(&self) -> i64

Returns the maximum number of iterations.

Source

pub fn set_max_num_rewrites(&self, max: i64)

Sets the maximum number of rewrites per iteration. Use -1 for no limit.

Source

pub fn max_num_rewrites(&self) -> i64

Returns the maximum number of rewrites per iteration.

Source

pub fn set_use_top_down_traversal(&self, enabled: bool)

Sets whether to use top-down traversal.

Source

pub fn use_top_down_traversal(&self) -> bool

Returns whether top-down traversal is enabled.

Source

pub fn enable_folding(&self, enabled: bool)

Enables or disables folding during greedy rewriting.

Source

pub fn is_folding_enabled(&self) -> bool

Returns whether folding is enabled.

Source

pub fn set_strictness(&self, strictness: GreedyRewriteStrictness)

Sets the strictness level.

Source

pub fn strictness(&self) -> GreedyRewriteStrictness

Returns the strictness level.

Source

pub fn set_region_simplification_level(&self, level: GreedySimplifyRegionLevel)

Sets the region simplification level.

Source

pub fn region_simplification_level(&self) -> GreedySimplifyRegionLevel

Returns the region simplification level.

Source

pub fn enable_constant_cse(&self, enabled: bool)

Enables or disables constant CSE.

Source

pub fn is_constant_cse_enabled(&self) -> bool

Returns whether constant CSE is enabled.

Source

pub const fn to_raw(&self) -> MlirGreedyRewriteDriverConfig

Converts the config into a raw object.

Trait Implementations§

Source§

impl Default for GreedyRewriteDriverConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Drop for GreedyRewriteDriverConfig

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.