-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Don't allocate DepNode if anonymous #77070
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
Conversation
r? @oli-obk (rust_highfive has picked a reviewer for you, use r? to override) |
@bors try @rust-timer queue |
Awaiting bors try build completion |
⌛ Trying commit 1888747508e96b9bb9c50679c6d1dec57ce551c4 with merge 5949e52c59d14b10fb338c73e4e37a41bc36131a... |
} | ||
|
||
// Handled None case above, safe to unwrap here. | ||
let dep_node_index = dep_node_index.unwrap(); |
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.
You can use
let dep_node_index = if let Some(dep_node_index) = dep_node_index {
dep_node_index
} else {
return ...
};
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.
fair, I'll update once the perf run goes through
☀️ Try build successful - checks-actions, checks-azure |
Queued 5949e52c59d14b10fb338c73e4e37a41bc36131a with parent e0bc267, future comparison URL. |
Finished benchmarking try commit (5949e52c59d14b10fb338c73e4e37a41bc36131a): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
Up to 0.4% slowdown. |
Triage: Is this ready for review? There's still [WIP] in the PR title. |
@@ -85,6 +85,10 @@ impl rustc_query_system::dep_graph::DepKind for DepKind { | |||
fn can_reconstruct_query_key(&self) -> bool { | |||
DepKind::can_reconstruct_query_key(self) | |||
} | |||
|
|||
fn is_anon(&self) -> 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.
fn is_anon(&self) -> bool { | |
#[inline] | |
fn is_anon(&self) -> bool { |
can_reconstruct_query_key
also seems to be missing it. Or maybe it is missing for a reason?
@wesleywiser are we planning on merging this change? If so I can push a fixup. |
@arora-aman Don't we still need to do this? #45408 (comment) I tried building locally and the incremental cache seems to be the same size before and after this change. I would assume we should see some kind of change if the nodes are no longer being allocated. |
r? @wesleywiser I have no idea what this PR is about 😆 |
1888747
to
df35dfc
Compare
df35dfc
to
6c03fb8
Compare
Regarding the overall approach, we can't remove the anonymous nodes without compensating for their removal (most importantly, copying their dependencies up to the things that depend on them). I've made comments on #45408 discussing some of the issues involved. TL;DR, I think the problem to be solved is a bit harder than it first appears, and solving it isn't necessarily a clear win. Regarding the code, since I suspect the overall approach will change, my comments are probably totally irrelevant in the end. But here they are nonetheless.
|
Let's go ahead and close this as @arora-aman suggested on Zulip since they're not going to have time to work on this more in the near future. @arora-aman if want to continue working on this, feel free to re-open at any point! |
#45408