mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 18:13:50 +02:00
Optimize Dfg algorithms with an open addressing hash table (#8307)
This patch introduces V3HashTable.h, which defines an open addressing, linear probing hash table. The table implement the public V3HashSet and V3HashMap templates, which are generic containers. The benefit of this over std::unordered_map and std::unordered_set is far better memory locality during lookup. (The STL containers use chaining and require a new heap allocation for every insertion, similarly probing involves pointer chasing on collisions). The new data structure is use in V3DfgCache, and V3DfgCse and yields a significant speed improvement of those passes on large designs.
This commit is contained in:
@@ -62,6 +62,7 @@
|
||||
#include "V3Gate.h"
|
||||
#include "V3Global.h"
|
||||
#include "V3Graph.h"
|
||||
#include "V3HashTable.h"
|
||||
#include "V3HierBlock.h"
|
||||
#include "V3Inline.h"
|
||||
#include "V3InlineCFuncs.h"
|
||||
@@ -741,6 +742,7 @@ static bool verilate(const string& argString) {
|
||||
V3PreShell::selfTest();
|
||||
V3Broken::selfTest();
|
||||
V3Control::selfTest();
|
||||
V3HashTableInternals::selfTest();
|
||||
V3ThreadPool::selfTest();
|
||||
UINFO(2, "selfTest done");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user