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

Add .NET 10 Preview 2 release notes -- Libraries and Runtime #9770

Open
wants to merge 1 commit into
base: dotnet10p2
Choose a base branch
from

Conversation

richlander
Copy link
Member

@richlander richlander commented Feb 26, 2025

This is the space for libraries and runtime improvements. We'll aim to merge this PR by March 7th to align with the planned ship date of March 11th.

Everyone is welcome to add feature descriptions and participate in this process.

Parent PR/branch: #9769.

@hez2010
Copy link

hez2010 commented Mar 4, 2025

Adding some detailed descriptions based on my PRs for picking up if you would like.

JIT Enhancements

Devirtualization and Inlining Improvements

  • Enable inlining for calls that are late devirtualized
    Late devirtualization can introduce new inline candidates. Previously, these candidates were abandoned, but they can now be marked and inlined seamlessly. Inlining a late devirtualized call can, in turn, create additional devirtualization opportunities, which can then be inlined, further enhancing optimization potential.

  • Sharpen the type of return spilling temp from inlinees
    During inlining, a temporary variable may be created to hold the return value from the callee. Now, the JIT analyzes and updates the type of this temporary variable accordingly. If all return sites in a callee yield the same exact type, this precise type information is utilized for devirtualizing subsequent calls on it.

With these two enhancements, along with recent efforts on array de-abstraction, the JIT can now devirtualize, inline, stack-allocate, and then perform struct promotion on arbitrary enumerators, so that the enumerator abstraction can be entirely eliminated, even without PGO. (Example: https://godbolt.org/z/9svq156Gj)

NativeAOT Enhancements

Type Preinitializer Improvements

  • Support for more opcodes in type preinitializer
    NativeAOT includes a type preinitializer that can execute type initializers (static constructors) without side effects at compile time using an IL interpreter. The results are then embedded directly into the binary, allowing the elimination of these initializers entirely. This update expands support to cover all variants of conv.* and neg opcodes, enabling preinitialization of methods that include casting or negation operations.

@richlander
Copy link
Member Author

Looks great @hez2010 -- Can you create a PR on the branch?

Can you define "late devitalization" in the text? "late" can be used in multiple ways, like "late-stage capitalism". We want to make it clear to readers.

As much as possible, can you align with the format we've used in release notes previously, to match?

Also, if that's too much, I'm happy to do this myself.

@amanasifkhalid
Copy link
Member

As much as possible, can you align with the format we've used in release notes previously, to match?

Also, if that's too much, I'm happy to do this myself.

If it's easier, I can add @hez2010's notes to my batch of JIT notes.

@richlander
Copy link
Member Author

Sounds good @amanasifkhalid. Let's do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants