aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/simplify.c
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2016-12-17 10:29:56 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-07-23 13:11:20 +0200
commit90cc2706010c1d2eb8cedf0765c95cbb2d5bd38b (patch)
tree9784418bede0ff8d6a0e6b7fc2c6f5d353616d73 /simplify.c
parent68e67287e6f373e100813dbebd10b01ab722dd18 (diff)
downloadsparse-dev-90cc2706010c1d2eb8cedf0765c95cbb2d5bd38b.tar.gz
extract nbr_users() from unssa.c
This small helper was used in unssa.c but is useful elsewhere too. Move it as an inline function to linearize.h and rename it to 'nbr_users()' since it is close to the existing 'has_users()'. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'simplify.c')
-rw-r--r--simplify.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/simplify.c b/simplify.c
index 3a5ae933..1ac000e5 100644
--- a/simplify.c
+++ b/simplify.c
@@ -843,7 +843,7 @@ static int simplify_associative_binop(struct instruction *insn)
return 0;
if (!simple_pseudo(def->src2))
return 0;
- if (pseudo_user_list_size(def->target->users) != 1)
+ if (nbr_users(def->target) != 1)
return 0;
switch_pseudo(def, &def->src1, insn, &insn->src2);
return REPEAT_CSE;