Report CORINFO_CALLCONV_GENERIC to JIT#121561
Merged
jkotas merged 4 commits intodotnet:mainfrom Nov 13, 2025
Merged
Conversation
Apparently we got away without reporting this until the test in dotnet#121130 was added. Not reporting the calling convention results in this not kicking in: https://github.com/dotnet/runtime/blob/5e97723bdd8eb9eff95c52b7120cec6bfb5a0a19/src/coreclr/jit/importer.cpp#L7291-L7297 And failing the test.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes broken outerloop tests by ensuring that the CORINFO_CALLCONV_GENERIC calling convention flag is properly reported to the JIT compiler. Previously, the AOT compiler was not setting the generic flag in method signatures, which caused the JIT to miss important optimizations/checks when compiling generic method calls.
- Added
Genericflag toMethodSignatureFlagsenum - Implemented
IsGenericproperty onMethodSignatureto check the flag - Set the flag during ECMA signature parsing when the metadata indicates a generic signature
- Report the flag to JIT through
CORINFO_CALLCONV_GENERICin the calling convention
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/coreclr/tools/Common/TypeSystem/Ecma/EcmaSignatureParser.cs | Set the Generic flag when parsing method signatures with generic parameters from ECMA metadata |
| src/coreclr/tools/Common/TypeSystem/Common/MethodDesc.cs | Add Generic flag enum value and IsGeneric property to MethodSignature class |
| src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs | Report CORINFO_CALLCONV_GENERIC to JIT when signature is generic |
jkotas
reviewed
Nov 12, 2025
src/coreclr/tools/Common/TypeSystem/Ecma/EcmaSignatureParser.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Member
Author
Thanks for nothing, Github. |
Member
Author
|
/azp run runtime-nativeaot-outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
|
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas |
This was referenced Nov 13, 2025
Open
Member
|
/ba-g timeouts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Outerloops are broken.
Apparently we got away without reporting this until the test in #121130 was added. Not reporting the calling convention results in this not kicking in:
runtime/src/coreclr/jit/importer.cpp
Lines 7291 to 7297 in 5e97723
and failing the test.
Cc @dotnet/ilc-contrib