Asama 4.3 — Implement OptimizationPass interface and OptimizationManager #50

Open
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.
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: saqut/saqut-compiler#50
No description provided.