aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rtlil.cc
diff options
context:
space:
mode:
authorSergey <37293587+SergeyDegtyar@users.noreply.github.com>2019-10-01 11:04:32 +0300
committerGitHub <noreply@github.com>2019-10-01 11:04:32 +0300
commite092c4ae6b60cf67efd16efbfbf739895ad501c0 (patch)
tree939a5b94d14a11df511aa95482458b33a1f6139f /kernel/rtlil.cc
parent1070f2e90b9ba37856932189ef09a0f2316d9a21 (diff)
parentd963e8c2c6207ad98d48dc528922ad58c030173f (diff)
downloadyosys-e092c4ae6b60cf67efd16efbfbf739895ad501c0.tar.gz
yosys-e092c4ae6b60cf67efd16efbfbf739895ad501c0.tar.bz2
yosys-e092c4ae6b60cf67efd16efbfbf739895ad501c0.zip
Merge branch 'master' into SergeyDegtyar/efinix
Diffstat (limited to 'kernel/rtlil.cc')
-rw-r--r--kernel/rtlil.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc
index 1d380135b..ded1cd60e 100644
--- a/kernel/rtlil.cc
+++ b/kernel/rtlil.cc
@@ -1528,7 +1528,7 @@ std::vector<RTLIL::Wire*> RTLIL::Module::selected_wires() const
std::vector<RTLIL::Cell*> RTLIL::Module::selected_cells() const
{
std::vector<RTLIL::Cell*> result;
- result.reserve(wires_.size());
+ result.reserve(cells_.size());
for (auto &it : cells_)
if (design->selected(this, it.second))
result.push_back(it.second);
@@ -3083,6 +3083,7 @@ void RTLIL::SigSpec::replace(const dict<RTLIL::SigBit, RTLIL::SigBit> &rules, RT
log_assert(other != NULL);
log_assert(width_ == other->width_);
+ if (rules.empty()) return;
unpack();
other->unpack();
@@ -3107,6 +3108,7 @@ void RTLIL::SigSpec::replace(const std::map<RTLIL::SigBit, RTLIL::SigBit> &rules
log_assert(other != NULL);
log_assert(width_ == other->width_);
+ if (rules.empty()) return;
unpack();
other->unpack();