From 03f0ab9de29aa3e396c1b1b3e62e6676de3946a3 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Fri, 3 Jan 2014 17:50:39 +0100 Subject: [PATCH] Cleanups in freduce command --- passes/sat/freduce.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/passes/sat/freduce.cc b/passes/sat/freduce.cc index 893fe5167..23ab8a04a 100644 --- a/passes/sat/freduce.cc +++ b/passes/sat/freduce.cc @@ -441,8 +441,6 @@ struct FreduceWorker int bits_count = 0; std::map, std::vector> buckets; - buckets[std::vector()].push_back(RTLIL::SigBit(RTLIL::State::S0)); - buckets[std::vector()].push_back(RTLIL::SigBit(RTLIL::State::S1)); for (auto &batch : batches) { for (auto &bit : batch) @@ -464,6 +462,11 @@ struct FreduceWorker } log(" Sorted %d signal bits into %d buckets.\n", bits_count, int(buckets.size())); + if (buckets.count(std::vector()) != 0) { + buckets[std::vector()].push_back(RTLIL::SigBit(RTLIL::State::S0)); + buckets[std::vector()].push_back(RTLIL::SigBit(RTLIL::State::S1)); + } + std::vector> equiv; for (auto &bucket : buckets) { -- 2.30.2