Only display log message if did_something
authorEddie Hung <eddie@fpgeh.com>
Wed, 11 Sep 2019 19:29:26 +0000 (12:29 -0700)
committerEddie Hung <eddie@fpgeh.com>
Wed, 11 Sep 2019 19:29:26 +0000 (12:29 -0700)
passes/pmgen/peepopt_dffmux.pmg

index 4fc8e3b4c9b812df9819bbac549e7e2d9b12971c..da3a66577b7f277a1aa446b03bd6e8dc1a703d65 100644 (file)
@@ -81,9 +81,9 @@ code
                        did_something = true;
                        mux->fixup_parameters();
                        dff->fixup_parameters();
+                       log("dffmux pattern in %s: dff=%s, mux=%s; removed %d constant bits.\n", log_id(module), log_id(dff), log_id(mux), count);
                }
 
-               log("dffmux pattern in %s: dff=%s, mux=%s; removed %d constant bits.\n", log_id(module), log_id(dff), log_id(mux), count);
                accept;
        }
 endcode