- Notifications
You must be signed in to change notification settings - Fork 5.2k
Combine free and busy register allocation #45135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
e6113b9 to 43b5e4b Compare | @dotnet/jit-contrib PTAL |
kunalspathak left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did the first pass and added some questions/clarifications and minor suggestions.
src/coreclr/src/jit/lsra.cpp Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use isRegBusy()?
src/coreclr/src/jit/lsra.cpp Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering why don't we do something like else below i.e. call findAnotherHalfRegRec() instead of getSecondHalfRegRec()? Do things vary if assignedInterval's registerType == TYP_DOUBLE ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment of this method always expect reg to be lower half: "reg" should be a even-numbered float register, i.e. lower half of double register.
Perform register allocation for a given RefPosition with a single traversal of the registers, whether free or busy.
Fix one source of arm32 double diffs.
Fix `nextPhysRefLocation` computation for Arm32
d7a380a to c7b8873 Compare …correctly handling doubles on ARM
CarolEidt left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thanks!
kunalspathak left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Combine register selection to consider free and busy registers in the same method.
Refactor the selection to make it easier to reorder the criteria.
Edit by @kunalspathak:
Fixes: #9399