Open neon-sunset opened 2 days ago
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch See info in area-owners.md if you want to be subscribed.
Sadly, JIT is not smart enough in early phases (no SSA/VN info) so it can't look through structs (they're not promoted yet) for exact class info, so PGO+GDV sort of fixes it implicitly (GDV check is folded in a later phase). Not sure what would be the best fix here, perhaps, a bit "late" inlining? early SSA/VN/Struct promotion?
Description
It appears that JIT is not able to propagate concrete type information through struct fields typed as the type's abstract parent. The example below matches the shape of stateless
FSharpFunc<T1...Tn>
instantiations by F#.Given reduced repro:
The Tier1-PGO compilation of
Example()
isIt would be great if JIT could propagate the concrete type here through the field and not rely on DPGO to devirtualize the func types back. This also does not devirtualize on NativeAOT for more than single
MyFunc
implementation. Thanks!Configuration
Regression?
Not tested on .NET 8