-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Implement multiple return terminator optimization #74839
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
r? @oli-obk |
@alarsyo any updates on this? |
b155f46
to
06a8ac5
Compare
Found the time to work on this, should be ready for a first basic review :) |
src/test/mir-opt/multiple_return_terminators.test.MultipleReturnTerminators.diff
Outdated
Show resolved
Hide resolved
1fcc274
to
449f158
Compare
Rebased on master |
src/test/mir-opt/multiple_return_terminators.test.MultipleReturnTerminators.diff
Outdated
Show resolved
Hide resolved
@bors r+ |
📌 Commit 779f52272d56c5ead356a1d17cb9cd6ca3fc304f has been approved by |
There doesn't seem to be consensus on #72022 that this is a good idea, are we sure we want this? Also, there may be perf impact to this change so it probably shouldn't be rolled up. |
@bors rollup=never r- |
@alarsyo there are multiple failing codegen tests, can you adjust them? |
Just to make sure I haven't made any mistake: when generating the IR in this comment, I had to remove this line from the file for the test to run, presumably because I'm building the compiler in debug mode. That doesn't affect the optimization level of the generated IR, right? So if I understand correctly, this test doesn't pass because something in How would I go about putting this behind |
Here's an example for mir-opt-level 3:
Oh, that's a curious situation. it's still release mode, but with debug assertions, can you try adding I won't be able to review again until the 7th, cc @rust-lang/wg-mir-opt can someone have a look at this? |
That works, the test runs even though I'm in debug mode, thanks! I guess I shouldn't include this change in this PR though, right? |
Whoops, forgot to bless the mir-opt tests with the opt behind opt-level 3. |
79708fa
to
56eeca2
Compare
Hmm, I can't reproduce the two failing tests by running |
56eeca2
to
889dd98
Compare
☔ The latest upstream changes (presumably #74862) made this pull request unmergeable. Please resolve the merge conflicts. |
in order for the 32 bit versions to get updated you need to run with |
@alarsyo Ping from triage, any updates on this? |
@crlf0710 I've been pretty busy the last few weeks, nothing new for now :( I have to get back on this, hopefully by the next weekend |
889dd98
to
268f786
Compare
@oli-obk rebased on master, I'll try to make progress :) |
Everything passes 🎉 |
@bors r+ awesome |
📌 Commit 46c0bd3 has been approved by |
☀️ Test successful - checks-actions, checks-azure |
Closes #72022