mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Delete AstNode user5 (#4638)
This saves about 5% memory. V3AstUserAllocator is appropriate for most use cases, performance is marginally up as we are mostly D-cache bound on large designs.
This commit is contained in:
+10
-11
@@ -159,11 +159,10 @@ class CodeMotionAnalysisVisitor final : public VNVisitorConst {
|
||||
// NODE STATE
|
||||
// AstNodeStmt::user3 -> StmtProperties (accessed via m_stmtProperties, managed externally,
|
||||
// see MergeCondVisitor::process)
|
||||
// AstNodeExpr::user3 -> AstNodeStmt*: Set on a condition node, points to the last
|
||||
// conditional with that condition so far encountered in the same
|
||||
// AstNode list
|
||||
// AstNode::user4 -> Used by V3Hasher
|
||||
// AstNode::user5 -> AstNode*: Set on a condition node, points to the last conditional
|
||||
// with that condition so far encountered in the same AstNode list
|
||||
|
||||
VNUser5InUse m_user5InUse;
|
||||
|
||||
StmtPropertiesAllocator& m_stmtProperties;
|
||||
|
||||
@@ -212,14 +211,14 @@ class CodeMotionAnalysisVisitor final : public VNVisitorConst {
|
||||
// First time seeing this condition in the current list
|
||||
dupFinder.insert(condp);
|
||||
// Remember last statement with this condition (which is this statement)
|
||||
condp->user5p(nodep);
|
||||
condp->user3p(nodep);
|
||||
} else {
|
||||
// Seen a conditional with the same condition earlier in the current list
|
||||
AstNode* const firstp = dit->second;
|
||||
AstNodeExpr* const firstp = VN_AS(dit->second, NodeExpr);
|
||||
// Add to properties for easy retrieval during optimization
|
||||
m_propsp->m_prevWithSameCondp = static_cast<AstNodeStmt*>(firstp->user5p());
|
||||
m_propsp->m_prevWithSameCondp = static_cast<AstNodeStmt*>(firstp->user3p());
|
||||
// Remember last statement with this condition (which is this statement)
|
||||
firstp->user5p(nodep);
|
||||
firstp->user3p(nodep);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -430,13 +429,13 @@ private:
|
||||
// NODE STATE
|
||||
// AstVar::user1 -> bool: Set for variables referenced by m_mgCondp
|
||||
// (Only below MergeCondVisitor::process).
|
||||
// AstNode::user2 -> bool: Marking node as included in merge because cheap to
|
||||
// duplicate
|
||||
// AstNode::user2 -> bool: Marking node as included in merge because cheap to duplicate
|
||||
// (Only below MergeCondVisitor::process).
|
||||
// AstNodeStmt::user3 -> StmtProperties
|
||||
// (Only below MergeCondVisitor::process).
|
||||
// AstNodeExpr::user3 -> See CodeMotionAnalysisVisitor
|
||||
// (Only below MergeCondVisitor::process).
|
||||
// AstNode::user4 -> See CodeMotionAnalysisVisitor/CodeMotionOptimizeVisitor
|
||||
// AstNode::user5 -> See CodeMotionAnalysisVisitor
|
||||
|
||||
// STATE
|
||||
VDouble0 m_statMerges; // Statistic tracking
|
||||
|
||||
Reference in New Issue
Block a user