From cb8b0d3597e7c6313a3ac4e47dcf9976f6a91508 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Tue, 22 Sep 2009 18:58:59 -0400 Subject: [PATCH] No need for V3Signed to recurse into generate if. --- src/V3Signed.cpp | 7 +++++++ src/V3Width.cpp | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/V3Signed.cpp b/src/V3Signed.cpp index fae3a31ef..221fe9efd 100644 --- a/src/V3Signed.cpp +++ b/src/V3Signed.cpp @@ -161,6 +161,13 @@ private: // so, it's just nodep->iterateChildren(*this); } + virtual void visit(AstNodeIf* nodep, AstNUser*) { + if (!nodep->castGenIf()) { // for m_paramsOnly + nodep->ifsp()->iterateAndNext(*this); + nodep->elsesp()->iterateAndNext(*this); + } + nodep->condp()->iterateAndNext(*this); + } virtual void visit(AstPin* nodep, AstNUser*) { // Same as above taskref argument. nodep->iterateChildren(*this); diff --git a/src/V3Width.cpp b/src/V3Width.cpp index e8dd9fcd1..574f85949 100644 --- a/src/V3Width.cpp +++ b/src/V3Width.cpp @@ -577,7 +577,7 @@ private: virtual void visit(AstNodeIf* nodep, AstNUser*) { // TOP LEVEL NODE //if (debug()) nodep->dumpTree(cout," IfPre: "); - if (!nodep->castGenIf()) { + if (!nodep->castGenIf()) { // for m_paramsOnly nodep->ifsp()->iterateAndNext(*this); nodep->elsesp()->iterateAndNext(*this); }