diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-10-31 03:36:51 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-10-31 03:36:51 +0100 |
commit | ab28491f271e3b02ba58dabb4b7033bcf17b6c25 (patch) | |
tree | a8fe074a05d66477549338934259f6f80eed7fa4 /passes | |
parent | a21481b338933f9498fd0fb11492aa2e5b7a00cd (diff) | |
download | yosys-ab28491f271e3b02ba58dabb4b7033bcf17b6c25.tar.gz yosys-ab28491f271e3b02ba58dabb4b7033bcf17b6c25.tar.bz2 yosys-ab28491f271e3b02ba58dabb4b7033bcf17b6c25.zip |
Added "opt -full" alias for all more aggressive optimizations
Diffstat (limited to 'passes')
-rw-r--r-- | passes/opt/opt.cc | 13 | ||||
-rw-r--r-- | passes/opt/opt_const.cc | 16 | ||||
-rw-r--r-- | passes/opt/opt_reduce.cc | 7 |
3 files changed, 29 insertions, 7 deletions
diff --git a/passes/opt/opt.cc b/passes/opt/opt.cc index ea454b333..83a30ad77 100644 --- a/passes/opt/opt.cc +++ b/passes/opt/opt.cc @@ -37,22 +37,22 @@ struct OptPass : public Pass { log("a series of trivial optimizations and cleanups. This pass executes the other\n"); log("passes in the following order:\n"); log("\n"); - log(" opt_const [-mux_undef] [-mux_bool] [-undriven] [-fine] [-keepdc]\n"); + log(" opt_const [-mux_undef] [-mux_bool] [-undriven] [-fine] [-full] [-keepdc]\n"); log(" opt_share -nomux\n"); log("\n"); log(" do\n"); log(" opt_muxtree\n"); - log(" opt_reduce [-fine]\n"); + log(" opt_reduce [-fine] [-full]\n"); log(" opt_share\n"); log(" opt_rmdff\n"); log(" opt_clean [-purge]\n"); - log(" opt_const [-mux_undef] [-mux_bool] [-undriven] [-fine] [-keepdc]\n"); + log(" opt_const [-mux_undef] [-mux_bool] [-undriven] [-fine] [-full] [-keepdc]\n"); log(" while <changed design>\n"); log("\n"); log("When called with -fast the following script is used instead:\n"); log("\n"); log(" do\n"); - log(" opt_const [-mux_undef] [-mux_bool] [-undriven] [-fine] [-keepdc]\n"); + log(" opt_const [-mux_undef] [-mux_bool] [-undriven] [-fine] [-full] [-keepdc]\n"); log(" opt_share\n"); log(" opt_rmdff\n"); log(" opt_clean [-purge]\n"); @@ -96,6 +96,11 @@ struct OptPass : public Pass { opt_reduce_args += " -fine"; continue; } + if (args[argidx] == "-full") { + opt_const_args += " -full"; + opt_reduce_args += " -full"; + continue; + } if (args[argidx] == "-keepdc") { opt_const_args += " -keepdc"; continue; diff --git a/passes/opt/opt_const.cc b/passes/opt/opt_const.cc index c726c7b3d..e00d5e3b1 100644 --- a/passes/opt/opt_const.cc +++ b/passes/opt/opt_const.cc @@ -942,15 +942,18 @@ struct OptConstPass : public Pass { log(" -undriven\n"); log(" replace undriven nets with undef (x) constants\n"); log("\n"); + log(" -fine\n"); + log(" perform fine-grain optimizations\n"); + log("\n"); + log(" -full\n"); + log(" alias for -mux_undef -mux_bool -undriven -fine\n"); + log("\n"); log(" -keepdc\n"); log(" some optimizations change the behavior of the circuit with respect to\n"); log(" don't-care bits. for example in 'a+0' a single x-bit in 'a' will cause\n"); log(" all result bits to be set to x. this behavior changes when 'a+0' is\n"); log(" replaced by 'a'. the -keepdc option disables all such optimizations.\n"); log("\n"); - log(" -fine\n"); - log(" perform fine-grain optimizations\n"); - log("\n"); } virtual void execute(std::vector<std::string> args, RTLIL::Design *design) { @@ -981,6 +984,13 @@ struct OptConstPass : public Pass { do_fine = true; continue; } + if (args[argidx] == "-full") { + mux_undef = true; + mux_bool = true; + undriven = true; + do_fine = true; + continue; + } if (args[argidx] == "-keepdc") { keepdc = true; continue; diff --git a/passes/opt/opt_reduce.cc b/passes/opt/opt_reduce.cc index 302deb9bd..3183d973d 100644 --- a/passes/opt/opt_reduce.cc +++ b/passes/opt/opt_reduce.cc @@ -346,6 +346,9 @@ struct OptReducePass : public Pass { log(" -fine\n"); log(" perform fine-grain optimizations\n"); log("\n"); + log(" -full\n"); + log(" alias for -fine\n"); + log("\n"); } virtual void execute(std::vector<std::string> args, RTLIL::Design *design) { @@ -359,6 +362,10 @@ struct OptReducePass : public Pass { do_fine = true; continue; } + if (args[argidx] == "-full") { + do_fine = true; + continue; + } break; } extra_args(args, argidx, design); |