fitzgen opened PR #13498 from fitzgen:wasmtime-issue-13480 to bytecodealliance:main:
In the safepoint spiller, eagerly allocate stack map spill slots when processing a block. This ensures that values that are live-out in the same block can never share a single stack map spill slot, which could otherwise happen with loop-invariant values that need inclusion in stack maps but which "don't" have an overlapping live range with a value defined inside the loop body if you only consider a single iteration (which is effectively what ignoring the live-out set accidentally did).
Supersedes https://github.com/bytecodealliance/wasmtime/pull/13480
<!--
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 cfallin for a review on PR #13498.
fitzgen requested wasmtime-compiler-reviewers for a review on PR #13498.
fitzgen requested wasmtime-core-reviewers for a review on PR #13498.
:thumbs_up: cfallin submitted PR review:
Thanks!
cfallin has enabled auto merge for PR #13498.
fitzgen updated PR #13498.
:memo: vouillon submitted PR review.
:speech_balloon: vouillon created PR review comment:
There are many tests where a value is spilled and never reloaded.
I think stack slots should only be allocated for values inlive_across_any_safepoint.
fitzgen updated PR #13498.
:memo: fitzgen submitted PR review.
:speech_balloon: fitzgen created PR review comment:
Good point!
fitzgen has disabled auto merge for PR #13498.
fitzgen has enabled auto merge for PR #13498.
fitzgen edited PR #13498:
In the safepoint spiller, eagerly allocate stack map spill slots when processing a block. This ensures that values that are live-out in the same block can never share a single stack map spill slot, which could otherwise happen with loop-invariant values that need inclusion in stack maps but which "don't" have an overlapping live range with a value defined inside the loop body if you only consider a single iteration (which is effectively what ignoring the live-out set accidentally did).
Supersedes https://github.com/bytecodealliance/wasmtime/pull/13480
Fixes https://github.com/bytecodealliance/wasmtime/issues/13461
<!--
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 added PR #13498 Eagerly allocate stack map spill slots when processing a block to the merge queue.
:check: fitzgen merged PR #13498.
fitzgen removed PR #13498 Eagerly allocate stack map spill slots when processing a block from the merge queue.
Last updated: Jun 01 2026 at 09:49 UTC