Skip to content
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: Restrict ExpressionUsed simplification to Code mappings #127758

Merged
merged 2 commits into from
Jul 15, 2024

Conversation

Zalathar
Copy link
Contributor

In the future, branch and MC/DC mappings might have expressions that don't correspond to any single point in the control-flow graph. That makes it trickier to keep track of which expressions should expect an ExpressionUsed node.

We therefore sidestep that complexity by only performing ExpressionUsed simplification for expressions associated directly with ordinary Code mappings.

(This simplification step is inherited from the original coverage implementation, which only supported Code mappings anyway, so there's no particular reason to extend it to other kinds of mappings unless we specifically choose to.)

Relevant to:

@rustbot label +A-code-coverage

Zalathar added 2 commits July 15, 2024 20:37
This makes it possible to allocate per-BCB data structures without needing
access to the whole graph.
In the future, branch and MC/DC mappings might have expressions that don't
correspond to any single point in the control-flow graph. That makes it
trickier to keep track of which expressions should expect an `ExpressionUsed`
node.

We therefore sidestep that complexity by only performing `ExpressionUsed`
simplification for expressions associated directly with ordinary `Code`
mappings.
@rustbot
Copy link
Collaborator

rustbot commented Jul 15, 2024

r? @oli-obk

rustbot has assigned @oli-obk.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 15, 2024
@rustbot
Copy link
Collaborator

rustbot commented Jul 15, 2024

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@rustbot rustbot added the A-code-coverage Area: Source-based code coverage (-Cinstrument-coverage) label Jul 15, 2024
@oli-obk
Copy link
Contributor

oli-obk commented Jul 15, 2024

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jul 15, 2024

📌 Commit d4f1f92 has been approved by oli-obk

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 15, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 15, 2024
coverage: Restrict `ExpressionUsed` simplification to `Code` mappings

In the future, branch and MC/DC mappings might have expressions that don't correspond to any single point in the control-flow graph. That makes it trickier to keep track of which expressions should expect an `ExpressionUsed` node.

We therefore sidestep that complexity by only performing `ExpressionUsed` simplification for expressions associated directly with ordinary `Code` mappings.

(This simplification step is inherited from the original coverage implementation, which only supported `Code` mappings anyway, so there's no particular reason to extend it to other kinds of mappings unless we specifically choose to.)

Relevant to:
- rust-lang#124154
- rust-lang#126677
- rust-lang#124278

`@rustbot` label +A-code-coverage
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 15, 2024
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#124921 (offset_from: always allow pointers to point to the same address)
 - rust-lang#127407 (Make parse error suggestions verbose and fix spans)
 - rust-lang#127675 (Remove invalid help diagnostics for const pointer)
 - rust-lang#127684 (consolidate miri-unleashed tests for mutable refs into one file)
 - rust-lang#127758 (coverage: Restrict `ExpressionUsed` simplification to `Code` mappings)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 15, 2024
coverage: Restrict `ExpressionUsed` simplification to `Code` mappings

In the future, branch and MC/DC mappings might have expressions that don't correspond to any single point in the control-flow graph. That makes it trickier to keep track of which expressions should expect an `ExpressionUsed` node.

We therefore sidestep that complexity by only performing `ExpressionUsed` simplification for expressions associated directly with ordinary `Code` mappings.

(This simplification step is inherited from the original coverage implementation, which only supported `Code` mappings anyway, so there's no particular reason to extend it to other kinds of mappings unless we specifically choose to.)

Relevant to:
- rust-lang#124154
- rust-lang#126677
- rust-lang#124278

``@rustbot`` label +A-code-coverage
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 15, 2024
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#124921 (offset_from: always allow pointers to point to the same address)
 - rust-lang#127407 (Make parse error suggestions verbose and fix spans)
 - rust-lang#127684 (consolidate miri-unleashed tests for mutable refs into one file)
 - rust-lang#127729 (Stop using the `gen` identifier in the compiler)
 - rust-lang#127736 (Add myself to the review rotation)
 - rust-lang#127758 (coverage: Restrict `ExpressionUsed` simplification to `Code` mappings)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit e5d65e4 into rust-lang:master Jul 15, 2024
6 checks passed
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jul 15, 2024
Rollup merge of rust-lang#127758 - Zalathar:expression-used, r=oli-obk

coverage: Restrict `ExpressionUsed` simplification to `Code` mappings

In the future, branch and MC/DC mappings might have expressions that don't correspond to any single point in the control-flow graph. That makes it trickier to keep track of which expressions should expect an `ExpressionUsed` node.

We therefore sidestep that complexity by only performing `ExpressionUsed` simplification for expressions associated directly with ordinary `Code` mappings.

(This simplification step is inherited from the original coverage implementation, which only supported `Code` mappings anyway, so there's no particular reason to extend it to other kinds of mappings unless we specifically choose to.)

Relevant to:
- rust-lang#124154
- rust-lang#126677
- rust-lang#124278

```@rustbot``` label +A-code-coverage
@rustbot rustbot added this to the 1.81.0 milestone Jul 15, 2024
@Zalathar Zalathar deleted the expression-used branch July 15, 2024 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-code-coverage Area: Source-based code coverage (-Cinstrument-coverage) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants