Skip to content

[mono] Don't inline methods with the DoesNotReturn attribute in interp - #99550

Merged
kg merged 1 commit into
dotnet:mainfrom
kg:interp-doesnotreturn-noinline
Mar 12, 2024
Merged

kg merged 1 commit into
dotnet:mainfrom
kg:interp-doesnotreturn-noinline

Conversation

@kg

@kg kg commented Mar 11, 2024

Copy link
Copy Markdown
Contributor

Right now we will attempt to inline methods that have the DoesNotReturn attribute; this is a waste of time and resources, since it's not profitable to inline them and they are virtually always going to be unreachable code anyway.

Noticed this behavior while investigating a regression in LessThanOrEqualAnyBenchmark. It's not responsible for the regression, but it was worsening the pre-optimization IR quality in the benchmark, and this will probably improve startup perf (by reducing time spent in interp codegen) by a tiny amount... I can imagine this actually improving post-optimization code quality in some cases, but I don't know what an example of that would look like.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @BrzVlad, @kotlarmilos
See info in area-owners.md if you want to be subscribed.

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.

3 participants