Skip to content

Conversation

@jakobbotsch
Copy link
Member

For interface tail calls we currently end up allocating two internal
registers where one of them is forced into R12. LSRA currently does not
always handle the low amount of freedom, in particular with some
jitstressregs scenarios.

Since LR is always free going into a call we can just stop allocating a
register for the null check and use LR always to avoid the problem and
also give LSRA a little less work to do.

Fix #66563

cc @dotnet/jit-contrib

For interface tail calls we currently end up allocating two internal
registers where one of them is forced into R12. LSRA currently does not
always handle the low amount of freedom, in particular with some
jitstressregs scenarios.

Since LR is always free going into a call we can just stop allocating a
register for the null check and use LR always to avoid the problem and
also give LSRA a little less work to do.

Fix dotnet#66563
@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Apr 16, 2022
@ghost ghost assigned jakobbotsch Apr 16, 2022
@ghost
Copy link

ghost commented Apr 16, 2022

Tagging subscribers to this area: @JulieLeeMSFT
See info in area-owners.md if you want to be subscribed.

Issue Details

For interface tail calls we currently end up allocating two internal
registers where one of them is forced into R12. LSRA currently does not
always handle the low amount of freedom, in particular with some
jitstressregs scenarios.

Since LR is always free going into a call we can just stop allocating a
register for the null check and use LR always to avoid the problem and
also give LSRA a little less work to do.

Fix #66563

cc @dotnet/jit-contrib

Author: jakobbotsch
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@jakobbotsch
Copy link
Member Author

This reasoning is right only for tailcalls since for regular calls we could have allocated the target into lr. I think it is better to do this internally in LSRA then, will open a new PR for that.

@jakobbotsch
Copy link
Member Author

Replaced by #68107

@jakobbotsch jakobbotsch deleted the no-register-for-null-check branch April 16, 2022 09:59
@ghost ghost locked as resolved and limited conversation to collaborators May 16, 2022
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.

Test failure JIT/Regression/JitBlue/DevDiv_461649/DevDiv_461649/DevDiv_461649.sh

1 participant