-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Allow optimizing u32::from::<char>
.
#124905
Conversation
rustbot has assigned @workingjubilee. Use |
u32::from::<char>
.
r? @joboet |
You could use a |
Arguably this should be done in the backend for |
Agreed, however I don't know where the code for that lives. |
That would be rust/compiler/rustc_codegen_ssa/src/mir/rvalue.rs Lines 529 to 531 in cb93c24
|
4a436dc
to
537d59e
Compare
I don't feel comfortable reviewing compiler changes, so That said, I think this is a good idea! |
☔ The latest upstream changes (presumably #123886) made this pull request unmergeable. Please resolve the merge conflicts. |
There are merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged. You can start a rebase with the following commands:
The following commits are merge commits: |
This comment has been minimized.
This comment has been minimized.
526aa8c
to
c56d4b2
Compare
c56d4b2
to
b7f60e0
Compare
Probably best to squash the first two commits, since they add then revert the library change |
@scottmcm, I think changing the test to use |
@reitermarkus Sorry for being slow to get back to you here. The changes are looking good and CI is passing, but based on your previous comment that's only because CI doesn't run the codegen test? What's output IR you get? Alternatively, if you need to change |
@reitermarkus Ping for the above? |
0045fa1
to
2f2eb22
Compare
@rustbot ready |
@bors r+ rollup=never |
☀️ Test successful - checks-actions |
Finished benchmarking commit (3942254): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeResults (primary 0.2%, secondary 0.4%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Bootstrap: 769.985s -> 771.748s (0.23%) |
Visiting for weekly rustc-perf triage
@rustbot label: +perf-regression-triaged |
Extracted from #124307.
This allows optimizing the panicking branch in the
escape_unicode
function, see https://rust.godbolt.org/z/61YhKrhvP.