Rollup of 5 pull requests#154838
Conversation
Moving this code here makes the subsequent cleanup easier.
The existing code contains some very strange control flow that can put the dep graph into an inconsistent and untested state if streaming output setup fails. (Specifically, that failure would put `DepGraph` into an "empty" state intended for non-incremental compilation, but other parts of the compiler would still think that incremental mode is enabled due to `sess.opts.incremental`.) This commit therefore performs a big overhaul of `setup_dep_graph` by: - Returning immediately in non-incremental mode. - Exiting immediately if dep-graph streaming output couldn't be set up. - Inlining some "helper" functions that were more confusing than helpful.
- Make the enum non-public - Replace the generic `<T>` with concrete fields - Rename variant `LoadDepGraph` to `IoError`
This hashmap was added in rust-lang#42625 and is used for debug-only printing. If a key isn't recoverable, `DepNode::construct` will create a string for it (using `DepNodeKey::to_debug_str`) and insert the string in the hashmap, but only if (a) it's a debug build, and (b) `-Zincremental-info` or `-Zquery-dep-graph` is specified. ("Recoverable" here means the fingerprint style is `KeyFingerPrintStyle::Opaque`.) `DepNode::fmt` will then use this string to produce output showing the key itself, and not just its fingerprint. All this code is debug-only. Some of it is guarded with `#[cfg(debug_assertions)]`, but some is not. However, the `tcx.def_path_debug_str()` path in `DepNode::fmt` seems to be unreachable. Because it's debug-only it can't be used by normal users and so must only be there for rustc devs. But even in a debug build I was unable to trigger that path. I tried changing it to a panic and ran the full test suite without problem, and then I tried various flag combinations and scenarios also without hitting it. The `-Zincremental-info` condition doesn't make sense because that only prints high-level info about queries, not individual keys. So the path is either unreachable, or so hard to reach that it's not providing any actual value. This commit removes all this code.
Make `setup_dep_graph` incremental-only and more straightforward The existing code contains some very strange control flow that can put the dep graph into an inconsistent and untested state if streaming output setup fails. (Specifically, that failure would put `DepGraph` into an "empty" state intended for non-incremental compilation, but other parts of the compiler would still think that incremental mode is enabled due to `sess.opts.incremental`.) This PR therefore performs a big overhaul of `setup_dep_graph` by: - Returning immediately in non-incremental mode. - Exiting immediately if dep-graph streaming output couldn't be set up. - Inlining some "helper" functions that were more confusing than helpful.
…de_debug, r=cjgillot Remove `DepGraphData::dep_node_debug`. This hashmap was added in rust-lang#42625 and is used for debug-only printing. If a key isn't recoverable, `DepNode::construct` will create a string for it (using `DepNodeKey::to_debug_str`) and insert the string in the hashmap, but only if (a) it's a debug build, and (b) `-Zincremental-info` or `-Zquery-dep-graph` is specified. ("Recoverable" here means the fingerprint style is `KeyFingerPrintStyle::Opaque`.) `DepNode::fmt` will then use this string to produce output showing the key itself, and not just its fingerprint. All this code is debug-only. Some of it is guarded with `#[cfg(debug_assertions)]`, but some is not. However, the `tcx.def_path_debug_str()` path in `DepNode::fmt` seems to be unreachable. Because it's debug-only it can't be used by normal users and so must only be there for rustc devs. But even in a debug build I was unable to trigger that path. I tried changing it to a panic and ran the full test suite without problem, and then I tried various flag combinations and scenarios also without hitting it. The `-Zincremental-info` condition doesn't make sense because that only prints high-level info about queries, not individual keys. So the path is either unreachable, or so hard to reach that it's not providing any actual value. This commit removes all this code. r? @cjgillot
…e-152893, r=Kivooeo add regression test for EII declaration conflicting with constructor fixs: rust-lang#152893 add regression test
…686, r=Kivooeo add regression test for 119686 closes rust-lang#119686
…382, r=Kivooeo Add three tests for fixed issues (two ICEs and one coherence checking failure that now passes) Closes rust-lang#112588. Closes rust-lang#113793. Closes rust-lang#119382.
|
Rollup of everything. @bors r+ rollup=never p=5 |
This comment has been minimized.
This comment has been minimized.
|
📌 Perf builds for each rolled up PR:
previous master: f92020a676 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
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 f92020a (parent) -> e73c56a (this PR) Test differencesShow 10 test diffsStage 1
Stage 2
Additionally, 2 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 e73c56abd0baf3dbaafbdc3ce6072a416aade867 --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 (e73c56a): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (secondary 1.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 2.6%)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: 492.059s -> 493.268s (0.25%) |
Successful merges:
setup_dep_graphincremental-only and more straightforward #154529 (Makesetup_dep_graphincremental-only and more straightforward )DepGraphData::dep_node_debug. #154565 (RemoveDepGraphData::dep_node_debug.)r? @ghost
Create a similar rollup