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:
parent
5b41470e15
commit
a8f4a099b5
5 changed files with 20 additions and 36 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue