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: add option to choose guarded devirt class randomly #53399

Merged
merged 1 commit into from
Jun 1, 2021

Conversation

AndyAyersMS
Copy link
Member

Add a config setting to randomly choose one of the observed classes for
guarded devirtualization, rather than the most likely class.

Add a config setting to randomly choose one of the observed classes for
guarded devirtualization, rather than the most likely class.
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label May 28, 2021
@AndyAyersMS
Copy link
Member Author

cc @dotnet/jit-contrib

//
// This code can runs without a jit instance present, so JITDUMP and related
// cannot be used.
//
Copy link
Member

@EgorBo EgorBo May 28, 2021

Choose a reason for hiding this comment

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

BTW, so do we want to be able to return LikelyClass even without the PGO (class probes) for interfaces/classes with known single implementations? E.g. ILLink, during trimming, could compose a list, save to a file and jit could consult with it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Anything text-based might be tricky to get right in general (parsing generics, etc). It's not clear to me how robust our setup is to potentially truly random guesses.

@AndyAyersMS
Copy link
Member Author

Linker test failure is almost certainly unrelated.

@AndyAyersMS AndyAyersMS merged commit 22640e1 into dotnet:main Jun 1, 2021
@AndyAyersMS AndyAyersMS deleted the RandomishGdv branch June 1, 2021 15:55
@ghost ghost locked as resolved and limited conversation to collaborators Jul 1, 2021
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants