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: 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? |
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