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

Devirtualize more based on whole program analysis #97812

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

MichalStrehovsky
Copy link
Member

Whole program view lets us figure out whether a virtual method has been overriden by another method, or whether it can be considered final. Add a pass to collect this information and pass it to codegen,

It kicks in less often than I expected (for linear enough hierarchies or not-too-much-derived types we could already do this with guarded devirtualization or type sealing), but I can still a bit over 100 method bodies affected by this in the Stage1 app.

Cc @dotnet/ilc-contrib

Whole program view lets us figure out whether a virtual method has been overriden by another method, or whether it can be considered `final`. Add a pass to collect this information and pass it to codegen,

It kicks in less often than I expected (for linear enough hierarchies or not-too-much-derived types we could already do this with guarded devirtualization or type sealing), but I can still a bit over 100 method bodies affected by this in the Stage1 app.
@ghost
Copy link

ghost commented Feb 1, 2024

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

Issue Details

Whole program view lets us figure out whether a virtual method has been overriden by another method, or whether it can be considered final. Add a pass to collect this information and pass it to codegen,

It kicks in less often than I expected (for linear enough hierarchies or not-too-much-derived types we could already do this with guarded devirtualization or type sealing), but I can still a bit over 100 method bodies affected by this in the Stage1 app.

Cc @dotnet/ilc-contrib

Author: MichalStrehovsky
Assignees: MichalStrehovsky
Labels:

area-NativeAOT-coreclr

Milestone: -

@MichalStrehovsky
Copy link
Member Author

/azp run runtime-nativeaot-outerloop

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@MichalStrehovsky MichalStrehovsky merged commit 4f0216f into dotnet:main Feb 1, 2024
122 of 126 checks passed
@MichalStrehovsky MichalStrehovsky deleted the betterdevirt branch February 1, 2024 23:21
@github-actions github-actions bot locked and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants