Skip to content
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

JIT should support custom ClassLayout instances with GC refs #103362

Closed
jakobbotsch opened this issue Jun 12, 2024 · 4 comments · Fixed by #112064
Closed

JIT should support custom ClassLayout instances with GC refs #103362

jakobbotsch opened this issue Jun 12, 2024 · 4 comments · Fixed by #112064
Assignees
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI in-pr There is an active PR which will close this issue when it is merged
Milestone

Comments

@jakobbotsch
Copy link
Member

Similar to the support for block layouts we should generalize the support to support arbitrary GC refs. This would be beneficial for object stack allocation to represent some layouts (like boxes). It would also potentially allow describing some more efficient handling of remainders in physical promotion.

We may also want to add the ability to describe the significant ranges of the layout such that physical promotion can efficiently handle padding in these custom layouts.

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jun 12, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Jun 12, 2024
@jakobbotsch jakobbotsch added area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI and removed untriaged New issue has not been triaged by the area owner needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Jun 12, 2024
@jakobbotsch jakobbotsch self-assigned this Jun 12, 2024
Copy link
Contributor

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

@AndyAyersMS
Copy link
Member

I have a version of this for boxed value classes but I think a full solution requires that this also wrap most/all uses of class handles, so we can transparently describe types that currently have no VM model. We may also need to separate class identity from layout or something, eg a boxed value class has a different layout than the value class but conceptually similar identity.

@JulieLeeMSFT JulieLeeMSFT added this to the 9.0.0 milestone Jun 12, 2024
@jakobbotsch
Copy link
Member Author

When I worked on #83036 I found that we didn't actually have that many dependencies on the class handle: having layouts with class handles for parameters and IL locals seemed to be enough. I think we can keep that invariant around and allow other locals to have custom layouts without much additional required effort, but I may be wrong.

@AndyAyersMS
Copy link
Member

If you look at the first two or three commits in #103361 you can see what I started with, before switching to KVP (and might bring back, given KVP's auto layout issue).

@jakobbotsch jakobbotsch modified the milestones: 9.0.0, 10.0.0 Aug 1, 2024
@dotnet-policy-service dotnet-policy-service bot added the in-pr There is an active PR which will close this issue when it is merged label Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI in-pr There is an active PR which will close this issue when it is merged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants