-
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
Alloc hir::Lit
in an arena to remove the destructor from Expr
#109588
Conversation
r? @lcnr (rustbot has picked a reviewer for you, use r? to override) |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit 9985737 with merge a34861623e5b0d2dce2dc5e49e4c4a7e6737ddda... |
compiler/rustc_hir/src/hir.rs
Outdated
}; | ||
} | ||
|
||
static_assert_no_destructor!(Expr<'_>); |
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.
I'm not sure whether this is a useful thing to have, but I used to to make sure that my code was correct and didn't want to immediately delete it
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.
maybe we should assert that all hir arena_types are dropless?
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.
this is kinda what #109590 does actually
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.
yeah, I'll just remove the assertion here, makes no sense to land, we should just land the other PR afterwards
💔 Test failed - checks-actions |
9985737
to
a14e95b
Compare
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit a14e95ba5779f7334f8f3d1850ab23872ead4933 with merge d329a0a3cf1266923851345bd53ba5a5da70808c... |
☀️ Try build successful - checks-actions |
1 similar comment
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (d329a0a3cf1266923851345bd53ba5a5da70808c): 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 got generally a little faster, but max rss went up quite a bit for very literal heavy stress tests like deep-vector. Maybe |
a14e95b
to
359781c
Compare
This comment has been minimized.
This comment has been minimized.
359781c
to
e616391
Compare
apparently these "regressions" are just noise (as usual) so I'll just merge this one on its own, it's a clear improvement. |
@bors r=compiler-errors |
📌 Commit e616391a06c8187b92ab3d1effd23738abc90a9e has been approved by It is now in the queue for this repository. |
@bors r- |
This allows allocating `Expr`s into a dropless arena, which is useful for using length prefixed thing slices in HIR, since these can only be allocated in the dropless arena and not in a typed arena. This is something I'm working on.
e616391
to
34ed5c3
Compare
@bors r+ |
@bors r=compiler-errors |
💡 This pull request was already approved, no need to approve it again.
|
☀️ Test successful - checks-actions |
Finished benchmarking commit (53ac4f8): 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.
|
This was green before the merge and this doesn't touch any type system stuff (which cranelift-codegen and keccak hit). Ran a cachegrind anyways
The only regression for keccak. Those noise levels are absolutely crazy. I'm not gonna mark it as triaged to make sure that it's triaged appropriately but yeah, no concern about this PR. |
Well, the 8% here (which has to be noise, given that this was neutral before and also doesn't touch anything related) is pretty high |
Impl `Copy` for most HIR types This simplifies the invocation of the `arena_types` macro and probably makes working with HIR nicer in general. Based on rust-lang#109588
This allows allocating
Expr
s into a dropless arena, which is useful for using length prefixed thing slices in HIR, since these can only be allocated in the dropless arena and not in a typed arena.