3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-06 06:03:23 +00:00

Using design->selected_modules() in opt_*

This commit is contained in:
Clifford Wolf 2015-02-03 23:45:01 +01:00
parent 5b41470e15
commit a8f4a099b5
5 changed files with 20 additions and 36 deletions

View file

@ -371,16 +371,13 @@ struct OptReducePass : public Pass {
extra_args(args, argidx, design);
int total_count = 0;
for (auto &mod_it : design->modules_) {
if (!design->selected(mod_it.second))
continue;
do {
OptReduceWorker worker(design, mod_it.second, do_fine);
for (auto module : design->selected_modules())
while (1) {
OptReduceWorker worker(design, module, do_fine);
total_count += worker.total_count;
if (worker.total_count == 0)
break;
} while (1);
}
}
if (total_count)
design->scratchpad_set_bool("opt.did_something", true);