pub struct CompilerPipeline { /* private fields */ }Expand description
Full compiler optimization pipeline.
Chains all compiler passes in configurable order with per-pass timing and
aggregate statistics. The outer fixed-point loop repeats the entire pass
sequence until no further nodes are reduced or config.max_outer_iterations
is reached.
Implementations§
Source§impl CompilerPipeline
impl CompilerPipeline
Sourcepub fn new(config: CompilerPipelineConfig) -> Self
pub fn new(config: CompilerPipelineConfig) -> Self
Create a pipeline with the given configuration.
Sourcepub fn with_default() -> Self
pub fn with_default() -> Self
Create a pipeline with the default configuration (all passes enabled).
Sourcepub fn all_passes() -> Self
pub fn all_passes() -> Self
Alias for Self::with_default.
Sourcepub fn no_passes() -> Self
pub fn no_passes() -> Self
Create a pipeline with all passes disabled.
Expressions passed through this pipeline are returned unchanged (other than recording the initial node count in statistics).
Sourcepub fn run(&self, expr: TLExpr) -> CompilerPipelineResult
pub fn run(&self, expr: TLExpr) -> CompilerPipelineResult
Run the full pipeline on expr and return the result with statistics.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CompilerPipeline
impl RefUnwindSafe for CompilerPipeline
impl Send for CompilerPipeline
impl Sync for CompilerPipeline
impl Unpin for CompilerPipeline
impl UnsafeUnpin for CompilerPipeline
impl UnwindSafe for CompilerPipeline
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