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

cfg_simplify: Check for implicit terminators properly #54260

Closed

Conversation

topolarity
Copy link
Member

The check I added in #54216 failed to consider that explicit terminators also carry a Union{} type, not just ϕ-nodes and non-terminators.

This was causing GotoIfNot nodes to exit scheduling early and fail to assign a contiguous index for their fallthrough successor.

The check added in JuliaLang#54216 failed to consider that explicit terminators
also carry a `Union{}` type, not just ϕ-nodes and non-terminators.

This was causing GotoIfNot nodes to exit scheduling early and fail to
assign a contiguous index for their fallthrough successor.
@topolarity topolarity requested a review from Keno April 26, 2024 04:17
Keno added a commit that referenced this pull request Apr 26, 2024
…inator

This addresses a bug in #54216, where a `GotoIfNot` was accidentally considered
a throwing terminator. Just as I was about to PR this, I noticed that #54260
had already been opened for the same issue. However, there's three differences
in this PR that made me open it anyway:

1. There's an additional missing case where the terminator is `nothing` which
   has special case semantics of allowing any type on it, because it serves as
   a deletion marker.

2. My test also test the `EnterNode` and `:leave` terminators, just to have a
   complete sampling.

3. I like the code flow in this version slightly better.

Co-authored-by: Cody Tapscott <cody.tapscott@juliahub.com>
@Keno
Copy link
Member

Keno commented Apr 26, 2024

There was a bit of a jinx, because @topolarity and I were looking at the same failing test case, but I have another version of this in #54262 with a slightly more general fix and test case.

Keno added a commit that referenced this pull request Apr 26, 2024
…inator

This addresses a bug in #54216, where a `GotoIfNot` was accidentally considered
a throwing terminator. Just as I was about to PR this, I noticed that #54260
had already been opened for the same issue. However, there's three differences
in this PR that made me open it anyway:

1. There's an additional missing case where the terminator is `nothing` which
   has special case semantics of allowing any type on it, because it serves as
   a deletion marker.

2. My test also test the `EnterNode` and `:leave` terminators, just to have a
   complete sampling.

3. I like the code flow in this version slightly better.

Co-authored-by: Cody Tapscott <cody.tapscott@juliahub.com>
@topolarity
Copy link
Member Author

Closing in favor of #54262!

@topolarity topolarity closed this Apr 26, 2024
Keno added a commit that referenced this pull request Apr 26, 2024
…inator

This addresses a bug in #54216, where a `GotoIfNot` was accidentally considered
a throwing terminator. Just as I was about to PR this, I noticed that #54260
had already been opened for the same issue. However, there's three differences
in this PR that made me open it anyway:

1. There's an additional missing case where the terminator is `nothing` which
   has special case semantics of allowing any type on it, because it serves as
   a deletion marker.

2. My test also test the `EnterNode` and `:leave` terminators, just to have a
   complete sampling.

3. I like the code flow in this version slightly better.

Co-authored-by: Cody Tapscott <cody.tapscott@juliahub.com>
Keno added a commit that referenced this pull request Apr 26, 2024
…inator (#54262)

This addresses a bug in #54216, where a `GotoIfNot` was accidentally
considered a throwing terminator. Just as I was about to PR this, I
noticed that #54260 had already been opened for the same issue. However,
there's three differences in this PR that made me open it anyway:

1. There's an additional missing case where the terminator is `nothing`
which has special case semantics of allowing any type on it, because it
serves as a deletion marker.

2. My test also test the `EnterNode` and `:leave` terminators, just to
have a complete sampling.

3. I like the code flow in this version slightly better.

Co-authored-by: Cody Tapscott <cody.tapscott@juliahub.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants