Document the RWM pipeline passes#92
Conversation
Add comprehensive markdown documentation for each pass in the read-write registers pipeline: liveness analysis, register allocation, flattening (including parallel copy sequencing), and jump removal. Also add a pipeline overview document linking them together. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Why only RWM passes gets documented? |
|
I am still reviewing the text, but this is very prone to become stale... |
Because it's the main backend atm |
| ### Correctness Guarantee | ||
|
|
||
| Every destination register appears exactly once (precondition). The algorithm | ||
| produces a valid sequential ordering that achieves the same effect as executing all | ||
| copies simultaneously. At most one temporary register is needed, and it is avoided | ||
| entirely when the copy graph is acyclic or has trees attached to cycles. |
There was a problem hiding this comment.
This is superfluous since no proof is provided.
There was a problem hiding this comment.
I think it's still useful as a document about what's supposed to be guaranteed?
But the common passes are also part of RWM. |
Co-authored-by: Lucas Clemente Vella <lvella@powdrlabs.com>
we can keep update it once in a while |
Let's add that too then. |
Co-authored-by: Lucas Clemente Vella <lvella@powdrlabs.com>
Co-authored-by: Lucas Clemente Vella <lvella@powdrlabs.com>
Co-authored-by: Lucas Clemente Vella <lvella@powdrlabs.com>
Co-authored-by: Lucas Clemente Vella <lvella@powdrlabs.com>
Co-authored-by: Lucas Clemente Vella <lvella@powdrlabs.com>
Co-authored-by: Lucas Clemente Vella <lvella@powdrlabs.com>
Co-authored-by: Lucas Clemente Vella <lvella@powdrlabs.com>
Add documentation for each pass in the shared frontend pipeline, following the same style as the existing RWM pipeline docs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| - Break targets are resolved relative to frame boundaries, not block nesting. | ||
| This is important because the backends allocate registers per-frame (per | ||
| function or per loop body), not per-block. |
There was a problem hiding this comment.
Don't understand this paragraph. I suggest removing it.
| The pass simulates WASM execution using two structures that track where each | ||
| value lives: |
There was a problem hiding this comment.
| The pass simulates WASM execution using two structures that track where each | |
| value lives: | |
| The pass statically resolves the WASM stack evolution using two structures that | |
| track where each value lives: |
Summary
PIPELINE.md) with an ASCII stage diagram linking to all pass docsTest plan
🤖 Generated with Claude Code