Skip to content

JIT: avoid creating unnecessary temp for indirect virtual stub calls #116875

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
Jun 20, 2025

Conversation

AndyAyersMS
Copy link
Member

We don't need to spill the stub address if it's already a local.

Peeled off from #116771.

We don't need to spill the stub address if it's already a local.

Peeled off from dotnet#116771.
@Copilot Copilot AI review requested due to automatic review settings June 20, 2025 18:46
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 PR optimizes indirect virtual stub calls by avoiding unnecessary temporary variable allocation when the stub address is already stored in a local variable.

  • Eliminates temp spill for stub addresses that are local
  • Updates the relevant conditional in impImportCall to check the operand type

@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 Jun 20, 2025
@AndyAyersMS
Copy link
Member Author

AndyAyersMS commented Jun 20, 2025

@amanasifkhalid PTAL
cc @dotnet/jit-contrib

Should save a bit of code size.

Diffs

Copy link
Contributor

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

Copy link
Member

@amanasifkhalid amanasifkhalid left a comment

Choose a reason for hiding this comment

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

LGTM

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