coverage: Defer part of counter-creation until codegen#136053
Merged
bors merged 4 commits intorust-lang:masterfrom Feb 10, 2025
Merged
coverage: Defer part of counter-creation until codegen#136053bors merged 4 commits intorust-lang:masterfrom
bors merged 4 commits intorust-lang:masterfrom
Conversation
Collaborator
Collaborator
|
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
4cb2f28 to
5b659d2
Compare
Member
|
r? codegen |
Collaborator
|
☔ The latest upstream changes (presumably #136135) made this pull request unmergeable. Please resolve the merge conflicts. |
5b659d2 to
f19968b
Compare
Member
Author
|
Rebased to fix trivial conflict; no change. |
f19968b to
3f4dc13
Compare
Member
Author
|
Tweaked some outdated comments (diff). |
This comment has been minimized.
This comment has been minimized.
3f4dc13 to
2ee7385
Compare
Collaborator
|
☔ The latest upstream changes (presumably #136613) made this pull request unmergeable. Please resolve the merge conflicts. |
Even though the coverage graph itself is no longer available during codegen, its nodes can still be used as opaque IDs.
2ee7385 to
bd855b6
Compare
Member
Author
|
Rebased to resolve conflict in |
Member
|
@bors r+ rollup=iffy conflicty |
Collaborator
workingjubilee
added a commit
to workingjubilee/rustc
that referenced
this pull request
Feb 10, 2025
coverage: Defer part of counter-creation until codegen Follow-up to rust-lang#135481 and rust-lang#135873. One of the pleasant properties of the new counter-assignment algorithm is that we can stop partway through the process, store the intermediate state in MIR, and then resume the rest of the algorithm during codegen. This lets it take into account which parts of the control-flow graph were eliminated by MIR opts, resulting in fewer physical counters and simpler counter expressions. Those improvements end up completely obsoleting much larger chunks of code that were previously responsible for cleaning up the coverage metadata after MIR opts, while also doing a more thorough cleanup job. (That change also unlocks some further simplifications that I've kept out of this PR to limit its scope.)
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 10, 2025
…kingjubilee Rollup of 4 pull requests Successful merges: - rust-lang#133092 (Always set the deployment target when building std) - rust-lang#134626 (Add Four Codegen Tests) - rust-lang#136053 (coverage: Defer part of counter-creation until codegen) - rust-lang#136707 (Bump `cc` to v1.2.12 for the compiler workspace) r? `@ghost` `@rustbot` modify labels: rollup
Zalathar
added a commit
to Zalathar/rust
that referenced
this pull request
Feb 10, 2025
coverage: Defer part of counter-creation until codegen Follow-up to rust-lang#135481 and rust-lang#135873. One of the pleasant properties of the new counter-assignment algorithm is that we can stop partway through the process, store the intermediate state in MIR, and then resume the rest of the algorithm during codegen. This lets it take into account which parts of the control-flow graph were eliminated by MIR opts, resulting in fewer physical counters and simpler counter expressions. Those improvements end up completely obsoleting much larger chunks of code that were previously responsible for cleaning up the coverage metadata after MIR opts, while also doing a more thorough cleanup job. (That change also unlocks some further simplifications that I've kept out of this PR to limit its scope.)
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 10, 2025
Rollup of 6 pull requests Successful merges: - rust-lang#134626 (Add Four Codegen Tests) - rust-lang#136053 (coverage: Defer part of counter-creation until codegen) - rust-lang#136228 (Simplify Rc::as_ptr docs + typo fix) - rust-lang#136487 (ci: stop mysql before removing it) - rust-lang#136790 (Git blame ignore recent formatting commit) - rust-lang#136803 (Subtree update of `rust-analyzer`) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 10, 2025
Rollup of 6 pull requests Successful merges: - rust-lang#134626 (Add Four Codegen Tests) - rust-lang#136053 (coverage: Defer part of counter-creation until codegen) - rust-lang#136228 (Simplify Rc::as_ptr docs + typo fix) - rust-lang#136487 (ci: stop mysql before removing it) - rust-lang#136790 (Git blame ignore recent formatting commit) - rust-lang#136803 (Subtree update of `rust-analyzer`) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 10, 2025
…kingjubilee Rollup of 12 pull requests Successful merges: - rust-lang#136053 (coverage: Defer part of counter-creation until codegen) - rust-lang#136201 (Removed dependency on the field-offset crate, alternate approach) - rust-lang#136228 (Simplify Rc::as_ptr docs + typo fix) - rust-lang#136353 (fix(libtest): Enable Instant on Emscripten targets) - rust-lang#136472 ([`compiletest`-related cleanups 2/7] Feed stage number to compiletest directly) - rust-lang#136487 (ci: stop mysql before removing it) - rust-lang#136552 (Use an `Option` for `FindNextFileHandle` in `ReadDir` instead of `INVALID_FILE_HANDLE` sentinel value) - rust-lang#136705 (Some miscellaneous edition-related library tweaks) - rust-lang#136707 (Bump `cc` to v1.2.13 for the compiler workspace) - rust-lang#136790 (Git blame ignore recent formatting commit) - rust-lang#136792 (Don't apply editorconfig to llvm) - rust-lang#136805 (ignore win_delete_self test in Miri) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 10, 2025
Rollup merge of rust-lang#136053 - Zalathar:defer-counters, r=saethlin coverage: Defer part of counter-creation until codegen Follow-up to rust-lang#135481 and rust-lang#135873. One of the pleasant properties of the new counter-assignment algorithm is that we can stop partway through the process, store the intermediate state in MIR, and then resume the rest of the algorithm during codegen. This lets it take into account which parts of the control-flow graph were eliminated by MIR opts, resulting in fewer physical counters and simpler counter expressions. Those improvements end up completely obsoleting much larger chunks of code that were previously responsible for cleaning up the coverage metadata after MIR opts, while also doing a more thorough cleanup job. (That change also unlocks some further simplifications that I've kept out of this PR to limit its scope.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #135481 and #135873.
One of the pleasant properties of the new counter-assignment algorithm is that we can stop partway through the process, store the intermediate state in MIR, and then resume the rest of the algorithm during codegen. This lets it take into account which parts of the control-flow graph were eliminated by MIR opts, resulting in fewer physical counters and simpler counter expressions.
Those improvements end up completely obsoleting much larger chunks of code that were previously responsible for cleaning up the coverage metadata after MIR opts, while also doing a more thorough cleanup job.
(That change also unlocks some further simplifications that I've kept out of this PR to limit its scope.)