Skip to content
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

Restrict query recursion in needs_significant_drop #93449

Merged
merged 1 commit into from
Feb 26, 2022

Conversation

JakobDegen
Copy link
Contributor

@JakobDegen JakobDegen commented Jan 29, 2022

Overly aggressive use of the query system to improve caching lead to query cycles and consequently ICEs. This patch fixes this by restricting the use of the query system as a cache to those cases where it is definitely correct.

Closes #92725 .

This is essentially a revert of #90845 for the significant drop case only. The general needs_drop still does the same thing. The hope is that this is enough to preserve the performance improvements of that PR while fixing the ICE. Should get a perf run to verify that this is the case.

cc @cjgillot

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jan 29, 2022
@rust-highfive
Copy link
Collaborator

r? @cjgillot

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 29, 2022
@rust-log-analyzer

This comment has been minimized.

@cjgillot
Copy link
Contributor

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 29, 2022
@bors
Copy link
Contributor

bors commented Jan 29, 2022

⌛ Trying commit 56ed8dc9e526e7a3a2546079781d417b220ad523 with merge 353c871303d82172f5490ff4d58c72a101481398...

@bors
Copy link
Contributor

bors commented Jan 29, 2022

☀️ Try build successful - checks-actions
Build commit: 353c871303d82172f5490ff4d58c72a101481398 (353c871303d82172f5490ff4d58c72a101481398)

@rust-timer
Copy link
Collaborator

Queued 353c871303d82172f5490ff4d58c72a101481398 with parent d08e816, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (353c871303d82172f5490ff4d58c72a101481398): comparison url.

Summary: This benchmark run did not return any relevant results.

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 led to changes in compiler perf.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf -perf-regression

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 30, 2022
@cjgillot
Copy link
Contributor

Sorry @JakobDegen, I had forgotten about this PR.
Could you rebase the PR to pre-start CI?
Perf is green. I'll approve then.

Overly aggressive use of the query system to improve caching lead to query cycles and consequently
ICEs. This patch fixes this by restricting the use of the query system as a cache to those cases
where it is definitely correct.
@JakobDegen
Copy link
Contributor Author

Rebased

@cjgillot
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Feb 26, 2022

📌 Commit 5952d71 has been approved by cjgillot

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 26, 2022
@bors
Copy link
Contributor

bors commented Feb 26, 2022

⌛ Testing commit 5952d71 with merge 10cc7a6...

@bors
Copy link
Contributor

bors commented Feb 26, 2022

☀️ Test successful - checks-actions
Approved by: cjgillot
Pushing 10cc7a6 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 26, 2022
@bors bors merged commit 10cc7a6 into rust-lang:master Feb 26, 2022
@rustbot rustbot added this to the 1.61.0 milestone Feb 26, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (10cc7a6): comparison url.

Summary: This benchmark run did not return any relevant results.

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

@JakobDegen JakobDegen deleted the restrict-hasdrop-optimization branch March 5, 2022 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error[E0391] cycle detected when computing when using rust_2021_incompatible_closure_captures
7 participants