pub struct PassManager { /* private fields */ }Expand description
Runs optimization passes on an IR module.
Implementations§
Source§impl PassManager
impl PassManager
Sourcepub fn add_pass<P: OptimizationPass + 'static>(&mut self, pass: P) -> &mut Self
pub fn add_pass<P: OptimizationPass + 'static>(&mut self, pass: P) -> &mut Self
Add a pass to the manager.
Sourcepub fn max_iterations(&mut self, n: usize) -> &mut Self
pub fn max_iterations(&mut self, n: usize) -> &mut Self
Set the maximum number of iterations.
Sourcepub fn run(&self, module: &mut IrModule) -> OptimizationResult
pub fn run(&self, module: &mut IrModule) -> OptimizationResult
Run all passes on the module.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PassManager
impl !RefUnwindSafe for PassManager
impl !Send for PassManager
impl !Sync for PassManager
impl Unpin for PassManager
impl !UnwindSafe 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