-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Refactor passes and pass execution to be more parallel #58679
Conversation
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
☔ The latest upstream changes (presumably #57760) made this pull request unmergeable. Please resolve the merge conflicts. |
Rebased #58250 away. |
@bors try |
⌛ Trying commit c9f00f12b95802fe6a2ffee0af90ea896fb4c135 with merge 48f80d17254f15148d650224c66260acd4e1de95... |
Oh wait, that won't show up on perf.rlo... |
@rust-lang/infra is there a way to cancel a try-build? |
This comment has been minimized.
This comment has been minimized.
src/librustc/ty/query/mod.rs
Outdated
[] fn privacy_access_levels: PrivacyAccessLevels(CrateNum) -> Lrc<AccessLevels>, | ||
[] fn check_privacy: CheckPrivacy(CrateNum) -> (), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you rename this to additional_privacy_checking
? It seems like most of the actual privacy checking is done in check_mod_privacy
so I think it would be confusing if a query called check_privacy
did not actually do everything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed it to check_private_in_public
instead.
@@ -87,7 +88,86 @@ note: required by `Foo` | |||
LL | trait Foo { | |||
| ^^^^^^^^^ | |||
|
|||
error: aborting due to 2 previous errors | |||
error[E0275]: overflow evaluating the requirement `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>: Foo` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this constitutes an error reporting regression. It seems like a lot of spam. cc @estebank
(do we have a GH team for diagnostics questions?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's already a similar error in this file. This just happens in two locations now since we do them in parallel and don't stop at the first one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this constitutes an error reporting regression
I would say it does. In the past for similar situations where there's no way of reworking the current diagnostic plumbing, a way we've avoided duplicated errors is by keeping around a RefCell<HashSet>
in the Session
keeping track of all the Span
/NodeId
/HirId
that have already been emitted and avoid emitting them a second time.
It seems like a lot of spam.
It does, and I'd go as far as saying that the current error is already quite bad, even without it triggering multiple times. There have been some efforts in the past to identify cycles and make the errors less verbose, but this case of NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
isn't yet handled, and it should.
I understand @Zoxc if you don't want to deal with these things in this PR, but would you mind filing follow up issues for the two points raised above if you don't, just so we don't lose track of them?
(do we have a GH team for diagnostics questions?)
We don't and we probably should, as there're quite a few of us now. I'll bring it up the next compiler meeting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
)* | ||
if let Some(panic) = panic { | ||
::std::panic::resume_unwind(panic); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's going on here? Is this to make behaviour more consistent with parallel execution?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Otherwise the single threaded compiler will stop at the first fatal error and the test output will diverge from the parallel compiler.
…ions required for AccessLevels
…guarantees that it will run immediately
📌 Commit 7985c6f has been approved by |
…ister Refactor passes and pass execution to be more parallel For `syntex_syntax` (with 16 threads and 8 cores): - Cuts `misc checking 1` from `0.096s` to `0.08325s`. - Cuts `misc checking 2` from `0.3575s` to `0.2545s`. - Cuts `misc checking 3` from `0.34625s` to `0.21375s`. - Cuts `wf checking` from `0.3085s` to `0.05025s`. Reduces overall execution time for `syntex_syntax` (with 8 threads and cores) from `4.92s` to `4.34s`. Subsumes rust-lang#58494 Blocked on rust-lang#58250 r? @michaelwoerister
…ister Refactor passes and pass execution to be more parallel For `syntex_syntax` (with 16 threads and 8 cores): - Cuts `misc checking 1` from `0.096s` to `0.08325s`. - Cuts `misc checking 2` from `0.3575s` to `0.2545s`. - Cuts `misc checking 3` from `0.34625s` to `0.21375s`. - Cuts `wf checking` from `0.3085s` to `0.05025s`. Reduces overall execution time for `syntex_syntax` (with 8 threads and cores) from `4.92s` to `4.34s`. Subsumes rust-lang#58494 Blocked on rust-lang#58250 r? @michaelwoerister
…ister Refactor passes and pass execution to be more parallel For `syntex_syntax` (with 16 threads and 8 cores): - Cuts `misc checking 1` from `0.096s` to `0.08325s`. - Cuts `misc checking 2` from `0.3575s` to `0.2545s`. - Cuts `misc checking 3` from `0.34625s` to `0.21375s`. - Cuts `wf checking` from `0.3085s` to `0.05025s`. Reduces overall execution time for `syntex_syntax` (with 8 threads and cores) from `4.92s` to `4.34s`. Subsumes rust-lang#58494 Blocked on rust-lang#58250 r? @michaelwoerister
Rollup of 13 pull requests Successful merges: - #58518 (Use early unwraps instead of bubbling up errors just to unwrap in the end) - #58626 (rustdoc: add option to calculate "documentation coverage") - #58629 (rust-lldb: fix crash when printing empty string) - #58660 (MaybeUninit: add read_initialized, add examples) - #58670 (fixes #52482) - #58676 (look for python2 symlinks before bootstrap python) - #58679 (Refactor passes and pass execution to be more parallel) - #58750 (Make `Unique::as_ptr`, `NonNull::dangling` and `NonNull::cast` const) - #58762 (Mention `unwind(aborts)` in diagnostics for `#[unwind]`) - #58924 (Add as_slice() to slice::IterMut and vec::Drain) - #58990 (Actually publish miri in the manifest) - #59018 (std: Delete a by-definition spuriously failing test) - #59045 (Expose new_sub_parser_from_file) Failed merges: r? @ghost
For
syntex_syntax
(with 16 threads and 8 cores):misc checking 1
from0.096s
to0.08325s
.misc checking 2
from0.3575s
to0.2545s
.misc checking 3
from0.34625s
to0.21375s
.wf checking
from0.3085s
to0.05025s
.Reduces overall execution time for
syntex_syntax
(with 8 threads and cores) from4.92s
to4.34s
.Subsumes #58494
Blocked on #58250
r? @michaelwoerister