mirror of
https://github.com/YosysHQ/yosys
synced 2026-07-20 22:25:49 +00:00
Fix wreduce speed more
This commit is contained in:
parent
f7dbfcb278
commit
ae2ed5e82a
2 changed files with 14 additions and 0 deletions
|
|
@ -78,6 +78,8 @@ struct WreduceWorker
|
|||
for (int i = GetSize(sig_y)-1; i >= 0; i--)
|
||||
{
|
||||
auto info = mi.query(sig_y[i]);
|
||||
if (info == nullptr)
|
||||
return;
|
||||
if (!info->is_output && GetSize(info->ports) <= 1 && !keep_bits.count(mi.sigmap(sig_y[i]))) {
|
||||
bits_removed.push_back(State::Sx);
|
||||
continue;
|
||||
|
|
@ -408,6 +410,8 @@ struct WreduceWorker
|
|||
break;
|
||||
|
||||
auto info = mi.query(bit);
|
||||
if (info == nullptr)
|
||||
return;
|
||||
if (info->is_output || GetSize(info->ports) > 1)
|
||||
break;
|
||||
|
||||
|
|
@ -566,6 +570,10 @@ struct WreduceWorker
|
|||
for (int i = GetSize(w)-1; i >= 0; i--) {
|
||||
SigBit bit(w, i);
|
||||
auto info = mi.query(bit);
|
||||
if (info == nullptr) {
|
||||
unused_top_bits = 0;
|
||||
break;
|
||||
}
|
||||
if (info && (info->is_input || info->is_output || GetSize(info->ports) > 0))
|
||||
break;
|
||||
unused_top_bits++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue