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: Don't bother renumbering expressions on the Rust side #114399

Merged
merged 3 commits into from
Sep 21, 2023

Commits on Sep 21, 2023

  1. Configuration menu
    Copy the full SHA
    659575a View commit details
    Browse the repository at this point in the history
  2. coverage: Explicitly simplify coverage expressions in codegen

    After coverage instrumentation and MIR transformations, we can sometimes end up
    with coverage expressions that always have a value of zero. Any expression
    operand that refers to an always-zero expression can be replaced with a literal
    `Operand::Zero`, making the emitted coverage mapping data smaller and simpler.
    
    This simplification step is mostly redundant with the simplifications performed
    inline in `expressions_with_regions`, except that it does a slightly more
    thorough job in some cases (because it checks for always-zero expressions
    *after* other simplifications).
    
    However, adding this simplification step will then let us greatly simplify that
    code, without affecting the quality of the emitted coverage maps.
    Zalathar committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    527c629 View commit details
    Browse the repository at this point in the history
  3. coverage: Don't bother renumbering expressions on the Rust side

    The LLVM API that we use to encode coverage mappings already has its own code
    for removing unused coverage expressions and renumbering the rest.
    
    This lets us get rid of our own complex renumbering code, making it easier to
    change our coverage code in other ways.
    Zalathar committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    041a232 View commit details
    Browse the repository at this point in the history