Skip to main content

PassManager

Struct PassManager 

Source
pub struct PassManager<'c> { /* private fields */ }
Expand description

A pass manager.

Implementations§

Source§

impl PassManager<'_>

Source

pub fn new(context: &Context) -> Self

Creates a pass manager.

Source

pub fn nested_under(&self, name: &str) -> OperationPassManager<'_, '_>

Returns an operation pass manager for nested operations corresponding to a given name.

Source

pub fn add_pass(&self, pass: Pass)

Adds a pass.

Source

pub fn enable_verifier(&self, enabled: bool)

Enables a verifier.

Source

pub fn enable_ir_printing(&self)

Enables IR printing.

Source

pub fn run(&self, module: &mut Module<'_>) -> Result<(), Error>

Runs passes added to a pass manager against a module.

Source

pub fn as_operation_pass_manager(&self) -> OperationPassManager<'_, '_>

Converts a pass manager to an operation pass manager.

Source

pub unsafe fn from_raw(raw: MlirPassManager) -> Self

Creates a PassManager from the given raw pointer.

§Safety

Caller must ensure this is a valid PassManager pointer.

Source

pub const fn to_raw(&self) -> MlirPassManager

Gets the raw object of this pass manager.

Source

pub const fn into_raw(self) -> MlirPassManager

Converts a PassManager into an owned raw object.

Trait Implementations§

Source§

impl Drop for PassManager<'_>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<'c> Freeze for PassManager<'c>

§

impl<'c> RefUnwindSafe for PassManager<'c>

§

impl<'c> !Send for PassManager<'c>

§

impl<'c> !Sync for PassManager<'c>

§

impl<'c> Unpin for PassManager<'c>

§

impl<'c> UnsafeUnpin for PassManager<'c>

§

impl<'c> UnwindSafe for PassManager<'c>

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.