-
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
Mono: devirtualize sealed calls #33015
Comments
Also, Xamarin.iOS has a linker substep where it marks all methods and classes as |
@MichalStrehovsky Does CoreRT do the same? |
Yes, and it's behind policies so that we don't do this if Assembly.Load or Reflection.Emit is allowed. |
… vtable is unavailable. dotnet#33015
* [mono][jit] Devirtualizing ldarg(s)+callvirt where possible. #33015 * [mono][jit] Resolved compiler warnings. #33015 * [mono][jit] Fixed runtime crash when optimizing ldarg(a)+callvirt and vtable is unavailable. #33015 * [mono][jit] Checking mono_class_get_virtual_method assumptions now also fails when klass is abstract. * [mono][jit] Cleaned up optimization of ldarg(a)+callvirt. GetHashCode is devirtualized in callvirt handler now. * [mono][jit] ldarg(a)+callvirt optimization code style now conforms to guidelines. * [mono][jit] Simplified conditions on ldarg(a)+callvirt optimization. Fixed code style issues. * [mono][jit] Indentation fix. Vtable is now set up in check_get_virtual_method_assumptions.
Mono doesn't devirtualize (and inline) sealed methods, e.g.:
b.Foo()
is expected to be devirtualized and inlined because it issealed
.Current codegen:
Expected codegen:
CoreCLR is able to do it, part of the jitdump for Test:
The text was updated successfully, but these errors were encountered: