Skip to content

InstrumentCoverage requires information from HIR that might need to be available via MIR #79625

Open
@richkadel

Description

@richkadel

Coverage requires the spans for the FnSig and hir::Body.

It also uses the hir::Body to compute a function hash, required by LLVM intrinsic instrprof.coverage.

According to this code review comment:

#79109 (comment)

MIR strives to be a self-contained IR which means that operations on it should only use the information in MIR

Consider improving MIR to provide the information needed, to avoid going back to HIR for it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-HIRArea: The high-level intermediate representation (HIR)A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlA-code-coverageArea: Source-based code coverage (-Cinstrument-coverage)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions