Internals: Optimize updates of Vtogcov signals. No functional change intended. (#6110)

This commit is contained in:
Ryszard Rozak
2025-08-04 13:29:56 +01:00
committed by GitHub
parent 52ac3b3a0d
commit 7d2b6bd921
22 changed files with 448 additions and 158 deletions
+3 -1
View File
@@ -100,11 +100,13 @@ class ClockVisitor final : public VNVisitor {
// UINFOTREE(1, nodep, "", "ct");
// COVERTOGGLE(INC, ORIG, CHANGE) ->
// IF(ORIG ^ CHANGE) { INC; CHANGE = ORIG; }
AstNode* const incp = nodep->incp()->unlinkFrBack();
AstCoverInc* const incp = nodep->incp()->unlinkFrBack();
AstNodeExpr* const origp = nodep->origp()->unlinkFrBack();
AstNodeExpr* const changeWrp = nodep->changep()->unlinkFrBack();
AstNodeExpr* const changeRdp = ConvertWriteRefsToRead::main(changeWrp->cloneTree(false));
AstNodeExpr* comparedp = nullptr;
incp->toggleExprp(origp->cloneTree(false));
incp->toggleCovExprp(changeRdp->cloneTree(false));
// Xor will optimize better than Eq, when CoverToggle has bit selects,
// but can only use Xor with non-opaque types
if (const AstBasicDType* const bdtypep