-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Fix JIT assertion for AsyncContinuation in GDV compatibility check #123664
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: jakobbotsch <7887810+jakobbotsch@users.noreply.github.com>
|
PTAL @dotnet/jit-contrib |
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.
Pull request overview
This PR updates the JIT’s Guarded Devirtualization (GDV) compatibility check to correctly handle compiler-inserted async continuation arguments, preventing an assertion under tiered PGO with delegate/vtable profiling.
Changes:
- Extend
Compiler::isCompatibleMethodGDVto treatWellKnownArg::AsyncContinuationlikeRetBufferandThisPointeras a non-IL-signature argument that should be skipped during compatibility checks. - Align GDV compatibility handling with existing async continuation handling already present in
fginline.cppandimporter.cpp, removing the"Unexpected well known arg to method GDV candidate"assertion in the reported configurations.
|
Tagging subscribers to this area: @JulieLeeMSFT, @dotnet/jit-contrib |
Description
JIT hits assertion
'!"Unexpected well known arg to method GDV candidate"'when Guarded Devirtualization encounters methods withAsyncContinuationarguments under tiered PGO with delegate/vtable profiling enabled.Changes
Added
WellKnownArg::AsyncContinuationto the signature compatibility check inisCompatibleMethodGDV:Like
RetBufferandThisPointer, async continuations are compiler-inserted arguments not reflected in the IL signature. The compatibility check must skip them when matching call arguments against the target method signature.Consistent with existing handling in
fginline.cppandimporter.cpp.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.