-
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
Optimize BOX+UNBOX for "T? -> T" and "T -> T?" #104931
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
@AndyAyersMS @jakobbotsch @dotnet/jit-contrib PTAL, not too many diffs (SPMI is empty due to missing contexts I add here, but there are hits in tests and a few in libs). As part of the effort to make Nullable a bit better. I am going to re-use NOTE: I am using raw IND/BLK here instead of LCL_FLD because of |
I don't really follow -- why is that simpler? |
because apparently it's not that simple to do LclFld store/load for a struct with a T field where T could be struct? Like when I do |
@jakobbotsch thanks for the suggestions! I rewrote to |
This reverts commit 9df4f7f.
Remove heap allocations for such box+unbox patterns when nullable is involved.
Current codegen for
Test<int?, int>
andTest<int, int?>
:New codegen for
Test<int?, int>
andTest<int, int?>
: