pub trait OptPass: Debug {
// Required methods
fn name(&self) -> &str;
fn run_pass(&mut self, decls: &mut [LcnfFunDecl]) -> usize;
// Provided methods
fn is_enabled(&self) -> bool { ... }
fn dependencies(&self) -> Vec<&str> { ... }
}Expand description
Trait for optimization passes that operate on LCNF function declarations.
Required Methods§
Sourcefn run_pass(&mut self, decls: &mut [LcnfFunDecl]) -> usize
fn run_pass(&mut self, decls: &mut [LcnfFunDecl]) -> usize
Run the pass on a set of declarations, returning the number of changes made.
Provided Methods§
Sourcefn is_enabled(&self) -> bool
fn is_enabled(&self) -> bool
Whether this pass is enabled.
Sourcefn dependencies(&self) -> Vec<&str>
fn dependencies(&self) -> Vec<&str>
Dependencies: names of passes that must run before this one.