slot2ssa: Fix spurious φᶜ edges#51199
Merged
topolarity merged 3 commits intoJuliaLang:masterfrom Sep 6, 2023
Merged
Conversation
The unreachable here seems to be caused by the fact that (as of JuliaLang#50299) we re-use a more narrow type from Inference that correctly ignores these edges, but when inserting the `φᶜ` node in `slot2reg` we were including extra edges that never get exercised at runtime. I'm not sure _why_ this causes us to hit an unreachable, since the narrow type from inference is technically still valid (the catch block will never observe these spurious assignments at runtime), but this seems to fix the issue and anyway improves the quality of the IRCode generated by `slot2ssa`. Resolves JuliaLang#51159
This variable is currently always zero.
Member
|
|
aviatesk
approved these changes
Sep 6, 2023
Member
Author
Do you mean that was happening even though the ɣ was outside of any try-catch block? |
aviatesk
approved these changes
Sep 6, 2023
| # Issue #51159 - Unreachable reached in try-catch block | ||
| function f_with_early_try_catch_exit() | ||
| result = false | ||
| for i in 3 |
Member
There was a problem hiding this comment.
Is this meant to be for i in 1:3?
This file contains hidden or 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
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 unreachable here seems to be caused by the fact that (as of #50943) we re-use a more narrow type from Inference that correctly ignores these edges, but when inserting the
φᶜnode inslot2regwe were including extra edges that never get exercised at runtime.I'm not sure why this causes us to hit an unreachable, since the narrow type from inference is technically still valid (the catch block will never observe these spurious assignments at runtime), but this seems to fix the issue and anyway improves the quality of the IRCode generated by
slot2ssa.Resolves #51159