Repository navigation
arm64: Select REG_ORDER candidates with ordered masks - #136836
Merged
dhartglassMSFT merged 3 commits intoNov 12, 2026
Merged
dhartglassMSFT merged 3 commits into
dhartglassMSFT merged 3 commits into
Conversation
- Related to dotnet#136694 Use register-mask groups in ARM64 register allocation to preserve the existing register preference order without scanning every candidate's rank. Keep the original scan on other targets and cross-check choices in Checked builds. Against main (b4548da), Release JITs executed 3,999,913,819,224 instructions versus 4,017,017,735,574 on main across seven published Linux ARM64 SuperPMI collections, a 0.426% reduction. SuperPMI asm diffs found no generated code differences among replayed contexts.
|
Azure Pipelines: Successfully started running 6 pipeline(s). 9 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 |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the ARM64 register-selection optimization.
No open issues 🎉
What changed in this PR
This PR reduces ARM64 JIT register-selection work as part of #136694, using ordered register-mask groups to preserve existing register preferences.
Changes:
- Replaces ARM64’s per-candidate rank scan with mask-based selection.
- Retains the rank scan on other targets and cross-checks ARM64 choices in Checked builds.
- Reports a 0.426% instruction-count reduction across seven Linux ARM64 SuperPMI collections, with no generated-code differences in replayed contexts.
| File | Description |
|---|---|
src/coreclr/jit/lsra.cpp |
Adds ARM64 ordered-mask selection to try_REG_ORDER, retaining the fallback scan and Checked-build validation. |
Review effort: Balanced
JulieLeeMSFT
approved these changes
Nov 3, 2026
Change-Id: I36210c8a65045a2fa426619325133ce91a7b31e6
This was referenced Nov 4, 2026
2 of 27 tasks
dhartglassMSFT
enabled auto-merge (squash)
November 12, 2026 00:07
dhartglassMSFT
approved these changes
Nov 12, 2026
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.
Use register-mask groups in ARM64 register allocation to preserve the existing register preference order without scanning every candidate's rank. Keep the original scan on other targets and cross-check choices in Checked builds.
Against main (b4548da), Release JITs executed 3,999,913,819,224 instructions versus 4,017,017,735,574 on main across seven published Linux ARM64 SuperPMI collections, a 0.426% reduction. SuperPMI asm diffs found no generated code differences among replayed contexts.