From 02fa1a99784c4725f16cf092c66c9dd294301d70 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Sun, 17 Apr 2022 20:43:05 +0200 Subject: [PATCH] pform_set_data_type(): Remove `net_type` parameter `pform_set_data_type()` is now only called on wires that already have the correct wire type set. There is no need to pass the same type to `pform_set_data_type()` and set it again. Signed-off-by: Lars-Peter Clausen --- pform.cc | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/pform.cc b/pform.cc index d5de24d02..d7c476532 100644 --- a/pform.cc +++ b/pform.cc @@ -50,7 +50,7 @@ using namespace std; static void pform_set_data_type(const struct vlltype&li, data_type_t*data_type, - std::vector *wires, NetNet::Type net_type, + std::vector *wires, list*attr, bool is_const = false); /* @@ -2713,7 +2713,7 @@ void pform_makewire(const struct vlltype&li, wires->push_back(wire); } - pform_set_data_type(li, data_type, wires, type, attr, is_const); + pform_set_data_type(li, data_type, wires, attr, is_const); while (! assign_list->empty()) { decl_assignment_t*first = assign_list->front(); @@ -3279,7 +3279,7 @@ void pform_set_port_type(const struct vlltype&li, * dispatches the type to the proper subtype function. */ static void pform_set_data_type(const struct vlltype&li, data_type_t*data_type, - std::vector *wires, NetNet::Type net_type, + std::vector *wires, list*attr, bool is_const) { if (data_type == 0) { @@ -3295,11 +3295,6 @@ static void pform_set_data_type(const struct vlltype&li, data_type_t*data_type, pform_set_net_range(wire, vec_type); - // If these fail there is a bug somewhere else. pform_set_data_type() - // is only ever called on a fresh wire that already exists. - bool rc = wire->set_wire_type(net_type); - ivl_assert(li, rc); - wire->set_data_type(data_type); wire->set_const(is_const);