Commit Graph

4 Commits

Author SHA1 Message Date
Rich Kadel
0b0d293c7c Report coverage 0 of dead blocks
Fixes: #84018

With `-Z instrument-coverage`, coverage reporting of dead blocks
(for example, blocks dropped because a conditional branch is dropped,
based on const evaluation) is now supported.

If `instrument-coverage` is enabled, `simplify::remove_dead_blocks()`
finds all dropped coverage `Statement`s and adds their `code_region`s as
`Unreachable` coverage `Statement`s to the `START_BLOCK`, so they are
still included in the coverage map.

Check out the resulting changes in the test coverage reports in this PR.
2021-05-01 15:04:48 -07:00
Santiago Pastorino
f3b8920d4b Bump all mir_opt_level 3 to 4 2021-03-05 17:13:56 -03:00
Santiago Pastorino
8152da22a1 Extract mir_opt_level to a method and use Option to be able to know if the value is provided or not 2021-03-05 17:13:56 -03:00
Simon Vandel Sillesen
a6dccfeb23 New mir-opt pass to simplify gotos with const values
Fixes #77355
2021-02-22 21:03:57 +01:00