Asama 6.2 — Implement Dead Code Elimination #53

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

Goal: Remove code that is provably unreachable.

Files to create:

  • src/opt/dead_code_elim.hpp (new)

Requirements:

  • Remove statements after return, break, continue in same block.
  • Remove if (false) branches.
  • Remove while (false) bodies.
  • Remove unused variable declarations.

Success criteria:

  • return; x = 5; -> assignment removed.
  • if (false) { ... } -> entire block removed.
**Goal:** Remove code that is provably unreachable. **Files to create:** - src/opt/dead_code_elim.hpp (new) **Requirements:** - Remove statements after return, break, continue in same block. - Remove if (false) branches. - Remove while (false) bodies. - Remove unused variable declarations. **Success criteria:** - return; x = 5; -> assignment removed. - if (false) { ... } -> entire block removed.
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#53
No description provided.