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

rustc_interface: Dismantle register_plugins query #114578

Merged
merged 1 commit into from
Aug 8, 2023

Conversation

petrochenkov
Copy link
Contributor

It did three independent things:

  • Constructed LintStore
  • Prepared incremental directories and dep graph
  • Initialized some fields in Session

The LintStore construction (now passes::create_lint_store) is more or less left in place.

The incremental stuff is now moved into fn dep_graph_future.
This helps us to start loading the dep graph a bit earlier.

The Session field initialization is moved to tcx construction point.
Now that tcx is constructed early these fields don't even need to live in Session, they can live in tcx instead and be initialized at its creation (see the FIXME).

Three previously existing rustc_interface queries are de-querified (register_plugins, dep_graph_future, dep_graph) because they are only used locally in fn global_ctxt and their results don't need to be saved elsewhere.

On the other hand, crate_types and stable_crate_id are querified.
They are used from different places and their use is very similar to the existing crate_name query in this regard.

@rustbot
Copy link
Collaborator

rustbot commented Aug 7, 2023

r? @jackh726

(rustbot has picked a reviewer for you, use r? to override)

@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. labels Aug 7, 2023
@cjgillot
Copy link
Contributor

cjgillot commented Aug 7, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Aug 7, 2023

📌 Commit b6ac576 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 Aug 7, 2023
@bors
Copy link
Contributor

bors commented Aug 8, 2023

⌛ Testing commit b6ac576 with merge 6742e2b...

@bors
Copy link
Contributor

bors commented Aug 8, 2023

☀️ Test successful - checks-actions
Approved by: cjgillot
Pushing 6742e2b to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 8, 2023
@bors bors merged commit 6742e2b into rust-lang:master Aug 8, 2023
11 checks passed
@rustbot rustbot added this to the 1.73.0 milestone Aug 8, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (6742e2b): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

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)
2.3% [2.3%, 2.3%] 1
Regressions ❌
(secondary)
2.5% [1.6%, 3.5%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.8% [-1.8%, -1.8%] 1
All ❌✅ (primary) 2.3% [2.3%, 2.3%] 1

Cycles

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)
2.5% [2.5%, 2.5%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 631.452s -> 632.482s (0.16%)

petrochenkov added a commit to petrochenkov/rust that referenced this pull request Aug 9, 2023
Removes a piece of mutable state.
Follow up to rust-lang#114578.
petrochenkov added a commit to petrochenkov/rust that referenced this pull request Aug 9, 2023
Removes a piece of mutable state.
Follow up to rust-lang#114578.
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Aug 11, 2023
rustc: Move `crate_types` and `stable_crate_id` from `Session` to `GlobalCtxt`

Removes two pieces of mutable state.
Follow up to rust-lang#114578.
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Aug 12, 2023
rustc: Move `crate_types` and `stable_crate_id` from `Session` to `GlobalCtxt`

Removes two pieces of mutable state.
Follow up to rust-lang/rust#114578.
flip1995 pushed a commit to flip1995/rust that referenced this pull request Aug 14, 2023
Removes a piece of mutable state.
Follow up to rust-lang#114578.
bjorn3 pushed a commit to rust-lang/rustc_codegen_cranelift that referenced this pull request Sep 1, 2023
rustc: Move `crate_types` and `stable_crate_id` from `Session` to `GlobalCtxt`

Removes two pieces of mutable state.
Follow up to rust-lang/rust#114578.
bjorn3 pushed a commit to bjorn3/rust that referenced this pull request Sep 6, 2023
Removes a piece of mutable state.
Follow up to rust-lang#114578.
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.

6 participants