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

SPMI: Add fallback for notifyInstructionSetUsage #112925

Merged

Conversation

jakobbotsch
Copy link
Member

@jakobbotsch jakobbotsch commented Feb 25, 2025

I noticed that notifyInstructionSetUsage misses are pretty common, particularly because we query for instruction sets for some very basic instructions (e.g. GT_RSZ/GT_RSH). So changes that introduce new kinds of nodes now seem to be much more likely to miss.

The best solution would probably be to add another set of ISAs that is passed to the JIT so that notifyInstructionSetUsage can be purely a "result" type of JIT-EE call, but this change at least gets us back to what we had before with an improvement to when we actually know the answer.

As an example, I started getting lots of misses on win-x64 for #112740 after I merged the previous change. That turns out to be because that PR produces GT_RSZ which ends reporting BMI2 usage, and that now results in a miss.

cc @dotnet/jit-contrib

I noticed that `notifyInstructionSetUsage` misses are pretty common,
particularly because we query for instruction sets for some very basic
instructions (e.g. `GT_RSZ/`GT_RSH`). So changes that introduce new
kinds of nodes now seem to be much more likely to miss.

The best solution would probably be to add another set of ISAs that is
passed to the JIT so that `notifyInstructionSetUsage` can be purely a
"result" type of JIT-EE call, but this change at least gets us back to
what we had before with an improvement to when we actually know the
answer.
@Copilot Copilot bot review requested due to automatic review settings February 25, 2025 21:56

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

@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 Feb 25, 2025
Copy link
Contributor

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

@jakobbotsch jakobbotsch force-pushed the notifyInstructionSetUsage-fallback branch from ce41e77 to e9ea145 Compare February 25, 2025 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.

2 participants