Asama 4.3 — Implement OptimizationPass interface and OptimizationManager #50

Closed
opened 2026-05-26 19:52:28 +03:00 by saqut · 0 comments
Owner

Goal: Create a framework for pluggable optimization passes.

Files to create:

  • src/opt/optimization_pass.hpp (new)
  • src/opt/optimization_manager.hpp (new)

Requirements:

  • OptimizationPass abstract class with run(ASTNode*, SymbolTable*) -> bool.
  • OptimizationManager holds list of passes, runs them in order based on CompilerConfig.
  • Initially two passes: ConstantFoldingPass and DeadCodeEliminationPass (empty impl for now).
  • --skip-constant-folding flag skips that pass.

Success criteria:

  • OptimizationManager runs (even if passes are no-ops for now).
  • Feature flags control which passes execute.
**Goal:** Create a framework for pluggable optimization passes. **Files to create:** - src/opt/optimization_pass.hpp (new) - src/opt/optimization_manager.hpp (new) **Requirements:** - OptimizationPass abstract class with run(ASTNode*, SymbolTable*) -> bool. - OptimizationManager holds list of passes, runs them in order based on CompilerConfig. - Initially two passes: ConstantFoldingPass and DeadCodeEliminationPass (empty impl for now). - --skip-constant-folding flag skips that pass. **Success criteria:** - OptimizationManager runs (even if passes are no-ops for now). - Feature flags control which passes execute.
saqut closed this issue 2026-06-14 21:53:20 +03:00
Sign in to join this conversation.
No description provided.