On 07/08/18 15:26, Luc Van Oostenryck wrote: > Since multi_users() is cheaper than nbr_users(), use > the former when possible. > > Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> > --- > simplify.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/simplify.c b/simplify.c > index 4dfcf198d..b9a32e232 100644 > --- a/simplify.c > +++ b/simplify.c > @@ -751,7 +751,7 @@ static int simplify_seteq_setne(struct instruction *insn, long long value) > // and same for setne/eq ... 0/1 > return replace_pseudo(insn, &insn->src1, def->src); > case OP_TRUNC: > - if (nbr_users(old) > 1) > + if (multi_users(old)) In a previous review I suggested naming this function multiple_users() instead. When I read this patch, it just reinforced my initial feeling about the name! ;-) I can't claim to be very good at naming things, so please take this with a large dose of salt! ATB, Ramsay Jones > break; > // convert > // trunc.n %s <- (o) %a > @@ -1156,7 +1156,7 @@ static int simplify_cast(struct instruction *insn) > /* A cast of a AND might be a no-op.. */ > switch (insn->opcode) { > case OP_TRUNC: > - if (nbr_users(src) > 1) > + if (multi_users(src)) > break; > def->opcode = OP_TRUNC; > def->orig_type = def->type; > @@ -1174,7 +1174,7 @@ static int simplify_cast(struct instruction *insn) > break; > // OK, sign bit is 0 > case OP_ZEXT: > - if (nbr_users(src) > 1) > + if (multi_users(src)) > break; > // transform: > // and.n %b <- %a, M > -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html