From 3e2196651a82c050526476ef1e0efccc2e4b9fa4 Mon Sep 17 00:00:00 2001 From: Larry Doolittle Date: Thu, 30 Jul 2015 21:00:59 -0700 Subject: [PATCH] Remove unused parameter to indices_to_expressions need_addr has been hanging around, unused, since commit 078a3fd4 on Jan 17, 2014. --- elab_expr.cc | 4 ++-- elab_lval.cc | 4 +--- elab_net.cc | 2 +- netmisc.cc | 6 ++---- netmisc.h | 2 -- 5 files changed, 6 insertions(+), 12 deletions(-) diff --git a/elab_expr.cc b/elab_expr.cc index ca5e6259b..5e479f6c1 100644 --- a/elab_expr.cc +++ b/elab_expr.cc @@ -3505,7 +3505,7 @@ NetExpr* PEIdent::elaborate_expr(Design*des, NetScope*scope, indices_flags idx_flags; indices_to_expressions(des, scope, this, use_comp.index, net->unpacked_dimensions(), - need_const, net->unpacked_count(), + need_const, idx_flags, unpacked_indices, unpacked_indices_const); @@ -4578,7 +4578,7 @@ NetExpr* PEIdent::elaborate_expr_net_word_(Design*des, NetScope*scope, indices_flags idx_flags; indices_to_expressions(des, scope, this, name_tail.index, net->unpacked_dimensions(), - need_const, net->unpacked_count(), + need_const, idx_flags, unpacked_indices, unpacked_indices_const); diff --git a/elab_lval.cc b/elab_lval.cc index 108142ddc..ab277685f 100644 --- a/elab_lval.cc +++ b/elab_lval.cc @@ -543,8 +543,6 @@ NetAssign_* PEIdent::elaborate_lval_net_word_(Design*des, return 0; } - unsigned array_need_words = reg->unpacked_count(); - // Make sure there are enough indices to address an array element. const index_component_t&index_head = name_tail.index.front(); if (index_head.sel == index_component_t::SEL_PART) { @@ -562,7 +560,7 @@ NetAssign_* PEIdent::elaborate_lval_net_word_(Design*des, indices_flags flags; indices_to_expressions(des, scope, this, name_tail.index, reg->unpacked_dimensions(), - false, array_need_words, + false, flags, unpacked_indices, unpacked_indices_const); diff --git a/elab_net.cc b/elab_net.cc index 64711d97d..09a38f454 100644 --- a/elab_net.cc +++ b/elab_net.cc @@ -630,7 +630,7 @@ NetNet* PEIdent::elaborate_lnet_common_(Design*des, NetScope*scope, indices_flags flags; indices_to_expressions(des, scope, this, path_tail.index, sig->unpacked_dimensions(), - true, sig->unpacked_count(), + true, flags, unpacked_indices, unpacked_indices_const); diff --git a/netmisc.cc b/netmisc.cc index 26d523d3c..50a48a2c3 100644 --- a/netmisc.cc +++ b/netmisc.cc @@ -480,8 +480,6 @@ void indices_to_expressions(Design*des, NetScope*scope, const list&src, unsigned count, // True if the expression MUST be constant. bool need_const, - // Total words in target array - unsigned need_addr, // These are the outputs. indices_flags&flags, list&indices, list&indices_const) @@ -692,7 +690,7 @@ NetExpr* make_canonical_index(Design*des, NetScope*scope, indices_flags flags; indices_to_expressions(des, scope, loc, src, src.size(), - need_const, stype->static_dimensions().size(), + need_const, flags, indices_expr, indices_const); @@ -1428,7 +1426,7 @@ NetExpr*collapse_array_exprs(Design*des, NetScope*scope, indices_flags flags; indices_to_expressions(des, scope, loc, indices, net->packed_dimensions(), - false, net->unpacked_count(), flags, exprs, exprs_const); + false, flags, exprs, exprs_const); ivl_assert(*loc, exprs.size() == net->packed_dimensions()); // Special Case: there is only 1 packed dimension, so the diff --git a/netmisc.h b/netmisc.h index 0a93ca636..2b67403f2 100644 --- a/netmisc.h +++ b/netmisc.h @@ -181,8 +181,6 @@ extern void indices_to_expressions(Design*des, NetScope*scope, const list&src, unsigned count, // True if the expression MUST be constant. bool need_const, - // Total array size, for sizing expressions - unsigned need_addr, // These are the outputs. indices_flags&flags, list&indices,list&indices_const);