generalize insert-backedges to insert in any world #48785
Merged
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.
Rather than a binary valid/not-valid, we track the exact later world that deleted it, relative to when we first assumed it may be valid. Previously we could only sensibly insert into the latest world, which could be a bit more difficult to model if the world had subsequently increased. Presently that is mostly relevant because we set min_world early, then change max_world to activate it. If we did the opposite (start with min_world==max_world==typemax, then decrease min_world to activate it), it might be less notable of a change. A small future change to this could be to compute both updated min and max together. However, this also now more clearly demonstrates how to do forward edge tracking and re-validation as well, which I think will be useful to have as an example.