diff --git a/passes/opt/opt_expr.cc b/passes/opt/opt_expr.cc index fad01ef10..d9da82d4e 100644 --- a/passes/opt/opt_expr.cc +++ b/passes/opt/opt_expr.cc @@ -491,11 +491,11 @@ void replace_const_cells(RTLIL::Design *design, RTLIL::Module *module, bool cons } std::vector module_cells = module->cells(); - auto iterator = [&](auto&& replace_cell) { + auto visitor = [&](auto&& do_action) { if (sort_fails >= effort) { for (auto cell : module_cells) if (design->selected(module, cell) && yosys_celltypes.cell_evaluable(cell->type)) - replace_cell(cell); + do_action(cell); } else { TopoSort> cells; dict outbit_to_cell; @@ -529,11 +529,11 @@ void replace_const_cells(RTLIL::Design *design, RTLIL::Module *module, bool cons effort, log_id(module)); } for (auto cell : cells.sorted) { - replace_cell(cell); + do_action(cell); } } }; - iterator([&](auto& cell) + visitor([&](auto& cell) { #define ACTION_DO(_p_, _s_) do { cover("opt.opt_expr.action_" S__LINE__); replace_cell(assign_map, module, cell, input.as_string(), _p_, _s_); goto next_cell; } while (0) #define ACTION_DO_Y(_v_) ACTION_DO(ID::Y, RTLIL::SigSpec(RTLIL::State::S ## _v_))