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: Treat each match arm as a "branch" for branch coverage #124154

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Commits on Apr 29, 2024

  1. Configuration menu
    Copy the full SHA
    6b60954 View commit details
    Browse the repository at this point in the history
  2. coverage: Simplify counter expressions (a + b) - b to just a

    There are other simplifications we could potentially be performing, but this
    one is directly motivated by branch coverage of match arms, because it
    naturally handles the common case where a match arm has no guard.
    Zalathar committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    15d9290 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    377bb01 View commit details
    Browse the repository at this point in the history
  4. coverage: Represent branches as a list of arms

    Within the `InstrumentCoverage` pass, we now represent branches as a list of
    arms, instead of a true/false pair, until we prepare the final table of
    mappings to be attached to the MIR body.
    
    (We then flatten the list into two-way branches by treating each arm as a
    branch between its success block, and the total of all later arms.)
    
    Currently all of the branches produced by MIR building are still two-way, but
    this is a step towards allowing many-way branches.
    Zalathar committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    556eaf8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    67a774a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    40284a3 View commit details
    Browse the repository at this point in the history