From 47b6ee714d3f52b792a415b0c5907f2ada4dda8e Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Sun, 9 Jan 2022 09:55:37 +0100 Subject: [PATCH] Remove unused pform_makewire() variants There are two versions of pform_makewire() that are not used anywhere, remove them. Signed-off-by: Lars-Peter Clausen --- pform.cc | 30 ------------------------------ pform.h | 18 ------------------ pform_struct_type.cc | 29 ----------------------------- 3 files changed, 77 deletions(-) diff --git a/pform.cc b/pform.cc index dd171773c..21a106c15 100644 --- a/pform.cc +++ b/pform.cc @@ -2823,36 +2823,6 @@ void pform_makewire(const vlltype&li, perm_string name, } } -/* - * This form takes a list of names and some type information, and - * generates a bunch of variables/nets. We use the basic - * pform_makewire above. - */ -void pform_makewire(const vlltype&li, - list*range, - bool signed_flag, - list*names, - NetNet::Type type, - NetNet::PortType pt, - ivl_variable_type_t dt, - list*attr, - PWSRType rt) -{ - for (list::iterator cur = names->begin() - ; cur != names->end() ; ++ cur ) { - perm_string txt = *cur; - pform_makewire(li, txt, type, pt, dt, attr); - /* This has already been done for real variables. */ - if (dt != IVL_VT_REAL) { - pform_set_net_range(txt, type, range, signed_flag, dt, rt, 0); - } - } - - delete names; - delete range; - delete attr; -} - /* * This form makes nets with delays and continuous assignments. */ diff --git a/pform.h b/pform.h index 52199eaad..5f08678cd 100644 --- a/pform.h +++ b/pform.h @@ -359,17 +359,6 @@ extern void pform_makewire(const struct vlltype&li, perm_string name, ivl_variable_type_t, std::list*attr); -/* This form handles simple declarations */ -extern void pform_makewire(const struct vlltype&li, - std::list*range, - bool signed_flag, - std::list*names, - NetNet::Type type, - NetNet::PortType, - ivl_variable_type_t, - std::list*attr, - PWSRType rt = SR_NET); - /* This form handles assignment declarations. */ extern void pform_makewire(const struct vlltype&li, std::list*delay, @@ -385,13 +374,6 @@ extern void pform_makewire(const struct vlltype&li, NetNet::Type type, data_type_t*data_type); -/* This form handles nets declared as structures. (See pform_struct_type.cc) */ -extern void pform_makewire(const struct vlltype&li, - struct_type_t*struct_type, - NetNet::PortType, - std::list*names, - std::list*attr); - extern void pform_make_var_init(const struct vlltype&li, perm_string name, PExpr*expr); diff --git a/pform_struct_type.cc b/pform_struct_type.cc index 108b197b6..221722c43 100644 --- a/pform_struct_type.cc +++ b/pform_struct_type.cc @@ -91,32 +91,3 @@ void pform_set_struct_type(const struct vlltype&li, struct_type_t*struct_type, l pform_set_struct_type(li, struct_type, *cur, net_type, attr); } } - -static void pform_makewire(const struct vlltype&li, - struct_type_t*struct_type, - NetNet::PortType ptype, - perm_string name, - list*) -{ - ivl_variable_type_t base_type = struct_type->figure_packed_base_type(); - - PWire*cur = pform_get_make_wire_in_scope(li, name, NetNet::WIRE, ptype, base_type); - assert(cur); - FILE_NAME(cur, li); - cur->set_data_type(struct_type); -} - -void pform_makewire(const struct vlltype&li, - struct_type_t*struct_type, - NetNet::PortType ptype, - list*names, - list*attr) -{ - for (list::iterator cur = names->begin() - ; cur != names->end() ; ++ cur ) { - perm_string txt = *cur; - pform_makewire(li, struct_type, ptype, txt, attr); - } - - delete names; -}