Internals: Use and enforce class final for ~5% performance boost.

This commit is contained in:
Wilson Snyder
2020-11-18 21:32:16 -05:00
parent c0888c1b0f
commit b6ded59c2b
224 changed files with 976 additions and 949 deletions
+3 -3
View File
@@ -36,7 +36,7 @@
//######################################################################
class CUseState {
class CUseState final {
private:
// MEMBERS
AstNodeModule* m_modInsertp; // Current module to insert AstCUse under
@@ -75,7 +75,7 @@ public:
// Visit within a module all nodes and data types they reference, finding
// any classes so we can make sure they are defined when Verilated code
// compiles
class CUseDTypeVisitor : public AstNVisitor {
class CUseDTypeVisitor final : public AstNVisitor {
// MEMBERS
CUseState& m_stater; // State for inserter
bool m_impOnly = false; // In details needed only for implementation
@@ -113,7 +113,7 @@ public:
VL_UNCOPYABLE(CUseDTypeVisitor);
};
class CUseVisitor : public AstNVisitor {
class CUseVisitor final : public AstNVisitor {
// MEMBERS
CUseState m_state; // Inserter state