Add split_var metacomment to assist UNOPTFLAT fixes, #2066.

This commit is contained in:
Wilson Snyder
2020-02-28 19:15:08 -05:00
parent c6b755a12e
commit 4878fe3a1f
22 changed files with 4058 additions and 22 deletions
+10
View File
@@ -305,6 +305,16 @@ private:
m_varp->attrSFormat(true);
VL_DO_DANGLING(nodep->unlinkFrBack()->deleteTree(), nodep);
}
else if (nodep->attrType() == AstAttrType::VAR_SPLIT_VAR) {
UASSERT_OBJ(m_varp, nodep, "Attribute not attached to variable");
if (!VN_IS(m_modp, Module)) {
m_varp->v3warn(SPLITVAR, m_varp->prettyNameQ() << " has split_var metacomment, "
"but will not be split because it is not declared in a module.");
} else {
m_varp->attrSplitVar(true);
}
VL_DO_DANGLING(nodep->unlinkFrBack()->deleteTree(), nodep);
}
else if (nodep->attrType() == AstAttrType::VAR_SC_BV) {
UASSERT_OBJ(m_varp, nodep, "Attribute not attached to variable");
m_varp->attrScBv(true);