Skip to main content

Module pipeline

Module pipeline 

Source
Expand description

Full compiler optimization pipeline for TLExpr expressions.

This module provides a top-level CompilerPipeline that chains all compiler passes in configurable order:

ConstProp → DeadCode → Inline → [Algebraic / OptimizationPipeline] → Rewrite

Unlike the algebraic-only crate::optimize::OptimizationPipeline, the CompilerPipeline integrates the newer passes added in v0.1.11–v0.1.16 (constant propagation, dead-code elimination, let-inlining, pattern-rewriting) and supports outer fixed-point iteration across all passes.

§Quick Start

use tensorlogic_compiler::pipeline::{CompilerPipeline, CompilerPipelineConfig};
use tensorlogic_ir::TLExpr;

let pipeline = CompilerPipeline::with_default();
let expr = TLExpr::add(
    TLExpr::mul(TLExpr::Constant(2.0), TLExpr::Constant(3.0)),
    TLExpr::Constant(0.0),
);
let result = pipeline.run(expr);
println!("{}", result.stats.summary());

Structs§

CompilerPassStats
Timing and reduction statistics for a single pass execution.
CompilerPipeline
Full compiler optimization pipeline.
CompilerPipelineConfig
Controls which passes are enabled and how the full pipeline is configured.
CompilerPipelineResult
Output of a full pipeline run: the transformed expression plus collected statistics.
CompilerPipelineStats
Aggregate statistics for an entire pipeline run.
PassBenchmark
Benchmarking statistics across multiple repeated runs of the same pass.

Enums§

CompilerPassId
Identifies a single pass in the compiler pipeline.
CompilerPassOrder
Canonical ordering in which passes are applied during one outer iteration.