-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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>
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>
Closing in favor of #54262! |
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
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.
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.