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

Introduce BBJ_EHFAULTRET #84467

Merged
merged 1 commit into from
Apr 7, 2023

Conversation

BruceForstall
Copy link
Member

@BruceForstall BruceForstall commented Apr 7, 2023

The IL endfinally and endfault instructions are aliases,
imported in the JIT IR as BBJ_EHFINALLYRET.

Introduce BBJ_EHFAULTRET for cases within fault clauses.

This simplifies some code, and makes it clearer when writing
code that fault clauses need to be considered, separately from
finally clauses.

To do this, after importing EH clauses, convert any BBJ_EHFINALLYRET
as necessary. Also, try/finally cloning, which (sometimes) converts
finally clauses to fault clauses, needs to update the corresponding
BBJ_EHFINALLYRET. When creating new try/fault clauses for synchronized
functions, use BBJ_EHFAULTRET now.

Fixes #84307

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Apr 7, 2023
@ghost ghost assigned BruceForstall Apr 7, 2023
@ghost
Copy link

ghost commented Apr 7, 2023

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

Issue Details

null

Author: BruceForstall
Assignees: BruceForstall
Labels:

area-CodeGen-coreclr

Milestone: -

The IL `endfinally` and `endfault` instructions are aliases,
imported in the JIT IR as `BBJ_EHFINALLYRET`.

Introduce `BBJ_EHFAULTRET` for cases within `fault` clauses.

This simplifies some code, and makes it more clear when writing
code that `fault` clauses need to be considered, separately from
`finally` clauses.

To do this, after importing EH clauses, convert any `BBJ_EHFINALLYRET`
as necessary. Also, try/finally cloning, which (sometimes) converts
`finally` clauses to `fault` clauses, needs to update the corresponding
`BBJ_EHFINALLYRET`. When creating new try/fault clauses for synchronized
functions, use `BBJ_EHFAULTRET` now.

Fixes dotnet#84307
@BruceForstall BruceForstall changed the title [WIP] Introduce BBJ_EHFAULTRET Introduce BBJ_EHFAULTRET Apr 7, 2023
@BruceForstall BruceForstall marked this pull request as ready for review April 7, 2023 19:17
@BruceForstall
Copy link
Member Author

@AndyAyersMS PTAL
cc @dotnet/jit-contrib

Copy link
Member

@AndyAyersMS AndyAyersMS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@BruceForstall BruceForstall merged commit f402190 into dotnet:main Apr 7, 2023
@BruceForstall
Copy link
Member Author

There are asm diffs because we no longer mark non-argument GC vars that are live-out of a 'fault' handler as must-init.

@BruceForstall BruceForstall deleted the IntroduceBBJ_EHFAULTRET branch April 8, 2023 00:01
@ghost ghost locked as resolved and limited conversation to collaborators May 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider adding BBJ_EHFAULTRET
2 participants