From 3fee5f87ec598e5ac870c9d2cd606047106421bb Mon Sep 17 00:00:00 2001 From: Kevin Laeufer Date: Wed, 8 Jul 2020 16:18:06 -0700 Subject: dedup: use structural sha256 hash instead of agnostify and serialize (#1731) * benchmark: add hot.DedupBenchmark * dedup: use structural md5 hash instead of agnostify and serialize * StructuralHash: generate PrimOp LUT * StructuralHash: change MessageDigestHasher to not be a case class * StructuralHash: we want Blocks and EmptyStmt to be ignored * StructuralHash: use SHA-256 instead of MD5 * StructuralHash: clarify extmodule port name agnistification * StructuralHash: hash the name of width vars instead of trying to agnostify This should be in line with the old Dedup behavior. The prior use of n(..) was incorrect since the namespace of these vars is different from the normal module scope namespace. * StructuralHash: address Schuyler's review comments Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>--- .../src/main/scala/firrtl/benchmark/hot/TransformBenchmark.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'benchmark') diff --git a/benchmark/src/main/scala/firrtl/benchmark/hot/TransformBenchmark.scala b/benchmark/src/main/scala/firrtl/benchmark/hot/TransformBenchmark.scala index 05b759c6..abbee5a9 100644 --- a/benchmark/src/main/scala/firrtl/benchmark/hot/TransformBenchmark.scala +++ b/benchmark/src/main/scala/firrtl/benchmark/hot/TransformBenchmark.scala @@ -7,8 +7,8 @@ package hot import firrtl._ import firrtl.passes.LowerTypes import firrtl.stage.TransformManager - import firrtl.benchmark.util._ +import firrtl.transforms.DedupModules abstract class TransformBenchmark(factory: () => Transform) extends App { val inputFile = args(0) @@ -25,3 +25,5 @@ abstract class TransformBenchmark(factory: () => Transform) extends App { } object LowerTypesBenchmark extends TransformBenchmark(() => LowerTypes) + +object DedupBenchmark extends TransformBenchmark(() => new DedupModules()) \ No newline at end of file -- cgit v1.2.3