Repository navigation
JIT: Reuse destination locals as CSE temporaries - #137838
Open
NinoFloris wants to merge 2 commits into
Open
NinoFloris wants to merge 2 commits into
NinoFloris wants to merge 2 commits into
Conversation
|
Azure Pipelines: Successfully started running 5 pipeline(s). 10 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
NinoFloris
force-pushed
the
jit/cse-store-local-temp
branch
from
November 18, 2026 22:12
76b8c27 to
67324c9
Compare
NinoFloris
marked this pull request as ready for review
November 19, 2026 01:01
Contributor
|
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara |
3 tasks
This comment was marked as resolved.
This comment was marked as resolved.
NinoFloris
force-pushed
the
jit/cse-store-local-temp
branch
from
November 29, 2026 18:32
67324c9 to
078c37d
Compare
NinoFloris
marked this pull request as draft
November 29, 2026 20:51
NinoFloris
marked this pull request as ready for review
November 29, 2026 20:51
Keep the destination store and its SSA name when a single CSE definition feeds a local. For a local with multiple definitions, walk backwards from each replacement use to verify that the same store reaches it on every path. Preserve constant propagation for reused locals and use a fresh temp when the destination must remain visible to an exception handler.
Recognize reused destinations as CSE temps and handle their propagation in assertion propagation and VN folding. When a local has multiple stores and can stay in a register, keep the read if the constant costs more to materialize. Allow propagation when it can eliminate the only store or avoid a stack load.
NinoFloris
force-pushed
the
jit/cse-store-local-temp
branch
from
December 2, 2026 15:59
f7f29f6 to
3e2c7aa
Compare
This branch has not been deployed
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Reuse the local receiving a single CSE definition, preserving its store and SSA name and extending liveness to the replacement uses.
For locals with other definitions, walk backward from each replacement use, including across loop backedges. Reuse the local only if the first store to it on every incoming path is the CSE definition. Use a fresh temp if a path reaches another store or method entry first, or if the method has EH. This check matters because pruned SSA can omit a phi at a join where the local was dead before CSE added the use.
CI results, aggregated across collections. PerfScore is the geomean over all paired compilations; lower is better in every column.
Missing replay captures are excluded; Windows x86 has 0 baseline misses and 1,955 with the changed JIT.