-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 box_free
lang item
#100036
Remove box_free
lang item
#100036
Conversation
r? @wesleywiser (rust-highfive 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
Some changes occurred in compiler/rustc_codegen_gcc cc @antoyo Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Failing test case enables
Freeing a box calls the drop implementation which accepts @bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 3247cc8bcd7ba9bcf0a5debf2d73f2b6b5e9ad2f with merge 3cd4647996dc90f68700aa3bbc775e1a318ab11f... |
☀️ Try build successful - checks-actions |
Queued 3cd4647996dc90f68700aa3bbc775e1a318ab11f with parent 76b0484, future comparison URL. |
Finished benchmarking commit (3cd4647996dc90f68700aa3bbc775e1a318ab11f): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Benchmarking 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 Footnotes |
@drmeepster does this need another perf run? |
d8303fa
to
e1bb0f0
Compare
This comment has been minimized.
This comment has been minimized.
Sorry for disappearing for a while! Another perf run would be great, thanks. |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit e1bb0f0ebcf38e3c22bf387c68b445a28cefc983 with merge 5b44952011bb7348f9ce89c5b0099b43c87531ba... |
⌛ Testing commit 12af10afed5a84cebd005dae90cb78be5c34ed7b with merge 26612d19e3967dd80d4c9b5f8717155b4f066bf4... |
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
☔ The latest upstream changes (presumably #106343) made this pull request unmergeable. Please resolve the merge conflicts. |
12af10a
to
a5c6cb8
Compare
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (a8a2907): 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.
Binary sizeResultsThis 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: 656.011s -> 655.353s (-0.10%) |
Lots of binary size regressions here. Is that expected? |
@@ -1211,8 +1211,16 @@ impl<T: ?Sized, A: Allocator> Box<T, A> { | |||
|
|||
#[stable(feature = "rust1", since = "1.0.0")] | |||
unsafe impl<#[may_dangle] T: ?Sized, A: Allocator> Drop for Box<T, A> { | |||
#[inline] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idk, maybe that inline increased binary size?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
box_free
was also marked as inline, so I don't think that is the cause.
@oli-obk @drmeepster any thoughts on the binary size regressions? |
The only real difference is that |
Remove `box_free` lang item This PR removes the `box_free` lang item, replacing it with `Box`'s `Drop` impl. Box dropping is still slightly magic because the contained value is still dropped by the compiler.
This PR removes the
box_free
lang item, replacing it withBox
'sDrop
impl. Box dropping is still slightly magic because the contained value is still dropped by the compiler.