mirror of
https://github.com/verilator/verilator.git
synced 2025-01-06 06:37:45 +00:00
Add candidate item count to MergeCond stats
This commit is contained in:
parent
04512e5d04
commit
1481d34959
@ -439,6 +439,7 @@ class MergeCondVisitor final : public VNVisitor {
|
|||||||
// STATE
|
// STATE
|
||||||
VDouble0 m_statMerges; // Statistic tracking
|
VDouble0 m_statMerges; // Statistic tracking
|
||||||
VDouble0 m_statMergedItems; // Statistic tracking
|
VDouble0 m_statMergedItems; // Statistic tracking
|
||||||
|
VDouble0 m_statCandidateItems; // Statistic tracking
|
||||||
VDouble0 m_statLongestList; // Statistic tracking
|
VDouble0 m_statLongestList; // Statistic tracking
|
||||||
|
|
||||||
AstNode* m_mgFirstp = nullptr; // First node in merged sequence
|
AstNode* m_mgFirstp = nullptr; // First node in merged sequence
|
||||||
@ -784,6 +785,8 @@ class MergeCondVisitor final : public VNVisitor {
|
|||||||
m_mgNextp = nodep->nextp();
|
m_mgNextp = nodep->nextp();
|
||||||
// If last under parent, done with current list
|
// If last under parent, done with current list
|
||||||
if (!m_mgNextp) mergeEnd();
|
if (!m_mgNextp) mergeEnd();
|
||||||
|
// Statistics
|
||||||
|
++m_statCandidateItems;
|
||||||
// We did add to the list
|
// We did add to the list
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -871,6 +874,7 @@ public:
|
|||||||
explicit MergeCondVisitor(AstNetlist* nodep) { iterate(nodep); }
|
explicit MergeCondVisitor(AstNetlist* nodep) { iterate(nodep); }
|
||||||
~MergeCondVisitor() override {
|
~MergeCondVisitor() override {
|
||||||
V3Stats::addStat("Optimizations, MergeCond merges", m_statMerges);
|
V3Stats::addStat("Optimizations, MergeCond merges", m_statMerges);
|
||||||
|
V3Stats::addStat("Optimizations, MergeCond candidate items", m_statCandidateItems);
|
||||||
V3Stats::addStat("Optimizations, MergeCond merged items", m_statMergedItems);
|
V3Stats::addStat("Optimizations, MergeCond merged items", m_statMergedItems);
|
||||||
V3Stats::addStat("Optimizations, MergeCond longest merge", m_statLongestList);
|
V3Stats::addStat("Optimizations, MergeCond longest merge", m_statLongestList);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user