From: Clifford Wolf Date: Sat, 25 Jul 2015 10:01:25 +0000 (+0200) Subject: Some cleanups in opt_rmdff X-Git-Tag: yosys-0.6~220 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2a613b1b662956e681cab4259ff495c33b39a393;p=yosys.git Some cleanups in opt_rmdff --- diff --git a/passes/opt/opt_rmdff.cc b/passes/opt/opt_rmdff.cc index 24c2d3fa3..2ecbb31a8 100644 --- a/passes/opt/opt_rmdff.cc +++ b/passes/opt/opt_rmdff.cc @@ -130,38 +130,31 @@ bool handle_dff(RTLIL::Module *mod, RTLIL::Cell *dff) if (sig_c.is_fully_const() && (!sig_r.size() || !has_init || val_init == val_rv)) { if (val_rv.bits.size() == 0) val_rv = val_init; - RTLIL::SigSig conn(sig_q, val_rv); - mod->connect(conn); + mod->connect(sig_q, val_rv); goto delete_dff; } if (sig_d.is_fully_undef() && sig_r.size() && (!has_init || val_init == val_rv)) { - RTLIL::SigSig conn(sig_q, val_rv); - mod->connect(conn); + mod->connect(sig_q, val_rv); goto delete_dff; } if (sig_d.is_fully_undef() && !sig_r.size() && has_init) { - RTLIL::SigSig conn(sig_q, val_init); - mod->connect(conn); + mod->connect(sig_q, val_init); goto delete_dff; } if (sig_d.is_fully_const() && (!sig_r.size() || val_rv == sig_d.as_const()) && (!has_init || val_init == sig_d.as_const())) { - RTLIL::SigSig conn(sig_q, sig_d); - mod->connect(conn); + log_dump(sig_q, sig_d); + mod->connect(sig_q, sig_d); goto delete_dff; } if (sig_d == sig_q && (!sig_r.size() || !has_init || val_init == val_rv)) { - if (sig_r.size()) { - RTLIL::SigSig conn(sig_q, val_rv); - mod->connect(conn); - } - if (has_init) { - RTLIL::SigSig conn(sig_q, val_init); - mod->connect(conn); - } + if (sig_r.size()) + mod->connect(sig_q, val_rv); + if (has_init) + mod->connect(sig_q, val_init); goto delete_dff; }