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

compact: Don't try to kill the same edge twice #48343

Merged
merged 1 commit into from
Jan 20, 2023
Merged

Conversation

Keno
Copy link
Member

@Keno Keno commented Jan 19, 2023

In IR like:

goto if not true
goto if not true

our implementation of kill_edge! goes through recursively to kill all newly unreachable blocks. However, it was still attempting to schedule the newly unreachable block. Then, when it got to the next GotoIfNot, it wsa again attempting to kill the same edge, which would fail, because the edge had already been removed from the CFG. Fix that by telling IncrementalCompact not to attempt scheduling any blocks that were newly discovered to be dead.

@Keno Keno requested a review from aviatesk January 19, 2023 07:01
In IR like:

```
goto if not true
goto if not true
```

our implementation of `kill_edge!` goes through recursively
to kill all newly unreachable blocks. However, it was still
attempting to schedule the newly unreachable block. Then,
when it got to the next GotoIfNot, it wsa again attempting
to kill the same edge, which would fail, because the edge
had already been removed from the CFG. Fix that by
telling IncrementalCompact not to attempt scheduling
any blocks that were newly discovered to be dead.
@Keno Keno force-pushed the kf/youonlylivetwice branch from 931a0bc to 09b6e5f Compare January 20, 2023 01:40
@Keno Keno merged commit 57101cf into master Jan 20, 2023
@Keno Keno deleted the kf/youonlylivetwice branch January 20, 2023 09:05
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.

1 participant