Uh oh!
There was an error while loading. Please reload this page.
JIT: Refactor around impDevirtualizeCall for GVM devirt - #112610
Conversation
There was a problem hiding this comment.
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
jakobbotsch
commented
Feb 16, 2025
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 |
jakobbotsch
commented
Feb 16, 2025
|
jakobbotsch
commented
Feb 16, 2025
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 |
jakobbotsch
commented
Feb 16, 2025
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 |
hez2010
commented
Feb 16, 2025
How about introduce a new member function |
jakobbotsch
commented
Feb 16, 2025
That sounds good to me. |
AndyAyersMS
commented
Feb 18, 2025
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 |
AndyAyersMS
commented
Feb 18, 2025
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. |
NinoFloris
commented
Feb 18, 2025
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 |
hez2010
commented
Apr 29, 2025
@AndyAyersMS
|
AndyAyersMS
commented
May 30, 2025
@hez2010 do you have time to resolve the conflicts here? If not I can do it sometime soon. |
hez2010
commented
May 31, 2025
Done. |
hez2010
commented
Jun 1, 2025
No diffs as expected. PTAL @AndyAyersMS |
Introduce a
IsDevirtualizationCandidateinstead of usingIsVirtualfor devirtualization candidate.Contributes to #112596