-
Notifications
You must be signed in to change notification settings - Fork 14k
First iteration of simplify match branches #75382
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
Conversation
8e45377 to
c5d9787
Compare
|
cc @rust-lang/wg-mir-opt |
87799bd to
7e14f9b
Compare
|
Uh, would you happen to know why this is breaking? I can't figure out why this won't build. |
7e03e3f to
738e821
Compare
your optimization breaks things. You can test with |
|
Ah, I just assumed that since it was breaking in dependencies it was not the fault of the changes. It's good to know this may yet optimize something somewhere |
|
Yea, I always work with |
This comment has been minimized.
This comment has been minimized.
738e821 to
84138f1
Compare
|
The diff for the simple MIR test looks ok, so I'm wondering where this would break things otherwise... |
|
So one thing that we overlooked is that there may be more branches pointing to the |
a866890 to
41094ea
Compare
This also updates a check to ensure that this is only applied to bools
Just output the current bless'd MIR diff The tests are still fairly broken rn
src/test/mir-opt/matches_reduce_branches.foo.MatchBranchSimplification.diff
Outdated
Show resolved
Hide resolved
41094ea to
631a232
Compare
631a232 to
46e5699
Compare
|
awesome! @bors r+ |
|
📌 Commit 46e5699 has been approved by |
|
MIR opts (hopefully 🤞) improve performance so they shouldn't be rolled up. @bors rollup=never |
|
☀️ Test successful - checks-actions, checks-azure |
This is a simple MIR pass that attempts to convert
into
There are still missing components(like checking if the assignments are bools).
Was hoping that this could get some review though.
Handles #75141
r? @oli-obk