-
Notifications
You must be signed in to change notification settings - Fork 13.9k
compiletest: Use the same directive lines for EarlyProps and ignore/only/needs #147522
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
Conversation
Some changes occurred in src/tools/compiletest cc @jieyouxu |
|
Ooo nice, I'll take a look ~tmrw. |
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.
Thanks, to me this makes much more sense, nice!
Somehow I managed to click "comment" and not the "approve" button... Anyway, |
Rollup of 12 pull requests Successful merges: - #145651 (Regression test for const promotion with Option<Ordering>) - #145722 (implement Extend<{Group, Literal, Punct, Ident}> for TokenStream) - #146520 (Promote armv8r-none-eabihf target to Tier 2) - #146522 (Promote armv7a-none-eabihf to Tier 2) - #147289 (Mitigate `thread_local!` shadowing issues) - #147515 (Update rustc-perf submodule) - #147522 (compiletest: Use the same directive lines for EarlyProps and ignore/only/needs) - #147525 (Replace locals in debuginfo records during ref_prop and dest_prop) - #147544 (Remove StatementKind::Deinit.) - #147551 (remove `#[rustc_inherit_overflow_checks]` from `is_multiple_of`) - #147553 (Move `wasm32-wasip3` to the tier 3 table) - #147562 (Stabilize `NonZero<u*>::div_ceil`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 12 pull requests Successful merges: - #145651 (Regression test for const promotion with Option<Ordering>) - #145722 (implement Extend<{Group, Literal, Punct, Ident}> for TokenStream) - #146520 (Promote armv8r-none-eabihf target to Tier 2) - #146522 (Promote armv7a-none-eabihf to Tier 2) - #147289 (Mitigate `thread_local!` shadowing issues) - #147515 (Update rustc-perf submodule) - #147522 (compiletest: Use the same directive lines for EarlyProps and ignore/only/needs) - #147525 (Replace locals in debuginfo records during ref_prop and dest_prop) - #147544 (Remove StatementKind::Deinit.) - #147551 (remove `#[rustc_inherit_overflow_checks]` from `is_multiple_of`) - #147553 (Move `wasm32-wasip3` to the tier 3 table) - #147562 (Stabilize `NonZero<u*>::div_ceil`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #147522 - Zalathar:directive, r=jieyouxu compiletest: Use the same directive lines for EarlyProps and ignore/only/needs Currently we load each discovered test file to scan it for directives once for EarlyProps parsing, then reload and scan it once *per revision* for ignore processing. If a revision is not ignored, we then reload and scan it again during actual execution. That's a bit silly, so this PR tries to reduce the number of unnecessary file loads and line scans for directive parsing, by reusing the same collection of `DirectiveLine` values for EarlyProps and for each revision's ignores. Each individual directive still needs to be re-parsed a bunch of times, but those steps can at least avoid scanning the whole file, or having to split out names from values. --- There's more that could be done after this, such as only doing known-directive checks once per file, or embedding file paths in each `DirectiveLine`, but I decided to stop here to allow review in modest chunks. r? jieyouxu
Rollup of 12 pull requests Successful merges: - rust-lang/rust#145651 (Regression test for const promotion with Option<Ordering>) - rust-lang/rust#145722 (implement Extend<{Group, Literal, Punct, Ident}> for TokenStream) - rust-lang/rust#146520 (Promote armv8r-none-eabihf target to Tier 2) - rust-lang/rust#146522 (Promote armv7a-none-eabihf to Tier 2) - rust-lang/rust#147289 (Mitigate `thread_local!` shadowing issues) - rust-lang/rust#147515 (Update rustc-perf submodule) - rust-lang/rust#147522 (compiletest: Use the same directive lines for EarlyProps and ignore/only/needs) - rust-lang/rust#147525 (Replace locals in debuginfo records during ref_prop and dest_prop) - rust-lang/rust#147544 (Remove StatementKind::Deinit.) - rust-lang/rust#147551 (remove `#[rustc_inherit_overflow_checks]` from `is_multiple_of`) - rust-lang/rust#147553 (Move `wasm32-wasip3` to the tier 3 table) - rust-lang/rust#147562 (Stabilize `NonZero<u*>::div_ceil`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 12 pull requests Successful merges: - rust-lang/rust#145651 (Regression test for const promotion with Option<Ordering>) - rust-lang/rust#145722 (implement Extend<{Group, Literal, Punct, Ident}> for TokenStream) - rust-lang/rust#146520 (Promote armv8r-none-eabihf target to Tier 2) - rust-lang/rust#146522 (Promote armv7a-none-eabihf to Tier 2) - rust-lang/rust#147289 (Mitigate `thread_local!` shadowing issues) - rust-lang/rust#147515 (Update rustc-perf submodule) - rust-lang/rust#147522 (compiletest: Use the same directive lines for EarlyProps and ignore/only/needs) - rust-lang/rust#147525 (Replace locals in debuginfo records during ref_prop and dest_prop) - rust-lang/rust#147544 (Remove StatementKind::Deinit.) - rust-lang/rust#147551 (remove `#[rustc_inherit_overflow_checks]` from `is_multiple_of`) - rust-lang/rust#147553 (Move `wasm32-wasip3` to the tier 3 table) - rust-lang/rust#147562 (Stabilize `NonZero<u*>::div_ceil`) r? `@ghost` `@rustbot` modify labels: rollup
Currently we load each discovered test file to scan it for directives once for EarlyProps parsing, then reload and scan it once per revision for ignore processing. If a revision is not ignored, we then reload and scan it again during actual execution.
That's a bit silly, so this PR tries to reduce the number of unnecessary file loads and line scans for directive parsing, by reusing the same collection of
DirectiveLine
values for EarlyProps and for each revision's ignores.Each individual directive still needs to be re-parsed a bunch of times, but those steps can at least avoid scanning the whole file, or having to split out names from values.
There's more that could be done after this, such as only doing known-directive checks once per file, or embedding file paths in each
DirectiveLine
, but I decided to stop here to allow review in modest chunks.r? jieyouxu