-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
coverage: Split out MC/DC mappings from BcbMappingKind
#124603
Conversation
r? @Nadrieril rustbot has assigned @Nadrieril. Use |
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
This comment has been minimized.
This comment has been minimized.
f7bfcbd
to
f27f60c
Compare
☔ The latest upstream changes (presumably #124675) made this pull request unmergeable. Please resolve the merge conflicts. |
Now that branch and MC/DC mappings have been split out into separate types and vectors, this enum is no longer needed, since it only represents ordinary "code" regions. (We can revisit this decision if we ever add support for other region kinds, such as skipped regions or expansion regions. But at that point, we might just add new structs/vectors for those kinds as well.)
This makes it consistent with the other mapping structs introduced by this PR.
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.
LGTM! Many thanks for the small commits, they made reviewing straightforward.
@bors r+ |
🌲 The tree is currently closed for pull requests below priority 9999. This pull request will be tested once the tree is reopened. |
☀️ Test successful - checks-actions |
Finished benchmarking commit (9c9b568): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 675.62s -> 676.55s (0.14%) |
…idtwco coverage: Further simplify extraction of mapping info from MIR This is another round of rearrangement and simplification that builds on top of the changes made to mapping-extraction by rust-lang#124603. The overall theme is to take the computation of `bcb_has_mappings` and `test_vector_bitmap_bytes` out of the main body of `generate_coverage_spans`, which then lets us perform a few other small changes that had previously been held up by the need to work around those computations.
…idtwco coverage: Further simplify extraction of mapping info from MIR This is another round of rearrangement and simplification that builds on top of the changes made to mapping-extraction by rust-lang#124603. The overall theme is to take the computation of `bcb_has_mappings` and `test_vector_bitmap_bytes` out of the main body of `generate_coverage_spans`, which then lets us perform a few other small changes that had previously been held up by the need to work around those computations.
Rollup merge of rust-lang#124615 - Zalathar:extracted-mappings, r=davidtwco coverage: Further simplify extraction of mapping info from MIR This is another round of rearrangement and simplification that builds on top of the changes made to mapping-extraction by rust-lang#124603. The overall theme is to take the computation of `bcb_has_mappings` and `test_vector_bitmap_bytes` out of the main body of `generate_coverage_spans`, which then lets us perform a few other small changes that had previously been held up by the need to work around those computations.
These variants were added to
BcbMappingKind
as part of the MC/DC coverage implementation in #123409, because that was the path-of-least-resistance for integrating them into the existing code.However, they ultimately represent complex concepts that the enum was not intended to handle, leading to more complexity in the code that processes them. This PR therefore follows in the footsteps of #124545, and splits the MC/DC mappings out into their own dedicated vectors of structs.
After that,
BcbMappingKind
itself ends up having only one variant (Code
), so this PR also flattens that enum into its enclosing struct, renamed tomapping::CodeMapping
.No functional changes.
This will conflict slightly with #124571, but hopefully that should be easy to resolve either way.
@rustbot label +A-code-coverage