Struct calyx_opt::pass_manager::PassManager
source · [−]pub struct PassManager { /* private fields */ }
Expand description
Structure that tracks all registered passes for the compiler.
Implementations
sourceimpl PassManager
impl PassManager
pub fn default_passes() -> CalyxResult<Self>
sourceimpl PassManager
impl PassManager
sourcepub fn register_pass<Pass>(&mut self) -> CalyxResult<()>where
Pass: Visitor + ConstructVisitor + Named,
pub fn register_pass<Pass>(&mut self) -> CalyxResult<()>where
Pass: Visitor + ConstructVisitor + Named,
Register a new Calyx pass and return an error if another pass with the same name has already been registered.
Example
let pm = PassManager::default();
pm.register_pass::<WellFormed>()?;
sourcepub fn add_alias(&mut self, name: String, passes: Vec<String>) -> CalyxResult<()>
pub fn add_alias(&mut self, name: String, passes: Vec<String>) -> CalyxResult<()>
Adds a new alias for groups of passes. An alias is a list of strings that represent valid pass names OR an alias. The passes and aliases are executed in the order of specification.
sourcepub fn specific_help(&self, pass: &str) -> Option<String>
pub fn specific_help(&self, pass: &str) -> Option<String>
Return the help string for a specific pass.
sourcepub fn complete_help(&self) -> String
pub fn complete_help(&self) -> String
Return a string representation to show all available passes and aliases. Appropriate for help text.
sourcepub fn execute_plan(
&self,
ctx: &mut Context,
incl: &[String],
excl: &[String],
dump_ir: bool
) -> CalyxResult<()>
pub fn execute_plan(
&self,
ctx: &mut Context,
incl: &[String],
excl: &[String],
dump_ir: bool
) -> CalyxResult<()>
Executes a given “plan” constructed using the incl and excl lists.
Trait Implementations
sourceimpl Default for PassManager
impl Default for PassManager
sourcefn default() -> PassManager
fn default() -> PassManager
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl !RefUnwindSafe for PassManager
impl !Send for PassManager
impl !Sync for PassManager
impl Unpin for PassManager
impl !UnwindSafe for PassManager
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more