-
Notifications
You must be signed in to change notification settings - Fork 387
fix: Add a remove_unreachable_instructions SSA pass (zeroing out terminators)
#8979
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
Closed
Closed
Changes from all commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
38a5659
fix: add a `remove_unreachable_instructions` SSA pass
asterite 2702a7d
Add a regression test
asterite 1f59a54
Run it before removing unreachable functions
asterite d336b7d
Slightly improve pass name
asterite 1d80bd8
Simplify logic
asterite ea2378d
If a block is unreachable, its successors are too
asterite 36902d8
Traverse blocks in pre-order
asterite aaa9c0e
All successors are unreachable unless we saw them before
asterite d0d9ab2
Update snapshots
asterite cfa132a
Add all successors transitively right away
asterite 50ab93a
One more snapshot
asterite da3d2c2
DominatorTree to the rescue!
asterite f1eeaf2
Snapshots
asterite c4407d0
Merge branch 'master' into ab/ssa-remove-unreachable-instructions
asterite 5e2f39e
`simple_reachable_blocks_optimization` is fine
asterite 4d314ac
add_successors -> add_dominated_blocks
asterite b2b7865
More renames and comments
asterite 1375346
Comment
asterite 763ce42
Rename tests
asterite 9638edb
Add an unreachable terminator
asterite 426f390
Produce unreachable terminators
asterite cd83277
Assume unreachable can't be reached
asterite e21e963
Add a test for constrain not equal
asterite 5b7e58b
Snapshots
asterite 88ffc6d
Merge branch 'master' into ab/ssa-remove-unreachable-instructions
asterite f06f049
Fix comment
asterite 6118feb
Better handling of unreachable terminator
asterite 3b0cce7
Add another test
asterite 216941f
Remove unreachable instructions in the first SSA pass
asterite 77e8e75
Revert "Remove unreachable instructions in the first SSA pass"
asterite 6e4e138
Handle unreachable during inlining with a panic
asterite f127e37
Revert "Produce unreachable terminators"
asterite 76d7465
Revert "Add an unreachable terminator"
asterite 97fc0ff
Revert "Fix comment"
asterite 3a8e362
Fix tests
asterite f72c9db
Remove unreachable instructions in the first SSA pass
asterite b1153aa
Merge branch 'master' into ab/ssa-remove-unreachable-instructions
asterite 67532e6
Merge branch 'ab/ssa-remove-unreachable-instructions' of github.com:n…
asterite 4524633
Snapshots
asterite 8abe8f8
Try with dummy ref
aakoshh 2e13bd6
Use reverse post order
aakoshh 0f59793
Fix: if no predecessors then reachable
aakoshh 224f58f
Need dominator tree for loops
aakoshh d2cf2b7
Merge remote-tracking branch 'origin/master' into ab/ssa-remove-unrea…
aakoshh e141268
Need zeroing as well
aakoshh 2c957c6
Preserve consts
aakoshh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.