diff mbox series

replace nbr_users() by multi_users()

Message ID 20201025135947.32822-1-luc.vanoostenryck@gmail.com (mailing list archive)
State Mainlined, archived
Headers show
Series replace nbr_users() by multi_users() | expand

Commit Message

Luc Van Oostenryck Oct. 25, 2020, 1:59 p.m. UTC
During simplification, we're only interested to know if a pseudo
is used only once or more than once. This can be checked quicker
than getting the exact number of users.

So, replace the last call to nbr_users() by a call to multi_users().

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 simplify.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/simplify.c b/simplify.c
index 6caf6cbcf918..191c9e4928b2 100644
--- a/simplify.c
+++ b/simplify.c
@@ -871,7 +871,7 @@  static int simplify_shift(struct instruction *insn, pseudo_t pseudo, long long v
 				return replace_with_value(insn, 0);
 			if (nmask == mask)
 				return replace_pseudo(insn, &insn->src1, def->src1);
-			if (nbr_users(pseudo) > 1)
+			if (multi_users(pseudo))
 				break;
 			def->opcode = OP_LSR;
 			def->src2 = insn->src2;