[mono][aot] Prefer specific instances instead of gshared for methods...
[mono][aot] Prefer specific instances instead of gshared for methods containing static virtual calls. (#76033) These calls cannot be resolved at compile time in gshared methods, so they cannot be inlined etc. They are used in perf sensitive BCL code like SpanHelpers. To fix this, modify the AOT compiler so in addition to the gshared versions, it emits specific instances of these methods if possible. This only affects a small subset of gshared methods so it doesn't lead to a noticable code size increase. Fixes https://github.com/dotnet/runtime/issues/75801.
Showing