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 struct work planned for .NET 8 #76931

Closed
13 of 20 tasks
jakobbotsch opened this issue Oct 12, 2022 · 6 comments
Closed
13 of 20 tasks

JIT struct work planned for .NET 8 #76931

jakobbotsch opened this issue Oct 12, 2022 · 6 comments
Assignees
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI User Story A single user-facing feature. Can be grouped under an epic.
Milestone

Comments

@jakobbotsch
Copy link
Member

jakobbotsch commented Oct 12, 2022

This issue captures the planned work items for .NET 8 with respect to struct improvements. Smaller workitems that the larger workitems depend on may also be tracked here. This list is expected to change throughout the release cycle according to ongoing planning and discussions, with possible additions and subtractions to the scope.

Planned for .NET 8

Q4 2022

Jan-Mar 2023

Apr-Jun 2023

See #76928.

Future/Interesting

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Oct 12, 2022
@jakobbotsch jakobbotsch added User Story A single user-facing feature. Can be grouped under an epic. 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 labels Oct 12, 2022
@jakobbotsch jakobbotsch added this to the 8.0.0 milestone Oct 12, 2022
@ghost
Copy link

ghost commented Oct 12, 2022

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

Issue Details

This issue captures the planned work items for .NET 8 with respect to struct improvements. Smaller workitems that the larger workitems depend on may also be tracked here. This list is expected to change throughout the release cycle according to ongoing planning and discussions, with possible additions and subtractions to the scope.

Planned for .NET 8

Q4 2022

2023

Interesting

  • Struct SSA
  • Removal existing promotion (or perhaps just dependent promotion)
  • Support field reconstruction with bitwise ops at ABI boundaries
  • Support promotion of non-overlapping parts of structs with overlapping fields
  • Support partial lifetime promotion (Regressions due to QJFL and OSR  #67594 (comment))
Author: jakobbotsch
Assignees: -
Labels:

area-CodeGen-coreclr, User Story

Milestone: -

@jakobbotsch
Copy link
Member Author

cc @dotnet/jit-contrib

@SingleAccretion
Copy link
Contributor

remove existing dependent promotion

This would imply teaching liveness to work with parts of non-promoted aggregates (this case is the only benefit of PROMOTION_TYPE_DEPENDENT as it exists today, AFAIK).

Struct SSA

What kind of enhancements?

#68797

Note this is just an odd limitation of the current scheme. It can easily be lifted by "skipping" all trivial struct wrappers, not just those that ultimately simplify down to a primitive.

@jakobbotsch
Copy link
Member Author

jakobbotsch commented Oct 12, 2022

This would imply teaching liveness to work with parts of non-promoted aggregates (this case is the only benefit of PROMOTION_TYPE_DEPENDENT as it exists today, AFAIK).

The idea (hope) would be that the new promotion pass would create IR that never needed DNER and then dependent promotion could be replaced by the general promotion. I'm sure lots of tuning and work would be required here.

Struct SSA

What kind of enhancements?

@AndyAyersMS and I were discussing this a while ago for various copy prop/promotion reasons. Also, some SSA forms allow representing some forms of aliasing, which could be interesting in relation to partial lifetime promotion. This one is probably pretty out there though.
Another thing I talked with Andy about recently is going into SSA form during import to let the inliner have SSA form at its disposal. But it does not seem very realistic given all the code we have that would need to be updated, that's why it's not under any immediate plans.

#68797

Note this is just an odd limitation of the current scheme. It can easily be lifted by "skipping" all trivial struct wrappers, not just > those that ultimately simplify down to a primitive.

Interesting. I guess you quickly hit the 4 field limit though, but I guess we could look into if it would make sense to raise this limit in some cases (e.g. to be able to promote Span<T> inside a ref struct).

@JulieLeeMSFT
Copy link
Member

@jakobbotsch, I am closing this as completed. Let's plan remaining items for future or .NET 9.

@ghost ghost locked as resolved and limited conversation to collaborators Aug 17, 2023
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 User Story A single user-facing feature. Can be grouped under an epic.
Projects
Archived in project
Development

No branches or pull requests

3 participants