aboutsummaryrefslogtreecommitdiffstats
path: root/passes
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-08-04 15:08:35 +0200
committerClifford Wolf <clifford@clifford.at>2014-08-04 15:40:07 +0200
commitebbbe7fc8360ca0bd8f840d3df1b77ab2fb569b6 (patch)
tree8d7dd71f161543176cbf1d784d98da389d9b53b2 /passes
parentc7f99be3be828606cafc7d35b3612f5344065736 (diff)
downloadyosys-ebbbe7fc8360ca0bd8f840d3df1b77ab2fb569b6.tar.gz
yosys-ebbbe7fc8360ca0bd8f840d3df1b77ab2fb569b6.tar.bz2
yosys-ebbbe7fc8360ca0bd8f840d3df1b77ab2fb569b6.zip
Added RTLIL::IdString::in(...)
Diffstat (limited to 'passes')
-rw-r--r--passes/cmds/wreduce.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/passes/cmds/wreduce.cc b/passes/cmds/wreduce.cc
index bd0b315e7..9cef14f48 100644
--- a/passes/cmds/wreduce.cc
+++ b/passes/cmds/wreduce.cc
@@ -109,10 +109,10 @@ struct WreduceWorker
void run_cell(Cell *cell)
{
- if (config->supported_cell_types.count(cell->type) == 0)
+ if (!cell->type.in(config->supported_cell_types))
return;
- if (cell->type == ID("$shl") || cell->type == ID("$shr") || cell->type == ID("$sshl") || cell->type == ID("$sshr"))
+ if (cell->type.in("$shl", "$shr", "$sshl", "$sshr"))
cell->setParam("\\B_SIGNED", false);
if (cell->hasParam("\\A_SIGNED"))
@@ -135,8 +135,7 @@ struct WreduceWorker
bits_removed++;
}
- if (cell->type == ID("$pos") || cell->type == ID("$bu0") || cell->type == ID("$add") || cell->type == ID("$mul") ||
- cell->type == ID("$and") || cell->type == ID("$or") || cell->type == ID("$xor"))
+ if (cell->type.in("$pos", "$bu0", "$add", "$mul", "$and", "$or", "$xor"))
{
bool is_signed = cell->getParam("\\A_SIGNED").as_bool();