Skip to content

SSA v2#37

Merged
pufferfish101007 merged 9 commits into
mainfrom
ssa-v2
Dec 16, 2025
Merged

SSA v2#37
pufferfish101007 merged 9 commits into
mainfrom
ssa-v2

Conversation

@pufferfish101007
Copy link
Copy Markdown
Member

@pufferfish101007 pufferfish101007 commented Dec 16, 2025

Rewrites the variable type analysis phase (now called SSA, because that's essentially what it is).

The new algorithm is largely similar but has more of a focus on viewing steps from the outside, at the point at which paths converge, rather than trying to do everything from the perspective of inside the step. This makes things a little cleaner and easier to reason about.

This also fixes #29.

Also includes changes to the CallIndirect scheduler that fixes #30.

Still todo:

  • Fix SSA propagation within warped loops - values at the end of loops need to be propagated into the containers that they use at the beginning of the loop.
  • Fix SSA propagation out of warped loops - if the loop never runs, the SSAs at the phi node will never be initialised. Maybe need to add an addition "cleanup" field to the loop opcode to deal with this. This will likely be the same fix as for the above point.
  • Investigate - does the phi function need to consider that the lower steps may yield before the phi nodes take effect? Hopefully not, since SSA maps are fully propagated within visit_step if the step yields at the end - but need to make sure.

@pufferfish101007 pufferfish101007 merged commit 45d32a5 into main Dec 16, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Projects never stop when using CallIndirect scheduler Some non-warped nested loops never terminate

1 participant