Rollup of 5 pull requests#153805
Conversation
…ng the buffer on start = end range
These two types fit the pattern because they have no generics.
The `DerefMut` impl for `Providers` was removed in rust-lang#151096.
`tcx` is the usual name for `TyCtxt` parameters.
By removing the ones in `compiler/rustc_middle/src/queries.rs`, and making `compiler/rustc_middle/src/query/modifiers.rs` the single source of truth.
We compute `key_hash` in `try_execute_query`, so we can just pass the value in.
`execute_job` has a single call site in `try_execute_query`. This commit inlines and removes `execute_job`, but also puts the part that checks feedable results in its own separate function, `check_feedable`, because it's a nicely separate piece of logic. The big win here is that all the code dealing with the `QueryState` is now together in `try_execute_query`: get the lock, do the lookup, drop the lock, create the job guard, and complete the job guard. Previously these steps were split across two functions which I found hard to follow. This commit purely moves code around, there are no other changes.
The previous commit inlined `execute_job` without changing any of its code. This commit does a few tiny follow-up changes.
…r=joboet fixed VecDeque::splice() not filling the buffer correctly when resizing the buffer on start = end range This PR fixes rust-lang#151758. The issue came from `Splice::move_tail`, which as joboet pointed out: > The issue is in move_tail, which resizes the buffer, but fails to account for the resulting hole. The problem with reserving more space through `VecDeque`'s `buf.reserve()` is that it doesn't update `VecDeque`'s `head`, which means that this code in `move_tail`: ```rust deque.wrap_copy( deque.to_physical_idx(tail_start), deque.to_physical_idx(new_tail_start), self.tail_len, ); ``` could move over the section of data that `tail_start..tail_start + self.tail_len` of the buffer is supposed to be held at to the incorrect destination since all `.to_physical_idx()` is doing is a wrapping add on the `VecDeque`'s head with the passed in `idx` value. To avoid this I decided to use `VecDeque::reserve` to both allocate more space into the `VecDeque` if necessary and update head appropriately. However, `VecDeque::reserve` internally relies on the `VecDeque`'s `len` field. Earlier in `VecDeque::splice`, it modifies the `VecDeque`'s `len` constructing the drain via `Drain::new` (as it does a `mem::replace` on `deque.len` with the start bound of the passed in `range`). The `VecDeque`'s `len` can also be potentially modified in the earlier `Splice::fill()` call if it does any replacement towards elements within the passed in `range` value for `VecDeque::splice()`. I needed to temporarily restore the `VecDeque`'s `len` to its actual len, so that `VecDeque::reserve` can work properly. Afterward, you can bring back the `VecDeque`'s `len` to what its value was before and fill the gap appropriately with the rest of the `replace_with` content. r? @joboet
Miscellaneous tweaks A hodge-podge of small changes that didn't fit anywhere else. r? @yaahc
…ks, r=cjgillot `try_execute_query` tweaks Details in individual commits. r? @cjgillot
implementation of `-Z min-recursion-limit` impl of rust-lang/compiler-team#969, closes rust-lang#153132 r? lcnr
…Zalathar Avoid duplicated query modifier comments. There is currently some duplication.
|
Rollup of everything. @bors r+ rollup=never p=5 |
|
i'd like to work on this.... |
This comment has been minimized.
This comment has been minimized.
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 4efe3dc (parent) -> 7ad5c60 (this PR) Test differencesShow 180 test diffsStage 1
Stage 2
Additionally, 170 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 7ad5c602172b132646213941b5102a75a77c10f6 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (7ad5c60): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (secondary 1.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -2.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 482.458s -> 488.372s (1.23%) |
Successful merges:
try_execute_querytweaks #153766 (try_execute_querytweaks)-Z min-recursion-limit#153188 (implementation of-Z min-recursion-limit)r? @ghost
Create a similar rollup