Implement a distinct constant pool (#3013)

What previously used to be per module static constants created in
V3Table and V3Prelim are now merged globally within the whole model and
emitted as part of a separate constant pool. Members of the constant
pool are global variables which are declared lazily when used (similar to
loose methods).
This commit is contained in:
Geza Lore
2021-06-13 15:05:55 +01:00
committed by GitHub
parent 60d5f0e86b
commit c207e98306
50 changed files with 1331 additions and 344 deletions
+1
View File
@@ -278,6 +278,7 @@ class EmitCSyms final : EmitCBaseVisitor {
if (!m_dpiHdrOnly) emitDpiImp();
}
}
virtual void visit(AstConstPool* nodep) override {} // Ignore
virtual void visit(AstNodeModule* nodep) override {
nameCheck(nodep);
VL_RESTORER(m_modp);