Skip to content
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][aot] Prefer concrete instances instead of gshared ones for met… #78182

Merged
merged 2 commits into from
Nov 11, 2022

Conversation

vargaz
Copy link
Contributor

@vargaz vargaz commented Nov 10, 2022

…hods containing type equality checks.

For example, calls to Vector.IsSupported cannot be optimized away in a method where T is T_BYTE because its written as:

            get => (typeof(T) == typeof(byte)) ||
                   (typeof(T) == typeof(double)) ||

and T_BYTE could be instantiated with an enum whose basetype is byte.

Fixes some of the issues in #78163.

@lambdageek
Copy link
Member

@vargaz Should we also prefer instances for op_Inequality ?

@vargaz
Copy link
Contributor Author

vargaz commented Nov 10, 2022

Maybe, it wasn't a problem in practice so far.

…hods containing type equality checks.

For example, calls to Vector<T>.IsSupported cannot be optimized away in a method where T
is T_BYTE because its written as:

```
            get => (typeof(T) == typeof(byte)) ||
                   (typeof(T) == typeof(double)) ||
```

and T_BYTE could be instantiated with an enum whose basetype is byte.

Fixes some of the issues in dotnet#78163.
@SamMonoRT
Copy link
Member

@vargaz - would this change contribute to size increase for blazor-wasm app (Interpreter) one. We are seeing size regressions in all wasm apps(New blank template, pizza app, aot-wasm, interpreter-wasm) in the same commit range.

@vargaz
Copy link
Contributor Author

vargaz commented Dec 1, 2022

No, it should only affect AOT apps.

@radekdoulik
Copy link
Member

@kotlarmilos
Copy link
Member

@radekdoulik is this main branch? There was a regression backported to .net7 in 403aa58...1c341de for pizza app.

@ghost ghost locked as resolved and limited conversation to collaborators Jan 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants