[mono] Don't inline methods with the DoesNotReturn attribute in interp #99550
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.