Skip to content

[release/7.0] Remove unnecessary runtime lookup for constrained callvirt #74523

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
Aug 25, 2022

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Aug 24, 2022

Backport of #73823 to release/7.0

/cc @trylek

(This should really go into 7.0-RC1; based on @carlossanlop's e-mail I've made the backport against release/7.0 as the 7.0-rc1 branch is currently closed, please let me know how to proceed here.)

Customer Impact

According to #73681, this change fixes a user-visible C# behavior change and perf regression.

Testing

Local and lab testing in the runtime repo - innerloop, outerloop; Jakob manually verified on a code sample that the change fixes the codegen regression described in the issue.

Risk

Low - there's no real algorithmic change, the fix just modifies a conditional statement so that the logic I added for static virtual methods only truly applies to static virtual methods, previously it was "leaking" to non-static virtuals too, that was the cause of the codegen regression.

IMPORTANT: Is this backport for a servicing release? If so and this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.

In my change adding support for default static virtual interface
method implementations I made a subtle bug that caused
behavioral change for some pre-existing constrained virtual calls
that newly started to require runtime lookup. This is unnecessary
and perf-negative, I have modified the code so that my change
kicks in only for static virtual methods.

Thanks

Tomas
@ghost ghost added the area-VM-coreclr label Aug 24, 2022
@trylek trylek requested a review from jeffschwMSFT August 24, 2022 21:08
@trylek
Copy link
Member

trylek commented Aug 24, 2022

Fixes: #73681

@carlossanlop
Copy link
Contributor

@jeffschwMSFT can we get an approval?

@trylek can you confirm the CI failures are unrelated? BTW the dotnet-linker-tests leg seems to be stuck.

@trylek
Copy link
Member

trylek commented Aug 25, 2022

@carlossanlop - I don't see how the dotnet-linker-tests failure could be related to my change, I doubt the CoreCLR runtime was even running when the job got stuck, I retried the one failed job, I don't see any other failures in the testing.

@carlossanlop carlossanlop requested a review from mangod9 August 25, 2022 19:39
@carlossanlop
Copy link
Contributor

Approved and signed off. CI is green. Ready to merge. :shipit:

@carlossanlop carlossanlop merged commit 222d4da into release/7.0 Aug 25, 2022
@carlossanlop carlossanlop deleted the backport/pr-73823-to-release/7.0 branch August 25, 2022 19:41
@ghost ghost locked as resolved and limited conversation to collaborators Sep 25, 2022
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.

5 participants