summary refs log tree commit diff
path: root/src/test/mir-opt/instrument_coverage.main.InstrumentCoverage.diff
AgeCommit message (Collapse)AuthorLines
2020-09-03Tools, tests, and experimenting with MIR-derived coverage countersRich Kadel-1/+1
Adds a new mir_dump output file in HTML/CSS to visualize code regions and the MIR features that they came from (including overlapping spans). See example below: Includes a basic, MIR-block-based implementation of coverage injection, available via `-Zexperimental-coverage`. This implementation has known flaws and omissions, but is simple enough to validate the new tools and tests. The existing `-Zinstrument-coverage` option currently enables function-level coverage only, which at least appears to generate accurate coverage reports at that level. Experimental coverage is not accurate at this time. When branch coverage works as intended, the `-Zexperimental-coverage` option should be removed. This PR replaces the bulk of PR #75828, with the remaining parts of that PR distributed among other separate and indentpent PRs. This PR depends on three of those other PRs: #76000, #76002, and Rust compiler MCP rust-lang/compiler-team#278 Relevant issue: #34701 - Implement support for LLVMs code coverage instrumentation ![Screen-Recording-2020-08-21-at-2](https://user-images.githubusercontent.com/3827298/90972923-ff417880-e4d1-11ea-92bb-8713c6198f6d.gif)
2020-08-21Suppress "const" prefix of FnDef in MIR dumpLzu Tao-1/+1
2020-08-20Suppress MIR comments of Unit typeLzu Tao-12/+0
2020-08-20Suppress MIR comments for FnDef in ty::ConstLzu Tao-3/+0
2020-08-18Moved coverage counter injection from BasicBlock to Statement.Rich Kadel-21/+2
2020-08-17Update MIR tests with comment verbosity fixAustin Lasher-36/+0
2020-08-04Completes support for coverage in external cratesRich Kadel-36/+54
The prior PR corrected for errors encountered when trying to generate the coverage map on source code inlined from external crates (including macros and generics) by avoiding adding external DefIds to the coverage map. This made it possible to generate a coverage report including external crates, but the external crate coverage was incomplete (did not include coverage for the DefIds that were eliminated. The root issue was that the coverage map was converting Span locations to source file and locations, using the SourceMap for the current crate, and this would not work for spans from external crates (compliled with a different SourceMap). The solution was to convert the Spans to filename and location during MIR generation instead, so precompiled external crates would already have the correct source code locations embedded in their MIR, when imported into another crate.
2020-07-29Move mir-opt tests to toplevelXavier Denis-0/+100