Reland - 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. Note, this PR relands an earlier, reverted PR that failed when compiling generators. The prior issues with generators has been resolved and a new test was added to prevent future regressions. Check out the resulting changes to test coverage of dead blocks in the test coverage reports in this PR.
This commit is contained in:
@@ -47,7 +47,7 @@ impl<'tcx> MirPass<'tcx> for ConstGoto {
|
||||
// if we applied optimizations, we potentially have some cfg to cleanup to
|
||||
// make it easier for further passes
|
||||
if should_simplify {
|
||||
simplify_cfg(body);
|
||||
simplify_cfg(tcx, body);
|
||||
simplify_locals(body, tcx);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user