Stream: git-wasmtime

Topic: wasmtime / PR #13498 Eagerly allocate stack map spill slo...


view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 18:53):

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:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 18:53):

fitzgen requested cfallin for a review on PR #13498.

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 18:53):

fitzgen requested wasmtime-compiler-reviewers for a review on PR #13498.

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 18:53):

fitzgen requested wasmtime-core-reviewers for a review on PR #13498.

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 18:54):

:thumbs_up: cfallin submitted PR review:

Thanks!

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 18:55):

cfallin has enabled auto merge for PR #13498.

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 18:58):

fitzgen updated PR #13498.

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 19:51):

:memo: vouillon submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 19:51):

: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 in live_across_any_safepoint.

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 20:03):

fitzgen updated PR #13498.

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 20:03):

:memo: fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 20:03):

:speech_balloon: fitzgen created PR review comment:

Good point!

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 20:03):

fitzgen has disabled auto merge for PR #13498.

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 20:03):

fitzgen has enabled auto merge for PR #13498.

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 20:04):

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:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 20:12):

fitzgen added PR #13498 Eagerly allocate stack map spill slots when processing a block to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 20:37):

:check: fitzgen merged PR #13498.

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 20:37):

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