Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Do not devirtualize shared default interface methods #15979

Merged
merged 1 commit into from
Jan 24, 2018

Conversation

MichalStrehovsky
Copy link
Member

The result of the devirtualization for a method on a generic type should be an instantiating stub, but this doesn't seem to work right.

Fixing that is a perf issue (that can be triaged/punted - #15977). This commit is a correctness fix to avoid bad codegen for that case.

Resolves #15591.

The result of the devirtualization for a method on a generic type should be an instantiating stub, but this doesn't seem to work right.

Fixing that is a perf issue (that can be triaged/punted - #15977). This commit is a correctness fix to avoid bad codegen for that case.

Resolves #15591.
@MichalStrehovsky
Copy link
Member Author

Cc @sergiy-k

@jkotas Could you have a look please?

@jkotas
Copy link
Member

jkotas commented Jan 23, 2018

cc @AndyAyersMS

@AndyAyersMS
Copy link
Member

Change looks reasonable. Was expecting some kind of interaction.

A few comments on the tests: I would recommend revising the default interface test project files so that jit optimization is always enabled, otherwise the tests will inherit optimization settings from the ambient build. That way these failures would have likely surfaced earlier in debug/check builds. You can add a second project file if you also want to run the tests with jit optimization disabled. Also, you should add the standard header boilerplate comments to the test sources.

@MichalStrehovsky
Copy link
Member Author

Thanks for the feedback Andy! I'll look into fixing the test headers/projects in a separate pull request.

@jkotas jkotas merged commit 3211c25 into dotnet:master Jan 24, 2018
@MichalStrehovsky MichalStrehovsky deleted the dontDevirtSharedGenericIntf branch January 24, 2018 08:08
MichalStrehovsky added a commit to MichalStrehovsky/coreclr that referenced this pull request Jan 24, 2018
* The diamondshape test should work now that dotnet#15979 and dotnet#15978 are merged.
* Create debug and retail version of diamondshape and sharedgenerics tests so that we have retail coverage. These tests hit issues around devirtualization (that is only active when RyuJIT is optimizing).
MichalStrehovsky added a commit that referenced this pull request Jan 30, 2018
* The diamondshape test should work now that #15979 and #15978 are merged.
* Create debug and retail version of diamondshape and sharedgenerics tests so that we have retail coverage. These tests hit issues around devirtualization (that is only active when RyuJIT is optimizing).
* Add license headers
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Default interfaces] Retail test failures
3 participants