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 <lars@metafoo.de>
This commit is contained in:
Lars-Peter Clausen 2022-04-17 20:43:05 +02:00
parent 3495889112
commit 02fa1a9978
1 changed files with 3 additions and 8 deletions

View File

@ -50,7 +50,7 @@
using namespace std;
static void pform_set_data_type(const struct vlltype&li, data_type_t*data_type,
std::vector<PWire*> *wires, NetNet::Type net_type,
std::vector<PWire*> *wires,
list<named_pexpr_t>*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<PWire*> *wires, NetNet::Type net_type,
std::vector<PWire*> *wires,
list<named_pexpr_t>*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);