Internals: Inline AstVar::isToggleCoverable()

Inline into the single call site, remove unnecessary isSc() and
isPrimaryIO() guards (these flags are set only in a later pass).

No functional change.
This commit is contained in:
Geza Lore
2026-06-14 16:41:13 +01:00
parent 9a0cd289e8
commit 77e6a21224
2 changed files with 6 additions and 9 deletions
+6 -3
View File
@@ -166,10 +166,13 @@ class CoverageVisitor final : public VNVisitor {
// METHODS
// Return non-nullptr reason if this variable shouldn't have toggle coverage
const char* varIgnoreToggle(const AstVar* nodep) {
// Return true if this shouldn't be traced
// See also similar rule in V3TraceDecl::varIgnoreTrace
if (!nodep->isToggleCoverable()) return "Not relevant signal type";
const bool cover = nodep->isIO() || (nodep->isSignal() && nodep->isBitLogic());
if (!cover) return "Not relevant signal";
if (nodep->isConst()) return "Signal is constant";
if (nodep->isDouble()) return "Signal is double";
if (nodep->isString()) return "Signal is string";
if (!v3Global.opt.coverageUnderscore()) {
const string prettyName = nodep->prettyName();
if (prettyName[0] == '_') return "Leading underscore";