opt_merge: Dedup one more use of FF cell type list.
authorMarcelina Kościelnicka <mwk@0x04.net>
Wed, 15 Jul 2020 00:30:25 +0000 (02:30 +0200)
committerMarcelina Kościelnicka <mwk@0x04.net>
Wed, 15 Jul 2020 04:19:18 +0000 (06:19 +0200)
passes/opt/opt_merge.cc

index f03faa9cf360b787169d8e53590c6bfb83dfbb03..9086943dcb4878f110664426295f702e15125523 100644 (file)
@@ -173,9 +173,7 @@ struct OptMergeWorker
 
                for (const auto &it : cell1->connections_) {
                        if (cell1->output(it.first)) {
-                               if (it.first == ID::Q && (cell1->type.begins_with("$dff") || cell1->type.begins_with("$dlatch") ||
-                                               cell1->type.begins_with("$_DFF") || cell1->type.begins_with("$_DLATCH") || cell1->type.begins_with("$_SR_") ||
-                                               cell1->type.in(ID($adff), ID($sr), ID($ff), ID($_FF_)))) {
+                               if (it.first == ID::Q && RTLIL::builtin_ff_cell_types().count(cell1->type)) {
                                        // For the 'Q' output of state elements,
                                        //   use the (* init *) attribute value
                                        auto &sig1 = conn1[it.first];