From: Clifford Wolf Date: Sat, 2 Aug 2014 13:12:16 +0000 (+0200) Subject: Fixed a performance bug in opt_reduce X-Git-Tag: yosys-0.4~328 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8fd1c269ac7322f21408c1f99e7e4c275789c056;p=yosys.git Fixed a performance bug in opt_reduce --- 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);