-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
JIT: Refactor around impDevirtualizeCall for GVM devirt #112610
base: main
Are you sure you want to change the base?
Conversation
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.
Copilot wasn't able to review any files in this pull request.
Files not reviewed (4)
- src/coreclr/jit/compiler.cpp: Language not supported
- src/coreclr/jit/gentree.h: Language not supported
- src/coreclr/jit/importercalls.cpp: Language not supported
- src/coreclr/jit/lower.cpp: Language not supported
Can you explain why this would be necessary if the whole thing is being implemented as an optimization that kicks in when the call address is |
This would make it sharable with existing handling of virtual calls in |
|
I do not think |
We pass the call node to runtime/src/coreclr/jit/importercalls.cpp Lines 952 to 966 in 8a79637
and we are also using runtime/src/coreclr/jit/fginline.cpp Lines 608 to 614 in 8a79637
|
Virtual generics do not have this flavor. They are modelled as normal indirect calls within the JIT that do not require any special treatment. Hence I do not think we should need to add a new category of calls in the JIT as part of this work. It does not look necessary to me. Instead, I would suggest that |
How about introduce a new member function |
That sounds good to me. |
I am reluctant to put a lot of time and energy into optimizing GVMs without strong motivation. It feels like we'd be better served trying to handle the CT_INDIRECT virtual cases which are likely far more common. |
I do think there're at least some? See MihuBot/runtime-utils#1004 |
I'm not saying there is no benefit -- just that there are easier, less risky, and more impactful things we could do in this area. |
ADO.NET also has a few, specifically in the inner loop: DbDataReader.GetFieldValue and DbDataReader.GetFieldValueAsync |
Here is my pmi analysis: https://gist.github.com/hez2010/2ebacf9c663f34bb683d6f052aa1e5c3 Especially, every |
Introduce a
IsDevirtualizationCandidate
instead of usingIsVirtual
for devirtualization candidate.Contributes to #112596