-
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
JIT: give inlinees their own EH table #112968
JIT: give inlinees their own EH table #112968
Conversation
For a long time now inlinees have "inherited" the root method EH table. Looks like the only reason we were doing this was to make certain pinvoke inlining checks simpler. Rework those to handle the inline case directly. Quirk one bit of profitability logic for now to avoid diffs. Part of dotnet#108900.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
@EgorBo @BruceForstall PTAL No diffs; doesn't enable any new behavior. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM if CI is happy, I think last time I tried, I hit some assert in VM API but most likely that was my incorrect change
There are VM-side changes needed to enable inlining methods with EH. Those will show up in a follow-up PR. |
Sneak preview of the above (not quite working yet, thanks in part to the confusion I'm fixing here) using System.Runtime.CompilerServices;
Bar();
[MethodImpl(MethodImplOptions.AggressiveInlining)]
void Bar()
{
try
{
Console.WriteLine("Bar");
}
finally
{
Console.WriteLine("Bar finally");
}
}
|
Need to tweak the logic for NAOT. |
For a long time now inlinees have "inherited" the root method EH table. Looks like the only reason we were doing this was to make certain pinvoke inlining checks simpler.
Rework those to handle the inline case directly. Quirk one bit of profitability logic for now to avoid diffs.
Part of #108900.