Unverified Commit f3036cee authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub
Browse files

Faster dedup instance graph (bp #1732) (#1777)



* 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: default avatarmergify[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: default avatarKevin Laeufer <kevin.laeufer@sifive.com>
Co-authored-by: default avatarJack Koenig <koenig@sifive.com>
Co-authored-by: default avatarmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent ec4ebc7a
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment