delegation: fix cycles during delayed lowering#154368
delegation: fix cycles during delayed lowering#154368aerooneqq wants to merge 15 commits intorust-lang:mainfrom
Conversation
|
What specific uses of |
|
This should really have a reviewer with a lot of query system experience. r? @Zoxc |
|
Failed to set assignee to
|
This comment has been minimized.
This comment has been minimized.
f32739b to
f50159f
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
f50159f to
5afd6e4
Compare
|
So the reason of this cycle was that this function wants to iterate over all free items, however they were not available during delayed lowering as it was executed before rust/compiler/rustc_middle/src/ty/print/pretty.rs Line 3393 in e3691a5 Next, there is one more problem in this function, which is maybe not that actual now, but it will be during supporting inherent impls, as during function resolution we will do coherence check, and in cases like: struct X<T> { t: T }
// No generics provided
impl X {
pub fn foo() {}
}
reuse X::foo;we would still come to rust/compiler/rustc_middle/src/ty/print/pretty.rs Line 3398 in e3691a5 @rustbot ready |
This comment has been minimized.
This comment has been minimized.
|
@rustbot ready |
|
@bors try @rust-timer queue |
|
@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.
…<try> delegation: fix cycles during delayed lowering
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (50b5f1c): comparison URL. Overall result: ❌ regressions - 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 5.3%, secondary 2.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -2.2%, secondary 2.7%)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: 487.434s -> 486.33s (-0.23%) |
|
@rustbot ready |
|
@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.
…<try> delegation: fix cycles during delayed lowering
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (764186e): comparison URL. Overall result: ❌ regressions - please read:Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. Next, please: If you can, justify the regressions found in this try perf run in 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 7.5%, secondary 6.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 13.3%)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: 489.264s -> 503.193s (2.85%) |
|
Those 5 regressions happened because |
View all comments
This PR forces lowering of delayed owners after
hir_crate_items, as some diagnostics usehir_crate_itemswhich results in query cycle which is then hangs callingdef_path_stragain and again. Fixes #154169. Part of #118212.r? @petrochenkov