-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Combine free and busy register allocation #45135
Conversation
e6113b9
to
43b5e4b
Compare
@dotnet/jit-contrib PTAL |
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.
@@ -10431,7 +10620,7 @@ void LinearScan::dumpRegRecords() | |||
#endif // FEATURE_PARTIAL_SIMD_CALLEE_SAVE | |||
printf("%c", activeChar); | |||
} | |||
else if (regRecord.isBusyUntilNextKill) | |||
else if ((genRegMask(regNum) & regsBusyUntilKill) != RBM_NONE) |
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()
?
|
||
doubleReg = reg->regNum; | ||
assert(genIsValidDoubleReg(doubleReg)); | ||
RegRecord* anotherHalfReg = getSecondHalfRegRec(reg); |
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
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!
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