-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Make virtual delegate targets less costly #87308
Conversation
Saves 1.5% on the Stage2 app. We make sure delegate targets are reflection visible to support Delegate.GetMethodInfo. When I originally did this work in dotnet#70198 I made a shortcut to avoid yet another node kind in the system (with a giant comment explaining what the problem is). But there's a lot of benefit in having this new node for apps with many reflection visible virtual methods.
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsSaves 1.5% on the Stage2 app. We make sure delegate targets are reflection visible to support Delegate.GetMethodInfo. When I originally did this work in #70198 I made a shortcut to avoid yet another node kind in the system (with a giant comment explaining what the problem is). But there's a lot of benefit in having this new node for apps with many reflection visible virtual methods. Cc @dotnet/ilc-contrib
|
Test failure looks related: Method `Mono.Linker.Tests.Cases.DataFlow.StaticInterfaceMethodDataflow.DamOnGenericKeepsMethod.ImplIFoo.VirtualMethod()' should have been kept\nExpected: True\nActual: False |
The test infra reacts to ReflectableMetod nodes, not the new node type. That said I don't see why the test in question would have anything marked as a delegate target. |
The test that's failing is this one: runtime/src/tools/illink/test/Mono.Linker.Tests.Cases/DataFlow/StaticInterfaceMethodDataflow.cs Lines 22 to 55 in 19712d9
I can't think of any reason why If there isn't any, I'd suggest we just disable this test on #89157 and move on with life. If that issue is ever fixed we'd need to make this marking conditional on |
Add a variation of the test which actually keeps the method
I think you're correct - the method is not needed. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
@vitek-karas could you have a look? |
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.
Nice - thanks!
Saves 1.5% on the Stage2 app.
We make sure delegate targets are reflection visible to support Delegate.GetMethodInfo. When I originally did this work in #70198 I made a shortcut to avoid yet another node kind in the system (with a giant comment explaining what the problem is). But there's a lot of benefit in having this new node for apps with many reflection visible virtual methods.
Cc @dotnet/ilc-contrib