Internals: Simplify condition in V3Dead.cpp. No functional change intended. (#2454)

This commit is contained in:
Yutetsu TAKATSUKASA 2020-07-02 20:35:55 +09:00 committed by GitHub
parent 2fd23458ce
commit 82cc1a319f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -326,11 +326,11 @@ private:
}
}
bool mightElimVar(AstVar* nodep) {
return (!nodep->isSigPublic() // Can't elim publics!
&& !nodep->isIO() && !nodep->isClassMember()
&& ((nodep->isTemp() && !nodep->isTrace())
|| (nodep->isParam() && !nodep->isTrace() && !v3Global.opt.xmlOnly())
|| m_elimUserVars)); // Post-Trace can kill most anything
if (nodep->isSigPublic()) return false; // Can't elim publics!
if (nodep->isIO() || nodep->isClassMember()) return false;
if (nodep->isTemp() && !nodep->isTrace()) return true;
if (nodep->isParam() && !nodep->isTrace() && !v3Global.opt.xmlOnly()) return true;
return m_elimUserVars; // Post-Trace can kill most anything
}
void deadCheckScope() {