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

Feed a bunch of queries instead of tracking fields on TyCtxt #106776

Merged
merged 5 commits into from
Jan 13, 2023

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Jan 12, 2023

r? @cjgillot

pulled out of #105462

@rustbot
Copy link
Collaborator

rustbot commented Jan 12, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @cjgillot (or someone else) soon.

Please see the contribution instructions for more information.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jan 12, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jan 12, 2023

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@oli-obk
Copy link
Contributor Author

oli-obk commented Jan 12, 2023

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

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

bors commented Jan 12, 2023

⌛ Trying commit d36db0d with merge ad6a73ffa85766c7ace4f5ff7d3885d20aa34f72...

@bors
Copy link
Contributor

bors commented Jan 12, 2023

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

@rust-timer

This comment has been minimized.

@petrochenkov petrochenkov self-assigned this Jan 12, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (ad6a73ffa85766c7ace4f5ff7d3885d20aa34f72): comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

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

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

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.6% [0.2%, 1.4%] 3
Improvements ✅
(primary)
-0.2% [-0.2%, -0.2%] 1
Improvements ✅
(secondary)
-0.5% [-0.5%, -0.5%] 1
All ❌✅ (primary) -0.2% [-0.2%, -0.2%] 1

Max RSS (memory usage)

Results

This 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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.3% [1.3%, 1.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.2% [-1.2%, -1.2%] 1
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 12, 2023
@petrochenkov petrochenkov removed their assignment Jan 12, 2023
@cjgillot
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Jan 13, 2023

📌 Commit d36db0d has been approved by cjgillot

It is now in the queue for this repository.

@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 Jan 13, 2023
@bors
Copy link
Contributor

bors commented Jan 13, 2023

⌛ Testing commit d36db0d with merge 0b90256...

@bors
Copy link
Contributor

bors commented Jan 13, 2023

☀️ Test successful - checks-actions
Approved by: cjgillot
Pushing 0b90256 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 13, 2023
@bors bors merged commit 0b90256 into rust-lang:master Jan 13, 2023
@rustbot rustbot added this to the 1.68.0 milestone Jan 13, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (0b90256): comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.4% [0.4%, 0.4%] 1
Improvements ✅
(primary)
-0.2% [-0.2%, -0.2%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.2% [-0.2%, -0.2%] 2

Max RSS (memory usage)

Results

This 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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.8% [1.8%, 1.8%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.3% [-4.3%, -4.3%] 1
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 19, 2023
…=petrochenkov

Various cleanups around pre-TyCtxt queries and functions

part of rust-lang#105462

based on rust-lang#106776 (everything starting at [0e2b39f](rust-lang@0e2b39f) is new in this PR)

r? `@petrochenkov`

I think this should be most of the uncontroversial part of rust-lang#105462.
bjorn3 pushed a commit to rust-lang/rustc_codegen_cranelift that referenced this pull request Jan 20, 2023
…nkov

Various cleanups around pre-TyCtxt queries and functions

part of #105462

based on rust-lang/rust#106776 (everything starting at [0e2b39f](rust-lang/rust@0e2b39f) is new in this PR)

r? `@petrochenkov`

I think this should be most of the uncontroversial part of #105462.
bors added a commit to rust-lang/miri that referenced this pull request Jan 23, 2023
…nkov

Various cleanups around pre-TyCtxt queries and functions

part of #105462

based on rust-lang/rust#106776 (everything starting at [0e2b39f](rust-lang/rust@0e2b39f) is new in this PR)

r? `@petrochenkov`

I think this should be most of the uncontroversial part of #105462.
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jan 27, 2023
Feed a bunch of queries instead of tracking fields on TyCtxt

r? `@cjgillot`

pulled out of rust-lang#105462
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 21, 2023
…rochenkov

give the resolver access to TyCtxt

The resolver is now created after TyCtxt is created. Then macro expansion and name resolution are run and the results fed into queries just like before this PR.

Since the resolver had (before this PR) mutable access to the `CStore` and the source span table, these two datastructures are now behind a `RwLock`. To ensure that these are not mutated anymore after the resolver is done, a read lock to them is leaked right after the resolver finishes.

### PRs split out of this one and leading up to it:

* rust-lang#105423
* rust-lang#105357
* rust-lang#105603
* rust-lang#106776
* rust-lang#106810
* rust-lang#106812
* rust-lang#108032
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this pull request Apr 20, 2024
give the resolver access to TyCtxt

The resolver is now created after TyCtxt is created. Then macro expansion and name resolution are run and the results fed into queries just like before this PR.

Since the resolver had (before this PR) mutable access to the `CStore` and the source span table, these two datastructures are now behind a `RwLock`. To ensure that these are not mutated anymore after the resolver is done, a read lock to them is leaked right after the resolver finishes.

### PRs split out of this one and leading up to it:

* rust-lang/rust#105423
* rust-lang/rust#105357
* rust-lang/rust#105603
* rust-lang/rust#106776
* rust-lang/rust#106810
* rust-lang/rust#106812
* rust-lang/rust#108032
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this pull request Apr 27, 2024
give the resolver access to TyCtxt

The resolver is now created after TyCtxt is created. Then macro expansion and name resolution are run and the results fed into queries just like before this PR.

Since the resolver had (before this PR) mutable access to the `CStore` and the source span table, these two datastructures are now behind a `RwLock`. To ensure that these are not mutated anymore after the resolver is done, a read lock to them is leaked right after the resolver finishes.

### PRs split out of this one and leading up to it:

* rust-lang/rust#105423
* rust-lang/rust#105357
* rust-lang/rust#105603
* rust-lang/rust#106776
* rust-lang/rust#106810
* rust-lang/rust#106812
* rust-lang/rust#108032
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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

6 participants