pub struct PassManager {
pub max_iterations: u32,
/* private fields */
}Expand description
Manages a pipeline of optimization passes with dependency ordering.
Passes are executed in topological order based on their declared dependencies. Cycle detection uses Kahn’s algorithm.
Fields§
§max_iterations: u32Maximum number of fixed-point iterations.
Implementations§
Source§impl PassManager
impl PassManager
Sourcepub fn add_dependency(
&mut self,
pass: impl Into<String>,
depends_on: impl Into<String>,
)
pub fn add_dependency( &mut self, pass: impl Into<String>, depends_on: impl Into<String>, )
Add a dependency: pass depends on depends_on.
Sourcepub fn record_run(&mut self, name: &str, changes: usize, duration_us: u64)
pub fn record_run(&mut self, name: &str, changes: usize, duration_us: u64)
Record a run of the named pass.
Sourcepub fn num_passes(&self) -> usize
pub fn num_passes(&self) -> usize
Number of registered passes.
Sourcepub fn topological_order(&self) -> Option<Vec<String>>
pub fn topological_order(&self) -> Option<Vec<String>>
Compute topological ordering of passes using Kahn’s algorithm.
Returns None if there is a cycle in the dependency graph.
Sourcepub fn total_changes(&self) -> usize
pub fn total_changes(&self) -> usize
Total changes across all passes.
Sourcepub fn total_runs(&self) -> u32
pub fn total_runs(&self) -> u32
Total runs across all passes.
Trait Implementations§
Source§impl Debug for PassManager
impl Debug for PassManager
Source§impl Default for PassManager
impl Default for PassManager
Source§fn default() -> PassManager
fn default() -> PassManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PassManager
impl RefUnwindSafe for PassManager
impl Send for PassManager
impl Sync for PassManager
impl Unpin for PassManager
impl UnsafeUnpin 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