Fix for 127141 - Remove unneeded spilling around profiler hooks#128731
Open
dhartglassMSFT wants to merge 4 commits into
Open
Fix for 127141 - Remove unneeded spilling around profiler hooks#128731dhartglassMSFT wants to merge 4 commits into
dhartglassMSFT wants to merge 4 commits into
Conversation
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
Comment on lines
+5905
to
+5906
| // Normally, the only live physReg here would be callee-save (lower half only) d8-d15. | ||
| // But PROF_HOOK fully preserves q0-q7, so an UpperVectorSave here does not require a spill. |
Contributor
Author
There was a problem hiding this comment.
This change should be under arm64 ifdef, pushing a new commit
Comment on lines
+7428
to
+7430
| // PROF_HOOK preserves upper halves of q0-q7, LSRA must be told explicitly that saving these is not needed | ||
| // So skip the save if reg is assigned, ref is a PROF_HOOK, kill set does not contain reg, and reg is not | ||
| // a upper-half-only-called saved reg |
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.
On ARM64, only the lower halves of q8-q15 (128b) are callee save. LSRA spills upper halves of these into d8-d15 (64b subreg)
"UpperVectorSave" ref position tracks these around calls. LSRA currently just does this "upper-half-save-into-d8_d15" for all enregistered uppersave refs around calls.
Problem is
PROF_HOOKdoes NOT kill q0-q7. So we end up with more enregistered refs around a profiler hook than may be handled by d8-d15.Fix is that q0-q7 do not need their upper halves spilled around PROF_HOOK. I double checked with Noah that this is the case. And the asm stub does call out q0-q7 being preserved.
I was not able to recreate a repro, a profiled tail call taking v512 params seems to not be enough.
fixes #127141