Skip to content

JIT: Skip extra SPMI queries when we don't know the exact type #115637

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

Merged
merged 1 commit into from
May 16, 2025

Conversation

amanasifkhalid
Copy link
Member

Fixes #114934.

@Copilot Copilot AI review requested due to automatic review settings May 16, 2025 00:26
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request updates the SPMI query logic by guarding extra queries with a check for a precise type to avoid unnecessary work.

  • Added an extra condition in the SPMI query on stack allocated arrays.
  • Updated comments to reflect the new behavior regarding precise type checks.

//
if (JitConfig.EnableExtraSuperPmiQueries())
if (JitConfig.EnableExtraSuperPmiQueries() && !eeIsSharedInst(resolvedToken.hClass))
Copy link
Preview

Copilot AI May 16, 2025

Choose a reason for hiding this comment

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

Consider expanding the comment to clarify what qualifies as a 'precise type' and what constitutes a shared instance, to improve maintainability and clarity.

Copilot uses AI. Check for mistakes.

@github-actions github-actions bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label May 16, 2025
Copy link
Contributor

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

@amanasifkhalid
Copy link
Member Author

cc @dotnet/jit-contrib, @AndyAyersMS PTAL. I think this is the right guard -- collecting NativeAOT smoke tests locally doesn't hit asserts anymore -- but let me know if I need something broader. Thanks!

@amanasifkhalid
Copy link
Member Author

/ba-g NativeAOT build timeout, and dead-lettered test

@amanasifkhalid amanasifkhalid merged commit 2f8f6e7 into dotnet:main May 16, 2025
106 of 109 checks passed
@amanasifkhalid amanasifkhalid deleted the spmi-query-skip branch May 16, 2025 15:19
@github-actions github-actions bot locked and limited conversation to collaborators Jun 16, 2025
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.

ILC assertion failure: type == type.ConvertToCanonForm(CanonicalFormKind.Specific)
2 participants