Fixed a performance bug in opt_reduce

This commit is contained in:
Clifford Wolf 2014-08-02 15:12:16 +02:00
parent 60f3dc9923
commit 8fd1c269ac
1 changed files with 6 additions and 2 deletions

View File

@ -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);