Repository navigation
arm64: Fix wrapped consecutive-register spill scoring - #137244
Open
jonathandavies-arm wants to merge 1 commit into
Open
jonathandavies-arm wants to merge 1 commit into
jonathandavies-arm wants to merge 1 commit into
Conversation
- Related to dotnet#136694 Wrapped vector registers start at REG_FP_FIRST in the register mask. Shift the wrapped part of each candidate's mask accordingly so free registers are counted correctly. For V30, V31, V0, V1, use bits 62, 63, 32, 33 instead of 62, 63, 0, 1. This avoids unnecessary spills. Repeated runs of the SpillProbe.Run test showed 8.56% less elapsed time, 7.84% fewer cycles, and 3.04% fewer instructions.
|
Azure Pipelines: Successfully started running 7 pipeline(s). 8 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 |
2 of 27 tasks
Contributor
|
cc: @dotnet/arm64-contrib @dhartglassMSFT |
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.
Wrapped vector registers start at REG_FP_FIRST in the register mask. Shift the wrapped part of each candidate's mask accordingly so free registers are counted correctly. For V30, V31, V0, V1, use bits 62, 63, 32, 33 instead of 62, 63, 0, 1. This avoids unnecessary spills.
Performance
The targeted
SpillProbe.Runreproducer repeatedly calls a method with highvector-register pressure and a four-register table lookup. I compared ARM64
Release JITs built from the same mainline revision, with only this fix differing.
Both used the same runtime and CoreLib. Each measurement made 40 million calls, with ReadyToRun and tiered compilation disabled. Ten rounds
interleaved the baseline, fix, and a second baseline run as a control. The
figures below are medians; hardware counters cover the whole process.
All runs returned the same checksum. For this workload, the generated
SpillProbe.Runmethod shrank from 280 to 268 bytes. These measurementsdescribe the targeted reproducer rather than a general application workload.