aboutsummaryrefslogtreecommitdiffstats
path: root/frontends/aiger/aigerparse.cc
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-06-21 14:37:20 -0700
committerEddie Hung <eddie@fpgeh.com>2019-06-21 14:37:20 -0700
commit523e7ee7828326a0b89a1ed9fdd2eb717ef1815a (patch)
treed2a801ae37c5d14f74fd88f301ec7e4f7f76c1b6 /frontends/aiger/aigerparse.cc
parentf433a523742350b4bb9291ad65299015e2c81f05 (diff)
parente581a3e6f4c8763c6a308d1330dbf1ee4bb19499 (diff)
downloadyosys-523e7ee7828326a0b89a1ed9fdd2eb717ef1815a.tar.gz
yosys-523e7ee7828326a0b89a1ed9fdd2eb717ef1815a.tar.bz2
yosys-523e7ee7828326a0b89a1ed9fdd2eb717ef1815a.zip
Merge branch 'xc7mux' into xc7mux_wip
Diffstat (limited to 'frontends/aiger/aigerparse.cc')
-rw-r--r--frontends/aiger/aigerparse.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/frontends/aiger/aigerparse.cc b/frontends/aiger/aigerparse.cc
index d50a38b7a..5f236992d 100644
--- a/frontends/aiger/aigerparse.cc
+++ b/frontends/aiger/aigerparse.cc
@@ -114,13 +114,20 @@ struct ConstEvalAig
RTLIL::Cell *cell = sig2driver.at(output);
RTLIL::SigBit sig_a = cell->getPort("\\A");
+ sig2deps[sig_a].reserve(sig2deps[sig_a].size() + sig2deps[output].size()); // Reserve so that any invalidation
+ // that may occur does so here, and
+ // not mid insertion (below)
sig2deps[sig_a].insert(sig2deps[output].begin(), sig2deps[output].end());
if (!inputs.count(sig_a))
compute_deps(sig_a, inputs);
if (cell->type == "$_AND_") {
RTLIL::SigSpec sig_b = cell->getPort("\\B");
+ sig2deps[sig_b].reserve(sig2deps[sig_b].size() + sig2deps[output].size()); // Reserve so that any invalidation
+ // that may occur does so here, and
+ // not mid insertion (below)
sig2deps[sig_b].insert(sig2deps[output].begin(), sig2deps[output].end());
+
if (!inputs.count(sig_b))
compute_deps(sig_b, inputs);
}