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

JIT: Process all EH successors for "in-block" defs in SSA #94955

Merged
merged 3 commits into from
Nov 21, 2023

Conversation

jakobbotsch
Copy link
Member

When we saw a def we were only adding phi args to enclosing handlers, but this misses the special case of throws inside filters, where control can flow to enclosed handlers.

Fix #94954

When we saw a def we were only adding phi args to enclosing handlers,
but this misses the special case of throws inside filters, where control
can flow to enclosed handlers.

Fix dotnet#94954
@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 Nov 18, 2023
@ghost ghost assigned jakobbotsch Nov 18, 2023
@ghost
Copy link

ghost commented Nov 18, 2023

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

Issue Details

When we saw a def we were only adding phi args to enclosing handlers, but this misses the special case of throws inside filters, where control can flow to enclosed handlers.

Fix #94954

Author: jakobbotsch
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@jakobbotsch jakobbotsch marked this pull request as ready for review November 20, 2023 18:42
@jakobbotsch
Copy link
Member Author

jakobbotsch commented Nov 20, 2023

cc @dotnet/jit-contrib PTAL @BruceForstall

No diffs.

Fix here is just to expose the EH successor iteration that VisitAllSuccs already has (taking care to yield all EH successors for BBJ_CALLFINALLY) and then switch SSA to use it. The runtime failure looks known according to build analysis. The superpmi-replay failures look like #95025.

Copy link
Member

@BruceForstall BruceForstall left a comment

Choose a reason for hiding this comment

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

Nice find!

LGTM

@jakobbotsch jakobbotsch merged commit 79e42f9 into dotnet:main Nov 21, 2023
124 of 129 checks passed
@jakobbotsch jakobbotsch deleted the ssa-eh-succs branch November 21, 2023 07:35
@cincuranet
Copy link
Contributor

@github-actions github-actions bot locked and limited conversation to collaborators Dec 31, 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.

JIT: SSA does not add proper phi args for second pass EH successors
3 participants