dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.03k stars 4.67k forks source link

JIT: Teach physical promotion to peel FIELD_ADDR nodes #88386

Open jakobbotsch opened 1 year ago

jakobbotsch commented 1 year ago

https://github.com/dotnet/runtime/pull/88109#issuecomment-1620486231

Block morphing gets it for free because they get morphed away. In physical promotion it's a bit more complicated as we need to guarantee the right null checking behavior.

ghost commented 1 year ago

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

Issue Details
https://github.com/dotnet/runtime/pull/88109#issuecomment-1620486231 Block morphing gets it for free because they get morphed away. In physical promotion it's a bit more complicated as we need to guarantee the right null checking behavior.
Author: jakobbotsch
Assignees: jakobbotsch
Labels: `area-CodeGen-coreclr`
Milestone: -
jakobbotsch commented 1 year ago

bit more complicated as we need to guarantee the right null checking behavior.

Actually may not be too bad given that we are going to dereference the FIELD_ADDR immediately anyway, so it may just fall out from the null check insertion logic that is already there.