Skip to main content

Options

Struct Options 

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

Builder for pass manager options.

Controls debug logging, IR verification, and extension point pipeline additions. Pass to ModulePassManager or FunctionPassManager constructors via Option<&Options>.

Implementations§

Source§

impl Options

Source

pub fn new() -> Self

Create default options (debug logging off, verify each off).

Source

pub fn debug_logging(&mut self, val: bool) -> &mut Self

Enable or disable debug logging output during pass execution.

Source

pub fn verify_each(&mut self, val: bool) -> &mut Self

Enable or disable IR verification after each pass.

Source

pub fn add_peephole_ep(&mut self, pipeline: &str) -> &mut Self

Add a pass pipeline at the peephole extension point (after instcombine, function-level).

Source

pub fn add_optimizer_early_ep(&mut self, pipeline: &str) -> &mut Self

Add a pass pipeline at the optimizer-early extension point (module-level).

Source

pub fn add_optimizer_last_ep(&mut self, pipeline: &str) -> &mut Self

Add a pass pipeline at the optimizer-last extension point (module-level).

Source

pub fn add_vectorizer_start_ep(&mut self, pipeline: &str) -> &mut Self

Add a pass pipeline at the vectorizer-start extension point (function-level).

Source

pub fn add_scalar_optimizer_late_ep(&mut self, pipeline: &str) -> &mut Self

Add a pass pipeline at the scalar-optimizer-late extension point (function-level).

Source

pub fn add_pipeline_start_ep(&mut self, pipeline: &str) -> &mut Self

Add a pass pipeline at the pipeline-start extension point (module-level).

Source

pub fn add_pipeline_early_simplification_ep( &mut self, pipeline: &str, ) -> &mut Self

Add a pass pipeline at the pipeline-early-simplification extension point (module-level).

Trait Implementations§

Source§

impl Default for Options

Source§

fn default() -> Self

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

impl Drop for Options

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. 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.