pub struct PassManager { /* private fields */ }Expand description
Orchestrates execution of ModulePasses on a module.
Each transform automatically invalidates all cached analyses after changing MIR.
Implementations§
Source§impl PassManager
impl PassManager
Sourcepub fn add_pass(&mut self, pass: Box<dyn ModulePass>)
pub fn add_pass(&mut self, pass: Box<dyn ModulePass>)
Adds a transformation pass to the pipeline.
Sourcepub const fn set_validate_after_each(&mut self, enabled: bool)
pub const fn set_validate_after_each(&mut self, enabled: bool)
Enables or disables MIR validation after every pass.
Sourcepub fn run(&mut self, module: &mut Module) -> (AnalysisManager, bool)
pub fn run(&mut self, module: &mut Module) -> (AnalysisManager, bool)
Runs all transforms in order on the given module.
Returns an AnalysisManager and whether any transform changed MIR.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for PassManager
impl !Send for PassManager
impl !Sync for PassManager
impl !UnwindSafe for PassManager
impl Freeze for PassManager
impl Unpin for PassManager
impl UnsafeUnpin for PassManager
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
Source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more