diff options
author | Marcelina KoĆcielnicka <mwk@0x04.net> | 2021-07-11 23:57:53 +0200 |
---|---|---|
committer | Marcelina KoĆcielnicka <mwk@0x04.net> | 2021-07-12 00:47:34 +0200 |
commit | 009940f56ca71cc8655a13a514371eb5757b96ca (patch) | |
tree | 8b194a81a92590973eb662c1207a876d010b2966 /passes/proc | |
parent | 726fabd65e51c7a15a2a2dc24d3b99426ef43ad2 (diff) | |
download | yosys-009940f56ca71cc8655a13a514371eb5757b96ca.tar.gz yosys-009940f56ca71cc8655a13a514371eb5757b96ca.tar.bz2 yosys-009940f56ca71cc8655a13a514371eb5757b96ca.zip |
rtlil: Make Process handling more uniform with Cell and Wire.
- add a backlink to module from Process
- make constructor and destructor protected, expose Module functions
to add and remove processes
Diffstat (limited to 'passes/proc')
-rw-r--r-- | passes/proc/proc_clean.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/passes/proc/proc_clean.cc b/passes/proc/proc_clean.cc index 76d4cf51b..45872907b 100644 --- a/passes/proc/proc_clean.cc +++ b/passes/proc/proc_clean.cc @@ -209,7 +209,7 @@ struct ProcCleanPass : public Pass { extra_args(args, argidx, design); for (auto mod : design->modules()) { - std::vector<RTLIL::IdString> delme; + std::vector<RTLIL::Process *> delme; if (!design->selected(mod)) continue; for (auto &proc_it : mod->processes) { @@ -220,12 +220,11 @@ struct ProcCleanPass : public Pass { proc_it.second->root_case.actions.size() == 0) { if (!quiet) log("Removing empty process `%s.%s'.\n", log_id(mod), proc_it.second->name.c_str()); - delme.push_back(proc_it.first); + delme.push_back(proc_it.second); } } - for (auto &id : delme) { - delete mod->processes[id]; - mod->processes.erase(id); + for (auto proc : delme) { + mod->remove(proc); } } |