-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Remove the assume(!is_null) from Vec::as_ptr #106967
Conversation
r? @m-ou-se (rustbot has picked a reviewer for you, use r? to override) |
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
This comment has been minimized.
This comment has been minimized.
9702ca8
to
328980e
Compare
@bors try |
⌛ Trying commit 328980eb5f134f896ca0aab39d4f44c1fda9d81e with merge c3ab48d9840510308050d3c3dc2879db69fad3b1... |
☀️ Try build successful - checks-actions |
@rust-timer build c3ab48d9840510308050d3c3dc2879db69fad3b1 |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (c3ab48d9840510308050d3c3dc2879db69fad3b1): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never 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)ResultsThis 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.
CyclesThis benchmark run did not return any relevant results for this metric. |
MIR optimizations have changed substantially since the last run |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit 328980eb5f134f896ca0aab39d4f44c1fda9d81e with merge c3e1d1d57310b9da0cafffacfe08242a9aad5858... |
328980e
to
39bbbab
Compare
39bbbab
to
738c8b0
Compare
Just realized that the same |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit 738c8b0 with merge a61d19e671aa7efc184772d5a2e8172d172dcc0a... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (a61d19e671aa7efc184772d5a2e8172d172dcc0a): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never 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)ResultsThis 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.
CyclesResultsThis 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.
|
It's been a little while, so |
Looks great @bors r+ |
☀️ Test successful - checks-actions |
1 similar comment
☀️ Test successful - checks-actions |
Finished benchmarking commit (ef03fda): 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)ResultsThis 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.
CyclesResultsThis 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.
|
@RalfJung , as the person who added these this comment #61114 (comment) may be relevant, in terms of |
Visiting for rustc perf-triage
@rustbot label: +perf-regression-triaged |
Incidentally, I do wonder how many of these assumes are technical artifact left over from PR #21886 |
I didn't "add" them, I copied them over from some other places... previously they were in the Deref/DerefMut impls for
Seems pretty likely that the AsSlice instance was eventually turned into the Deref impl, and the assume carried over. |
FWIW, I'm almost certain that the changes here are related to MIR inlining, not the optimizations that LLVM is able to do as a result of the information that this
|
At a guess, this code is leftover from LLVM was worse at keeping track of the niche information here. In any case, we don't need this anymore: Removing this
assume
doesn't get rid of thenonnull
attribute on the return type.