-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Move DepKindStruct from rustc_middle to rustc_query_system #101710
Conversation
ad6b82c
to
bc1ed92
Compare
fn extract_def_id<'tcx>(&self, tcx: TyCtxt<'tcx>) -> Option<DefId> { | ||
if self.kind.fingerprint_style(tcx) == FingerprintStyle::DefPathHash { | ||
if tcx.fingerprint_style(self.kind) == FingerprintStyle::DefPathHash { | ||
Some(tcx.def_path_hash_to_def_id(DefPathHash(self.hash.into()), &mut || { |
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 can't be moved to rustc_query_system
without adding def_path_hash_to_def_id
to the DepContext
trait; I can do that, but not sure it was worth the churn. Let me know and I'm happy to change it.
fn from_label_string(label: &str) -> Result<Self, ()> { | ||
dep_node::dep_kind_from_label_string(label) |
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.
needed for the functions I removed from the DepNodeExt
trait
fn try_force_from_dep_node(&self, dep_node: DepNode<Self::DepKind>) -> bool; | ||
fn try_force_from_dep_node(self, dep_node: DepNode<Self::DepKind>) -> bool { |
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.
It's possible to make these and the others standalone functions instead of part of the trait, but then I have to change the callsites from tcx.is_eval_always(kind)
to is_eval_always(tcx, kind)
(and deal with privacy, re-exports, etc). Let me know if you'd prefer I change it.
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit bc1ed929c227ed5d3036ec95beb685ff7e93ca02 with merge f293fc9a1c28900c94a2e3ec999f92888e22d37d... |
☀️ Try build successful - checks-actions |
Queued f293fc9a1c28900c94a2e3ec999f92888e22d37d with parent 5338f5f, future comparison URL. |
Finished benchmarking commit (f293fc9a1c28900c94a2e3ec999f92888e22d37d): comparison URL. Overall result: ❌✅ regressions and 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.
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.
Footnotes |
c805fd0
to
6f86352
Compare
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 6f86352ff611abb0bf96c6a527659b767c2315a8 with merge 7d71171239224e27e782f4734b314e7bdbf131a3... |
☀️ Try build successful - checks-actions |
Queued 7d71171239224e27e782f4734b314e7bdbf131a3 with parent a37499a, future comparison URL. |
Finished benchmarking commit (7d71171239224e27e782f4734b314e7bdbf131a3): comparison URL. Overall result: ❌ regressions - 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.
Footnotes |
5202395
to
7c3bd30
Compare
…ery_impl` This allows removing a function from the `DepKind` trait.
7c3bd30
to
00cde6d
Compare
Not sure off the top of my head - I added |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 00cde6d with merge 1480da8b0f4003f052b5450cd4b17b2f71caede5... |
☀️ Try build successful - checks-actions |
Queued 1480da8b0f4003f052b5450cd4b17b2f71caede5 with parent 17e8752, future comparison URL. |
Finished benchmarking commit (1480da8b0f4003f052b5450cd4b17b2f71caede5): 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.
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.
Footnotes |
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (ff40f2e): 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.
Footnotes |
Helps with #96524. cc https://rust-lang.zulipchat.com/#narrow/stream/241847-t-compiler.2Fwg-incr-comp/topic/Moving.20.60DepKindStruct.60.20to.20rustc_query_system.20.2396524
r? @cjgillot