-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
[mir-opt] Implement pass to remove branches on uninhabited variants #65694
[mir-opt] Implement pass to remove branches on uninhabited variants #65694
Conversation
@bors try |
Awaiting bors try build completion |
⌛ Trying commit 9b6965531f0fa200447fa8dcc9e66175c60773fa with merge 04311b4b9a6e180150b8c541c645e47af3f124a0... |
☀️ Try build successful - checks-azure |
Queued 04311b4b9a6e180150b8c541c645e47af3f124a0 with parent 50ffa79, future comparison URL. |
Finished benchmarking try commit 04311b4b9a6e180150b8c541c645e47af3f124a0, comparison URL. |
I think this is about what I was expecting to see. I doubt the benchmarked crates use many enums with uninhabited variants so there isn't much potential for speedup. However, we do see that the pass isn't expensive to run even when it doesn't apply. I will apply @Centril's review feedback and force push. |
9b69655
to
c4b7336
Compare
Fixed & pushed changes |
☔ The latest upstream changes (presumably #65804) made this pull request unmergeable. Please resolve the merge conflicts. |
61ed957
to
2c1c8a4
Compare
@bors try @rust-timer queue |
Awaiting bors try build completion |
…<try> [mir-opt] Implement pass to remove branches on uninhabited variants Based on discussion [here](#64890 (comment)), this is a pass to eliminate dead code that is caused by branching on an enum with uninhabited variants. r? @oli-obk
☀️ Try build successful - checks-azure |
Queued f9d5de7 with parent aa69777, future comparison URL. |
Finished benchmarking try commit f9d5de7, comparison URL. |
Ping from Triage: any updates @wesleywiser @oli-obk? |
@joelpalmer @oli-obk is on vacation this week so it will probably be next week before they can give a final review. |
2c1c8a4
to
cbe2f60
Compare
@bors r+ |
📌 Commit cbe2f60 has been approved by |
…oli-obk [mir-opt] Implement pass to remove branches on uninhabited variants Based on discussion [here](#64890 (comment)), this is a pass to eliminate dead code that is caused by branching on an enum with uninhabited variants. r? @oli-obk
☀️ Test successful - checks-azure |
Based on discussion here, this is a pass to eliminate dead code that is caused by branching on an enum with uninhabited variants.
r? @oli-obk