-
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
Make local query providers receive local keys #109092
Conversation
r? @cjgillot (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.
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt The Miri subtree was changed cc @rust-lang/miri Some changes occurred in src/tools/clippy cc @rust-lang/clippy Some changes occured in cc @BoxyUwU |
⌛ Trying commit 2a66c2b1ad8880024ad069b8c969102c23781708 with merge 0663769d33256fffe4d0e10d24119cb4cf2404be... |
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.
Very cool! One small improvement
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit 9d2e1e07e89ebca3fe47fe9c5b742d789ff406ae with merge af096b934d3640666c1dcc82186802171479ffe0... |
@bors try sorry bors lol |
⌛ Trying commit b3280e7dbaf7fb2950bc1fc51a6cd76e7c579e99 with merge ef8757fd3403378f1d31bbc8f9d428674b83ff13... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (ef8757fd3403378f1d31bbc8f9d428674b83ff13): 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)This benchmark run did not return any relevant results for this metric. 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.
|
Noise? 🤔 |
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.
What a great cleanup!
@@ -45,14 +45,17 @@ pub trait Key: Sized { | |||
} | |||
} | |||
|
|||
pub trait AsLocalKey: Key { |
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.
Why a separate trait instead of your initial implementation using the Key
trait?
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.
So that the as_local_key
only has to be provided for the keys where we actually make use of it. This should make it a little easier to make sure that all of the impls are correct and not run into things like #109109 again.
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, exactly what Nils said.
☔ The latest upstream changes (presumably #109442) made this pull request unmergeable. Please resolve the merge conflicts. |
bc956fe
to
b1a957b
Compare
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (77d50a8): comparison URL. Overall result: ✅ improvements - no action needed@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.
|
Update the toolchain to use nightly-2023-04-16. Changes were related to the following changes to the toolchain: - rust-lang/rust#108944 - rust-lang/rust#108148 - rust-lang/rust#108471 - rust-lang/rust#109358 - rust-lang/rust#109849 - rust-lang/rust#109819 - rust-lang/rust#109718 - rust-lang/rust#109092 - rust-lang/rust#108856 - rust-lang/rust#105613 - rust-lang/rust#103042 - rust-lang/rust#109716 - rust-lang/rust#108340 - rust-lang/rust#102906 - rust-lang/rust#98112 - rust-lang/rust#108080
When a query is marked
separate_provide_extern
, we can map a query key to a "local" form of the key, e.g.DefId
->LocalDefId
. This simplifies a ton of code which either has to assert or use something likeexpect_local
to assert that the query key is local.