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§
- Compiler
Pass Stats - Timing and reduction statistics for a single pass execution.
- Compiler
Pipeline - Full compiler optimization pipeline.
- Compiler
Pipeline Config - Controls which passes are enabled and how the full pipeline is configured.
- Compiler
Pipeline Result - Output of a full pipeline run: the transformed expression plus collected statistics.
- Compiler
Pipeline Stats - Aggregate statistics for an entire pipeline run.
- Pass
Benchmark - Benchmarking statistics across multiple repeated runs of the same pass.
Enums§
- Compiler
Pass Id - Identifies a single pass in the compiler pipeline.
- Compiler
Pass Order - Canonical ordering in which passes are applied during one outer iteration.