From 091995a5ff536a719893e7bdd2c910949bc30f71 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Fri, 8 Mar 2024 17:22:59 +0100 Subject: [PATCH] Limit effort spent on analyzing failed matches in LVS compare --- src/db/db/dbNetlistCompareCore.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/db/db/dbNetlistCompareCore.cc b/src/db/db/dbNetlistCompareCore.cc index 9e8abaef5..49558ad4d 100644 --- a/src/db/db/dbNetlistCompareCore.cc +++ b/src/db/db/dbNetlistCompareCore.cc @@ -1355,7 +1355,7 @@ static size_t distance3 (const NetGraphNode &a, const NetGraphNode &b1, const Ne static void analyze_nodes_for_close_matches (const std::multimap &nodes_by_edges1, const std::multimap &nodes_by_edges2, bool layout2ref, db::NetlistCompareLogger *logger, const db::NetGraph &g2) { - size_t max_search = 100; + size_t max_search = 100000; double max_fuzz_factor = 0.25; size_t max_fuzz_count = 3; size_t max_edges_split = 3; // by how many edges joining will reduce the edge count at max @@ -1368,7 +1368,9 @@ analyze_nodes_for_close_matches (const std::multimap 0; ++i) { if (i->first < min_edges) { continue; @@ -1376,7 +1378,7 @@ analyze_nodes_for_close_matches (const std::multimap seen; - for (auto j = nodes_by_edges2.begin (); j != nodes_by_edges2.end (); ++j) { + for (auto j = nodes_by_edges2.begin (); j != nodes_by_edges2.end () && tries > 0; ++j) { seen.insert (j->second); @@ -1407,7 +1409,6 @@ analyze_nodes_for_close_matches (const std::multimapfirst + k->first < i->first + max_fuzz_count + max_edges_split && tries > 0; ++k) { if (seen.find (k->second) != seen.end ()) { @@ -1436,6 +1437,8 @@ analyze_nodes_for_close_matches (const std::multimap= 21, "Analyzing failed matches"); + // Determine the range of nodes with same identity std::vector no_edges;