mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
For performance, use unordered_set/map where possible. No functional change intended.
This commit is contained in:
+3
-2
@@ -240,7 +240,7 @@ class HierBlockUsageCollectVisitor final : public AstNVisitor {
|
||||
AstUser1InUse m_inuser1;
|
||||
|
||||
// STATE
|
||||
typedef std::set<const AstModule*> ModuleSet;
|
||||
typedef std::unordered_set<const AstModule*> ModuleSet;
|
||||
V3HierBlockPlan* const m_planp;
|
||||
AstModule* m_modp = nullptr; // The current module
|
||||
AstModule* m_hierBlockp = nullptr; // The nearest parent module that is a hierarchical block
|
||||
@@ -355,7 +355,8 @@ void V3HierBlockPlan::createPlan(AstNetlist* nodep) {
|
||||
}
|
||||
|
||||
V3HierBlockPlan::HierVector V3HierBlockPlan::hierBlocksSorted() const {
|
||||
typedef std::map<const V3HierBlock*, std::set<const V3HierBlock*>> ChildrenMap;
|
||||
typedef std::unordered_map<const V3HierBlock*, std::unordered_set<const V3HierBlock*>>
|
||||
ChildrenMap;
|
||||
ChildrenMap childrenOfHierBlock;
|
||||
|
||||
HierVector sorted;
|
||||
|
||||
Reference in New Issue
Block a user