-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Remove unnecessary runtime lookup for constrained callvirt #73823
Conversation
Fixes: #73681 |
/azp run runtime-coreclr outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I've verified this returns the behavior of the example in #73606 back to what it was previously.
Is R2R codegen correct for this case? |
@trylek Do we also need to update R2R as mentioned at #73823 (comment)? |
Perhaps in this area? runtime/src/coreclr/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs Lines 1736 to 1750 in 080f708
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm for jitinterface logic (not familiar with r2r aspect)
@trylek is this good to merge. Appears that needs to be ported to 7 too? |
I'm doing my best to produce an update this afternoon. |
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
d1d25ea
to
ad29661
Compare
I have finally gotten to debugging the jitted and crossgenned version of the test described in the issue #73606. To answer @jkotas' question, I believe there's no counterpart logic in Crossgen2 as Crossgen2 still globally skips functions containing static virtual method calls using the following conditional statement: runtime/src/coreclr/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs Line 2066 in c5a0e55
The fix presented in this PR basically just scales back my |
/azp run runtime-coreclr outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
/backport to release/7.0 |
Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/2922253202 |
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
/cc @dotnet/jit-contrib