-
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
[NativeAot] Devirtualization opportunity around field loads #74000
Comments
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsNotice the first interface call is not devirtualized, only the second, after storing to a local. using System;
using System.Runtime.CompilerServices;
interface IFoo
{
void Frob();
}
class Program : IFoo
{
static IFoo theFoo = new Program();
public void Frob() => Console.WriteLine("Hello");
[MethodImpl(MethodImplOptions.NoInlining)]
static void Main()
{
theFoo.Frob();
IFoo i = theFoo;
i.Frob();
}
}
Cc @EgorBo
|
@MichalStrehovsky is there any known build issues for NativeAOT in Main - for some reason I can't run ilc from VS, it throws PS: ah, works from command line |
Weird, I see this too. I narrowed this down to #73987. If I comment out the @dotnet/dotnet-diag is it known that The repro steps are:
|
@mikem8361 should probably take a look Mike and Juan did work earlier in this release to make single file debugging work so no, I wouldn't expect it to be failing here. |
I'm submitting a workaround for the debugging issue in #74138. |
VS merged support for it - I'm not sure if it's made it's way to public previews yet. |
Notice the first interface call is not devirtualized, only the second, after storing to a local.
Cc @EgorBo
The text was updated successfully, but these errors were encountered: