From 82cc1a319f6f929883e241f58ff17e0bd43543ff Mon Sep 17 00:00:00 2001 From: Yutetsu TAKATSUKASA Date: Thu, 2 Jul 2020 20:35:55 +0900 Subject: [PATCH] Internals: Simplify condition in V3Dead.cpp. No functional change intended. (#2454) --- src/V3Dead.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/V3Dead.cpp b/src/V3Dead.cpp index d43e011ee..9739e89da 100644 --- a/src/V3Dead.cpp +++ b/src/V3Dead.cpp @@ -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() {