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: Rename basic_coverage_blocks to just graph #134551

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Zalathar
Copy link
Contributor

During coverage instrumentation, this variable always holds the current function's coverage graph, which is a simplified view of its MIR control-flow graph. The new name is clearer in context, and also shorter.


This is purely a rename, so there is no functional change.

During coverage instrumentation, this variable always holds the coverage graph,
which is a simplified view of the MIR control-flow graph. The new name is
clearer in context, and also shorter.
@Zalathar Zalathar added the A-code-coverage Area: Source-based code coverage (-Cinstrument-coverage) label Dec 20, 2024
@rustbot
Copy link
Collaborator

rustbot commented Dec 20, 2024

r? @estebank

rustbot has assigned @estebank.
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 Dec 20, 2024
@rustbot
Copy link
Collaborator

rustbot commented Dec 20, 2024

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

Copy link
Member

@lqd lqd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess coverage or coverage_graph could also be better than basic_coverage_blocks, but sure.

@Zalathar
Copy link
Contributor Author

In the context of the InstrumentCoverage pass, everything is coverage, so just coverage would be confusing.

I can see an argument for coverage_graph, but in this context there's only one relevant graph, so I think the shorter name is worth the tradeoff. And coverage_graph also doesn't seem that helpful to readers who are unfamiliar with this code, because they would still have to look up the details of what the coverage graph actually is.

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-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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants