Skip to content

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 AI review requested due to automatic review settings June 20, 2025 18:46
Copy link
Contributor

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

@dotnet-policy-service
Copy link
Contributor

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

Copy link
Contributor

@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 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.

2 participants