]> Nick Gasson's Git Repositories - nvc.git/commit
Cover items to counters (#918)
authorBlebowski <34539154+Blebowski@users.noreply.github.com>
Thu, 18 Jul 2024 17:31:45 +0000 (13:31 -0400)
committerGitHub <noreply@github.com>
Thu, 18 Jul 2024 17:31:45 +0000 (18:31 +0100)
commit6c14c2f1091703e94f90df12b695e4a4a54f27e1
tree203cc4fbc1ca785fc4b81fbb63746bf8b496ff58
parent457a93782a874797b62ff6aa42f098119ef74742
Cover items to counters (#918)

* src: Move toggle coverage emit (recursive array traversal) to "cov-data" from lower.

* src: Linearize control flow in cover_add_toggle_items_for.

* src, test: Convert toggle coverage to separate cover_item for 0->1 and 1->0.

* src: Set "num" by default to 1 -> Becomes valid for statements. Simplify cover chain append logic for COV_ITEM_STMT.

* src: Move "num" setting for COV_ITEM_TOGGLE to better place.

* WIP: Branch coverage - Conversion to counters.

* src: Convert branch items fully to single item per covered item in reports too.

* src: Move bin name append for toggle items to cover_add_item.

* src: Move FSM state coverage logic to "cover" and make it counter, not flag.

* src: Fix typo in Button that gives you coverage exclude command.

* src: Move "num" setting for COV_ITEM_TOGGLE to better place.

* WIP: Branch coverage - Conversion to counters.

* src: Convert branch items fully to single item per covered item in reports too.

* src: Move bin name append for toggle items to cover_add_item.

* src: Port fixes from #909 and #906 to coverage refactoring.

* src, test: Rework expression coverage conversion to counters.

* src: Unify reporting of COV_ITEM_FUNCTIONAL to use new conversion to cover_chain_t.

* src: Remove Exclude mask from cov_item_t, now handled by single flag.

* src: Fix build on MACOS.

* src, test: Fix leak in the branch coverage.

* src: Rename "num" to "consecutive" to better correspond to its meaning.

* src, test: Get rid of the BIN in the exclude file completely.

* src, test: Clarify that simultaneous covered + excluded will result in covered.

* src: Unify "cover_add_*" API towards lower.

* src, test: Merge VCODE_OP_COVER_STMT, VCODE_OP_COVER_BRANCH and VCODE_OP_COVER_EXPRESSION.

* src, test: Rename "STATE" to "BIN_STATE" to have the same naming as rest of bins.

* NEWS, www: Update documentation and changes.

* Apply comments from review.

* Revert "src, test: Merge VCODE_OP_COVER_STMT, VCODE_OP_COVER_BRANCH and VCODE_OP_COVER_EXPRESSION."

This reverts commit 9daa3dc0fd1d3ba1e3e63e1e9b4d0b0c020b90ac.

* src: Remove unused variable.
25 files changed:
NEWS.md
nvc.1
src/cov/cov-api.h
src/cov/cov-data.c
src/cov/cov-data.h
src/cov/cov-exclude.c
src/cov/cov-report.c
src/jit/jit-irgen.c
src/lower.c
src/psl/psl-lower.c
src/rt/cover.c
src/vcode.c
src/vcode.h
test/regress/cover11.sh [changed mode: 0644->0755]
test/regress/data/cover10_ef1.txt
test/regress/data/cover14_ef1.txt
test/regress/data/cover18_ef.txt
test/regress/data/cover9_ef1.txt
test/regress/data/cover9_ef3.txt
test/regress/data/cover9_ef4.txt [deleted file]
test/regress/gold/cover10.txt
test/regress/gold/cover14.txt
test/regress/gold/cover18.txt
test/regress/gold/cover9.txt
test/test_lower.c