Faster dedup instance graph (bp #1732) (#1778)
* Faster dedup instance graph (#1732) * dedup: add faster InstanceGraph implementation and use it in dedup The new implementation takes care not to hash the instance types contained in DefInstance nodes. This should make dedup considerably faster. * FastInstanceGraph: cache vertices for faster findInstancesInHierarchy * FastInstanceGraph: remove the parent name field since it isn't actually necessary * FastInstanceGraph -> InstanceKeyGraph * InstanceGraph: describe performance problems. * InstanceKeyGraph: turn moduleMap into a def instead of a val This will make changing implementation details much easier in the future. * InstanceKeyGraph: return childInstances as Seq instead of Map This ensures a deterministic iteration order and it can easily be turned into a Map for O(1) accesses. * InstanceKeyGraph: add tests for public methods * InstanceKeyGraph: group public methods together * InstanceKeyGraphSpec: fix wording of a comment Co-authored-by:mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit 1b9f4ddf ) # Conflicts: # src/main/scala/firrtl/transforms/Dedup.scala * Fix conflicts Co-authored-by:
Kevin Laeufer <kevin.laeufer@sifive.com> Co-authored-by:
Jack Koenig <koenig@sifive.com> Co-authored-by:
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent
841ea565
Please register or sign in to comment