mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 18:13:50 +02:00
Optimize functions reading external parameters as pure (#6684)
This commit is contained in:
+3
-2
@@ -271,8 +271,9 @@ private:
|
||||
}
|
||||
void visit(AstVarRef* nodep) override {
|
||||
iterateChildren(nodep);
|
||||
if (nodep->varp()->user4u().toGraphVertex() != m_curVxp) {
|
||||
if (m_curVxp->pure() && !nodep->varp()->isXTemp()) m_curVxp->impure(nodep);
|
||||
AstVar* const varp = nodep->varp();
|
||||
if (varp->user4u().toGraphVertex() != m_curVxp) {
|
||||
if (m_curVxp->pure() && !varp->isXTemp() && !varp->isParam()) m_curVxp->impure(nodep);
|
||||
}
|
||||
}
|
||||
void visit(AstClass* nodep) override {
|
||||
|
||||
Reference in New Issue
Block a user