mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Internals: Create user1SetOnce(). No functional change.
This commit is contained in:
+11
-11
@@ -311,7 +311,7 @@ private:
|
||||
|
||||
// VISITORS
|
||||
virtual void visit(AstExtend* nodep, AstNUser*) {
|
||||
if (nodep->user1Inc()) return; // Process once
|
||||
if (nodep->user1SetOnce()) return; // Process once
|
||||
nodep->iterateChildren(*this);
|
||||
if (nodep->isWide()) {
|
||||
// See under ASSIGN(EXTEND)
|
||||
@@ -350,7 +350,7 @@ private:
|
||||
}
|
||||
|
||||
virtual void visit(AstSel* nodep, AstNUser*) {
|
||||
if (nodep->user1Inc()) return; // Process once
|
||||
if (nodep->user1SetOnce()) return; // Process once
|
||||
nodep->iterateChildren(*this);
|
||||
// Remember, Sel's may have non-integer rhs, so need to optimize for that!
|
||||
if (nodep->widthMin()!=(int)nodep->widthConst()) nodep->v3fatalSrc("Width mismatch");
|
||||
@@ -647,7 +647,7 @@ private:
|
||||
}
|
||||
|
||||
virtual void visit(AstConcat* nodep, AstNUser*) {
|
||||
if (nodep->user1Inc()) return; // Process once
|
||||
if (nodep->user1SetOnce()) return; // Process once
|
||||
nodep->iterateChildren(*this);
|
||||
if (nodep->isWide()) {
|
||||
// See under ASSIGN(WIDE)
|
||||
@@ -687,7 +687,7 @@ private:
|
||||
}
|
||||
|
||||
virtual void visit(AstReplicate* nodep, AstNUser*) {
|
||||
if (nodep->user1Inc()) return; // Process once
|
||||
if (nodep->user1SetOnce()) return; // Process once
|
||||
nodep->iterateChildren(*this);
|
||||
if (nodep->isWide()) {
|
||||
// See under ASSIGN(WIDE)
|
||||
@@ -748,7 +748,7 @@ private:
|
||||
}
|
||||
|
||||
virtual void visit(AstChangeXor* nodep, AstNUser*) {
|
||||
if (nodep->user1Inc()) return; // Process once
|
||||
if (nodep->user1SetOnce()) return; // Process once
|
||||
nodep->iterateChildren(*this);
|
||||
UINFO(8," Wordize ChangeXor "<<nodep<<endl);
|
||||
// -> (0=={or{for each_word{WORDSEL(lhs,#)^WORDSEL(rhs,#)}}}
|
||||
@@ -763,7 +763,7 @@ private:
|
||||
}
|
||||
|
||||
void visitEqNeq(AstNodeBiop* nodep) {
|
||||
if (nodep->user1Inc()) return; // Process once
|
||||
if (nodep->user1SetOnce()) return; // Process once
|
||||
nodep->iterateChildren(*this);
|
||||
if (nodep->lhsp()->isWide()) {
|
||||
UINFO(8," Wordize EQ/NEQ "<<nodep<<endl);
|
||||
@@ -789,7 +789,7 @@ private:
|
||||
virtual void visit(AstNeq* nodep, AstNUser*) { visitEqNeq (nodep); }
|
||||
|
||||
virtual void visit(AstRedOr* nodep, AstNUser*) {
|
||||
if (nodep->user1Inc()) return; // Process once
|
||||
if (nodep->user1SetOnce()) return; // Process once
|
||||
nodep->iterateChildren(*this);
|
||||
if (nodep->lhsp()->isWide()) {
|
||||
UINFO(8," Wordize REDOR "<<nodep<<endl);
|
||||
@@ -813,7 +813,7 @@ private:
|
||||
}
|
||||
}
|
||||
virtual void visit(AstRedAnd* nodep, AstNUser*) {
|
||||
if (nodep->user1Inc()) return; // Process once
|
||||
if (nodep->user1SetOnce()) return; // Process once
|
||||
nodep->iterateChildren(*this);
|
||||
if (nodep->lhsp()->isWide()) {
|
||||
UINFO(8," Wordize REDAND "<<nodep<<endl);
|
||||
@@ -842,7 +842,7 @@ private:
|
||||
}
|
||||
}
|
||||
virtual void visit(AstRedXor* nodep, AstNUser*) {
|
||||
if (nodep->user1Inc()) return; // Process once
|
||||
if (nodep->user1SetOnce()) return; // Process once
|
||||
nodep->iterateChildren(*this);
|
||||
if (nodep->lhsp()->isWide()) {
|
||||
UINFO(8," Wordize REDXOR "<<nodep<<endl);
|
||||
@@ -861,13 +861,13 @@ private:
|
||||
}
|
||||
|
||||
virtual void visit(AstNodeStmt* nodep, AstNUser*) {
|
||||
if (nodep->user1Inc()) return; // Process once
|
||||
if (nodep->user1SetOnce()) return; // Process once
|
||||
m_stmtp = nodep;
|
||||
nodep->iterateChildren(*this);
|
||||
m_stmtp = NULL;
|
||||
}
|
||||
virtual void visit(AstNodeAssign* nodep, AstNUser*) {
|
||||
if (nodep->user1Inc()) return; // Process once
|
||||
if (nodep->user1SetOnce()) return; // Process once
|
||||
m_stmtp = nodep;
|
||||
nodep->iterateChildren(*this);
|
||||
bool did = false;
|
||||
|
||||
Reference in New Issue
Block a user