fitzgen opened PR #10956 from fitzgen:legalization-separate-traversal to bytecodealliance:main:
Notably, make sure that we aren't using the same
FuncCursorfor traversal and modification, as that makes it hard to follow when the traversal is being moved forward and backed up.Additionally, this makes it so that when we legalize an instruction, we only back up the cursor to continue legalization until we reach a fixed-point when said legalization resulted in something that actually requires further legalization. This should be mildly more efficient, since we can avoid an unnecessary loop iteration and its
matchon the just-legalized instruction data and opcode.<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
fitzgen requested abrown for a review on PR #10956.
fitzgen requested wasmtime-compiler-reviewers for a review on PR #10956.
fitzgen updated PR #10956.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
I think this might be revisiting too much since
prev_posis never updated?
fitzgen submitted PR review.
fitzgen created PR review comment:
Heh, yeah I actually fixed that in a later commit and then realized I never updated the PR and was in the middle of doing that rn
fitzgen submitted PR review.
fitzgen created PR review comment:
good eye!
fitzgen updated PR #10956.
fitzgen has enabled auto merge for PR #10956.
alexcrichton commented on PR #10956:
I think that's https://github.com/bytecodealliance/wasmtime/issues/10000
alexcrichton merged PR #10956.
Last updated: Dec 06 2025 at 06:05 UTC