-
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
Avoid calling GC write barrier for byrefs #89064
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue Detailsnull
|
@jakobbotsch It would be nice to get a compete fix for #80086 in. I have some questions though. (1) Are we willing to take the possible movs time regression on x64 now that it is limited to large structs? New asm diffs are running that are independent of the changes in my last PR. (2) Should I apply the same "byref means stack" logic here and avoid the GC barrier calls for large structs too? Again this would add more movs but they would also likely be folded into rep movs. (3) Should the size limit for the previous PR be removed? My initial thoughts are (1) yes, but (2) I should try it in the next hour, and (3) no, at least not now - the expanded vs rep expansion can/should be reexamined separately if required. [Some background to all of this is that we could rewrite the movs/rep movs logic, but I'm not going to have time to do that.] cc @dotnet/jit-contrib |
I agree with all of your thoughts -- we still have time to see impact on the micro benchmarks from these changes. You could also try to benchmark some of the cases and see if there is any noticeable difference. |
(2) experiment is in #89116. CI is broken for the moment so we won't get automatic results back right away. |
/azp run runtime |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime |
Azure Pipelines successfully started running 1 pipeline(s). |
Draft Pull Request was automatically closed for 30 days of inactivity. Please let us know if you'd like to reopen it. |
Avoid calling CORINFO_HELP_ASSIGN_BYREF for byref locations. This is Jakob's original fix except that it uses the new Layout helpers. It's possible that there originally was confusion with the helper because it accepts a byref to a ref (not a byref to a byref).
This ends up converting some helper calls to movs for large structs (small structs use other instructions after #86820). Often these then combine into a larger rep movs, leading to decent code space wins.
Fixes #80086