WIP - Changes to try to fix and reland cover unreachable statements #85210
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WIP attempt to add coverage
0of dead blocks...by saving dead counters/expressions.
Unfortunately, I'm still getting the same result, when trying to get
coverage from Fuchsia apps (at least those using fuchsia_async, but that
may not be the specific cause):
When running
llvm-covto get the coverage report, I get the well knownand still useless message:
I can change CoverageMappingReader.cpp to avoid failing and I will see
some coverage results (maybe most of the coverage results) but there is
missing coverage as well. I don't know why the function name is not
found.
The "hack" is, change this:
to this:
I did learn that the original implementation (replacing counters and
expressions with Zero/unreachable counters), so this PR addresses that
issue. I hoped that it would fix the problem, but it didn't.
Specifically regarding the LLVM coverage adjustment (improvement?) made
in this version, compared to the reverted PR (#84797):
LLVM requires all counters with code regions be added to the coverage
map. The original dead block fix replaced the counters and expressions
with a Zero (unreachable) code region. This commit saves the original
counter or expression, without adding a statement to increment the
counter for the eliminated dead block.
r? @tmandry