Skip to content

Conversation

janvorli
Copy link
Member

@janvorli janvorli commented Aug 7, 2025

This sequence should be handled as no-op

This sequence should be handled as no-op
@janvorli janvorli added this to the 11.0.0 milestone Aug 7, 2025
@janvorli janvorli requested a review from davidwrighton August 7, 2025 21:16
@janvorli janvorli self-assigned this Aug 7, 2025
@Copilot Copilot AI review requested due to automatic review settings August 7, 2025 21:16
@janvorli janvorli requested a review from BrzVlad as a code owner August 7, 2025 21:16
@janvorli janvorli requested a review from kg as a code owner August 7, 2025 21:16
Copy link
Contributor

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

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 the interpreter by eliminating redundant calls to System.StubHelpers.NextCallReturnAddress when immediately followed by a CEE_POP instruction, treating this sequence as a no-op operation.

Key Changes:

  • Add recognition for System.StubHelpers.NextCallReturnAddress as a named intrinsic
  • Implement special handling to skip both the call and subsequent CEE_POP instruction when detected together

Reviewed Changes

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

File Description
src/coreclr/interpreter/intrinsics.cpp Adds intrinsic recognition for System.StubHelpers.NextCallReturnAddress method
src/coreclr/interpreter/compiler.cpp Implements no-op optimization by detecting and skipping the call+pop sequence

@janvorli janvorli merged commit 96b3285 into dotnet:main Aug 7, 2025
92 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Sep 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants