Automatically run "proc" on extract map files
authorClifford Wolf <clifford@clifford.at>
Wed, 24 Jul 2013 18:19:08 +0000 (20:19 +0200)
committerClifford Wolf <clifford@clifford.at>
Wed, 24 Jul 2013 18:19:08 +0000 (20:19 +0200)
passes/extract/extract.cc

index d25af324e4acac2644d4ce7157a30e4ced9719ec..0c639aeda3dbdd28bf71b07682bdff00b621dc1e 100644 (file)
@@ -521,6 +521,11 @@ struct ExtractPass : public Pass {
                        map = new RTLIL::Design;
                        Frontend::frontend_call(map, f, filename, (filename.size() > 3 && filename.substr(filename.size()-3) == ".il") ? "ilang" : "verilog");
                        fclose(f);
+
+                       if (filename.size() <= 3 || filename.substr(filename.size()-3) != ".il") {
+                               Pass::call(map, "proc");
+                               Pass::call(map, "opt_clean");
+                       }
                }
 
                std::map<std::string, RTLIL::Module*> needle_map, haystack_map;