Skip to content

Commit

Permalink
Rollup merge of #73011 - richkadel:llvm-count-from-mir-pass, r=tmandry
Browse files Browse the repository at this point in the history
first stage of implementing LLVM code coverage

This PR replaces #70680 (WIP toward LLVM Code Coverage for Rust) since I am re-implementing the Rust LLVM code coverage feature in a different part of the compiler (in MIR pass(es) vs AST).

This PR updates rustc with `-Zinstrument-coverage` option that injects the llvm intrinsic `instrprof.increment()` for code generation.

This initial version only injects counters at the top of each function, and does not yet implement the required coverage map.

Upcoming PRs will add the coverage map, and add more counters and/or counter expressions for each conditional code branch.

Rust compiler MCP rust-lang/compiler-team#278
Relevant issue: #34701 - Implement support for LLVMs code coverage instrumentation

***[I put together some development notes here, under a separate branch.](https://github.com/richkadel/rust/blob/cfa0b21d34ee64e4ebee226101bd2ef0c6757865/src/test/codegen/coverage-experiments/README-THIS-IS-TEMPORARY.md)***
  • Loading branch information
RalfJung authored Jun 19, 2020
2 parents 2dee5f1 + 9513f33 commit ac9f6d0
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit ac9f6d0

Please sign in to comment.