Skip to content

Combine free and busy register allocation#45135

Merged
kunalspathak merged 17 commits into
dotnet:masterfrom
CarolEidt:CombineAlloc
Dec 7, 2020
Merged

Combine free and busy register allocation#45135
kunalspathak merged 17 commits into
dotnet:masterfrom
CarolEidt:CombineAlloc

Conversation

@CarolEidt

@CarolEidt CarolEidt commented Nov 24, 2020

Copy link
Copy Markdown
Contributor

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

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Nov 24, 2020
@CarolEidt

Copy link
Copy Markdown
Contributor Author

@dotnet/jit-contrib PTAL

Comment thread src/coreclr/src/jit/lsra.cpp Outdated

@kunalspathak kunalspathak left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread src/coreclr/src/jit/lsra.h Outdated
Comment thread src/coreclr/src/jit/lsra.h Outdated
Comment thread src/coreclr/src/jit/lsra.h Outdated
Comment thread src/coreclr/src/jit/lsra.cpp Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use isRegBusy()?

Comment thread src/coreclr/src/jit/lsra.cpp Outdated
Comment thread src/coreclr/src/jit/lsra.cpp Outdated
Comment thread src/coreclr/src/jit/lsra.cpp Outdated
Comment thread src/coreclr/src/jit/lsra.cpp Outdated
Comment thread src/coreclr/src/jit/lsra.cpp Outdated
Comment thread src/coreclr/src/jit/lsra.cpp Outdated

Copy link
Copy Markdown
Contributor

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 ?

Copy link
Copy Markdown
Contributor

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.

@CarolEidt CarolEidt left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks!

@kunalspathak kunalspathak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kunalspathak kunalspathak merged commit 86bdbf7 into dotnet:master Dec 7, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Jan 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[LSRA][RyuJIT] Consider merging allocating free & busy regs

5 participants