0xMiden / 0xMiden/air-script

Consider moving MIR's constant propagation to the AIR

Open
#446 0 comments 0 reactions 0 assignees View on GitHub
IR
Dominant language
Rust
Stars
96
Forks
39
PR merge metrics
No merged PRs in 30d

Description

In https://github.com/0xMiden/air-script/pull/439, we've added a Constant Propagation / Folding pass at the end of the MIR. If it were in the AIR instead, it may be easier to implement (less node types and simpler graph structure).

We should check if it is possible to move it, and do so if it is.

A potential reason to keep it where it is is to ensure that computed indices (https://github.com/0xMiden/air-script/pull/444) are folded before the end of MIR. This ensures that we do not have to handle vectors in the AIR (or during lowering of MIR to AIR). But we could also implement index folding separately and move the full constant folding pass.

_Originally posted by @bobbinth in https://github.com/0xMiden/air-script/pull/439#pullrequestreview-3134694529_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.