diff options
author | Clifford Wolf <clifford@clifford.at> | 2019-08-17 15:03:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-17 15:03:46 +0200 |
commit | ae5d8dc939678c85ba6dea78fdcfa133ddea0b92 (patch) | |
tree | f79bd5ce1c8549dcd73891de7746cd332ef94eb3 /passes/opt/opt.cc | |
parent | 8915f496d97a2e858cbadb265695dd1a54b80ac4 (diff) | |
parent | 3d3779b0376b8204ed7637053176a07b7271ac1d (diff) | |
download | yosys-ae5d8dc939678c85ba6dea78fdcfa133ddea0b92.tar.gz yosys-ae5d8dc939678c85ba6dea78fdcfa133ddea0b92.tar.bz2 yosys-ae5d8dc939678c85ba6dea78fdcfa133ddea0b92.zip |
Merge pull request #1303 from YosysHQ/bogdanvuk/opt_share
Implement opt_share from @bogdanvuk
Diffstat (limited to 'passes/opt/opt.cc')
-rw-r--r-- | passes/opt/opt.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/passes/opt/opt.cc b/passes/opt/opt.cc index e9a43e0f3..396819883 100644 --- a/passes/opt/opt.cc +++ b/passes/opt/opt.cc @@ -44,6 +44,7 @@ struct OptPass : public Pass { log(" opt_muxtree\n"); log(" opt_reduce [-fine] [-full]\n"); log(" opt_merge [-share_all]\n"); + log(" opt_share (-full only)\n"); log(" opt_rmdff [-keepdc] [-sat]\n"); log(" opt_clean [-purge]\n"); log(" opt_expr [-mux_undef] [-mux_bool] [-undriven] [-clkinv] [-fine] [-full] [-keepdc]\n"); @@ -70,6 +71,7 @@ struct OptPass : public Pass { std::string opt_reduce_args; std::string opt_merge_args; std::string opt_rmdff_args; + bool opt_share = false; bool fast_mode = false; log_header(design, "Executing OPT pass (performing simple optimizations).\n"); @@ -105,6 +107,7 @@ struct OptPass : public Pass { if (args[argidx] == "-full") { opt_expr_args += " -full"; opt_reduce_args += " -full"; + opt_share = true; continue; } if (args[argidx] == "-keepdc") { @@ -151,6 +154,8 @@ struct OptPass : public Pass { Pass::call(design, "opt_muxtree"); Pass::call(design, "opt_reduce" + opt_reduce_args); Pass::call(design, "opt_merge" + opt_merge_args); + if (opt_share) + Pass::call(design, "opt_share"); Pass::call(design, "opt_rmdff" + opt_rmdff_args); Pass::call(design, "opt_clean" + opt_clean_args); Pass::call(design, "opt_expr" + opt_expr_args); |