[Wasm RyuJIT] Move genHomeRegisterParams' output out of the prolog#125398
Merged
kg merged 3 commits intodotnet:mainfrom Mar 10, 2026
Merged
[Wasm RyuJIT] Move genHomeRegisterParams' output out of the prolog#125398kg merged 3 commits intodotnet:mainfrom
kg merged 3 commits intodotnet:mainfrom
Conversation
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR increases the instruction-group (IG) buffer sizing for the Wasm JIT to avoid prolog IG overflows in methods with very large parameter lists (e.g., Vector256.Create), aligning Wasm behavior with other architectures that already use larger prolog IG buffers.
Changes:
- Adds a Wasm-specific
SC_IG_BUFFER_NUM_*configuration to allocate a larger IG buffer for prolog generation. - Moves
EMIT_MAX_IG_INS_COUNTearlier inemit.hand reuses it to size the Wasm large-descriptor buffer.
SingleAccretion
approved these changes
Mar 10, 2026
Contributor
SingleAccretion
left a comment
There was a problem hiding this comment.
I've looked a bit into relaxing the IG restriction, and it is very possible, just slightly tricky since we don't generate prologs/epilogs "in order" (the prolog IG is physically first, but generated after the 'main code' groups).
jakobbotsch
reviewed
Mar 10, 2026
SingleAccretion
approved these changes
Mar 10, 2026
Member
Author
|
cc @dotnet/jit-contrib |
jakobbotsch
approved these changes
Mar 10, 2026
Copilot AI
pushed a commit
that referenced
this pull request
Mar 13, 2026
…125398) Addresses #125200 genHomeRegisterParams normally emits into the prolog, which is limited to one insn group. On wasm we can need to generate a nearly unbounded amount of code for this, so I've moved the codegen to the first basic block instead, like swift structs. Also fixes an uninitialized insGroup member I found while debugging.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #125200
Also fixes an uninitialized insGroup member I found while debugging.
EDIT: genHomeRegisterParams normally emits into the prolog, which is limited to one insn group. On wasm we can need to generate a nearly unbounded amount of code for this, so I've moved the codegen to the first basic block instead, like swift structs.