diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-07-23 16:09:27 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-07-23 19:34:51 +0200 |
commit | a62c21c9c64ad5b3e0dae5d4ee4857425f73068e (patch) | |
tree | 81cbbd4bbd869af6290eb0e19e4cfdfbc9555c03 /passes/opt/opt_clean.cc | |
parent | 54552f680938fd933b07fa38597937ba6d367be7 (diff) | |
download | yosys-a62c21c9c64ad5b3e0dae5d4ee4857425f73068e.tar.gz yosys-a62c21c9c64ad5b3e0dae5d4ee4857425f73068e.tar.bz2 yosys-a62c21c9c64ad5b3e0dae5d4ee4857425f73068e.zip |
Removed RTLIL::SigSpec::expand() method
Diffstat (limited to 'passes/opt/opt_clean.cc')
-rw-r--r-- | passes/opt/opt_clean.cc | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/passes/opt/opt_clean.cc b/passes/opt/opt_clean.cc index 23fc48d5d..0be36606d 100644 --- a/passes/opt/opt_clean.cc +++ b/passes/opt/opt_clean.cc @@ -233,14 +233,12 @@ static void rmunused_module_signals(RTLIL::Module *module, bool purge_mode, bool if (!used_signals.check_any(s2) && wire->port_id == 0 && !wire->get_bool_attribute("\\keep")) { del_wires.push_back(wire); } else { - s1.expand(); - s2.expand(); - assert(s1.chunks().size() == s2.chunks().size()); + assert(SIZE(s1) == SIZE(s2)); RTLIL::SigSig new_conn; - for (size_t i = 0; i < s1.chunks().size(); i++) - if (s1.chunks()[i] != s2.chunks()[i]) { - new_conn.first.append(s1.chunks()[i]); - new_conn.second.append(s2.chunks()[i]); + for (int i = 0; i < SIZE(s1); i++) + if (s1[i] != s2[i]) { + new_conn.first.append_bit(s1[i]); + new_conn.second.append_bit(s2[i]); } if (new_conn.first.size() > 0) { new_conn.first.optimize(); @@ -257,9 +255,8 @@ static void rmunused_module_signals(RTLIL::Module *module, bool purge_mode, bool RTLIL::SigSpec sig = assign_map(RTLIL::SigSpec(wire)); if (!used_signals_nodrivers.check_any(sig)) { std::string unused_bits; - sig.expand(); - for (size_t i = 0; i < sig.chunks().size(); i++) { - if (sig.chunks()[i].wire == NULL) + for (int i = 0; i < SIZE(sig); i++) { + if (sig[i].wire == NULL) continue; if (!used_signals_nodrivers.check_any(sig)) { if (!unused_bits.empty()) |