Make typeck a tcx method which calls typeck_root query#154304
Make typeck a tcx method which calls typeck_root query#154304rust-bors[bot] merged 4 commits intorust-lang:mainfrom
Conversation
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
[Experiement] Make typeck a tcx method which calls typeck_root query
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
[Experiement] Make typeck a tcx method which calls typeck_root query
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (9e35fa9): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 3.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -3.1%, secondary -2.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 0.1%, secondary 0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 484.31s -> 485.406s (0.23%) |
9ab2a2a to
5b30212
Compare
This comment has been minimized.
This comment has been minimized.
| if typeck_root_def_id != def_id { | ||
| return tcx.typeck(typeck_root_def_id); | ||
| } | ||
| assert!(!tcx.is_typeck_child(def_id.to_def_id())); |
There was a problem hiding this comment.
This assert might be a bit costly due its call to def_kind query.
There was a problem hiding this comment.
This was debug_assert at the time rustc perf was run, so we should probably measure it again. I've changed it to non-debug assert to detect if some compiler dev would call it directly. If it increases compile time, I know how to make a TypeckRoot newtype over LocalDefId as an input to typeck_root to avoid this assertion. Or maybe I'm just too paranoid and it would be fine as debug too.
Make typeck a tcx method which calls typeck_root query Currently typeck query itself calls `tcx.typeck(tcx.typeck_root_def_id(key))` if its key isn't a type-check root. I thought this might be an overhead and made typeck a tcx method which calls typeck_root query instead. This is a step to simplify `cache_on_disk_if` query modifier. @petrochenkov please run perf
|
Average time of auto builds is 3h11 but this one is now at 5h25, clearly runaway / stuck. |
|
❗ You can only retry pull requests that are approved and have a previously failed auto build. Hint: There is currently a pending auto build on this PR. To cancel it, run |
|
@bors cancel |
|
Auto build was cancelled. Cancelled workflows: The next pull request likely to be tested is #154466. |
This comment has been minimized.
This comment has been minimized.
569e5fb to
1792232
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@rustbot ready |
|
@bors r+ |
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 cd14b73 (parent) -> a25435b (this PR) Test differencesShow 14 test diffs14 doctest diffs were found. These are ignored, as they are noisy. Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard a25435bcf7cfc9b953d356eda3a51db8da9e3386 --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 (a25435b): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowOur benchmarks found a performance regression caused by this PR. Next Steps:
@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 (primary -2.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -2.9%, secondary -2.2%)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: 487.525s -> 486.086s (-0.30%) |
View all comments
Currently typeck query itself calls
tcx.typeck(tcx.typeck_root_def_id(key))if its key isn't a type-check root. I thought this might be an overhead and made typeck a tcx method which calls typeck_root query instead.This is a step to simplify
cache_on_disk_ifquery modifier.@petrochenkov please run perf