diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-08-02 15:12:16 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-08-02 15:12:16 +0200 |
commit | 8fd1c269ac7322f21408c1f99e7e4c275789c056 (patch) | |
tree | f88ac88da6aa719bc3460193e4b0bdb7dc053746 | |
parent | 60f3dc99237afc051560d18f38625337dc80ac80 (diff) | |
download | yosys-8fd1c269ac7322f21408c1f99e7e4c275789c056.tar.gz yosys-8fd1c269ac7322f21408c1f99e7e4c275789c056.tar.bz2 yosys-8fd1c269ac7322f21408c1f99e7e4c275789c056.zip |
Fixed a performance bug in opt_reduce
-rw-r--r-- | passes/opt/opt_reduce.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/passes/opt/opt_reduce.cc b/passes/opt/opt_reduce.cc index f947e9724..5f3c4d29e 100644 --- a/passes/opt/opt_reduce.cc +++ b/passes/opt/opt_reduce.cc @@ -368,8 +368,12 @@ struct OptReducePass : public Pass { for (auto &mod_it : design->modules_) { if (!design->selected(mod_it.second)) continue; - OptReduceWorker worker(design, mod_it.second, do_fine); - total_count += worker.total_count; + do { + OptReduceWorker worker(design, mod_it.second, do_fine); + total_count += worker.total_count; + if (worker.total_count == 0) + break; + } while (1); } log("Performed a total of %d changes.\n", total_count); |