Conversation
This reverts commit 7a1b61c809f4ac09a9f23ec74163c630861dee7d.
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.
Fixes #1051
This PR is AI generated but: I carefully reviewed the code and prompted the AI until I was globally happy with it, before doing the last modifications by hand. I reviewed all the code line by line.
This PR does two things:
compute_loop_exitsto find better loop exits in the presence of branchingstranslate_jumpby detecting the case problematic in #issue1051 and failingAbout 2.: I tried fixing it by inlining the target of the jump instead of introducing a no-op. I think a solution along those lines would make sense, but just inlining probably doesn't work: for instance, I'm not completely sure what happens in case this inlined code ends with, e.g., a break or a continue. As the initial attempt made sense I committed it to keep track of it, but then reverted it. The version I submit in this PR simply fails in the problematic case.