diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2016-12-17 10:29:56 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-07-23 13:11:20 +0200 |
| commit | 90cc2706010c1d2eb8cedf0765c95cbb2d5bd38b (patch) | |
| tree | 9784418bede0ff8d6a0e6b7fc2c6f5d353616d73 /simplify.c | |
| parent | 68e67287e6f373e100813dbebd10b01ab722dd18 (diff) | |
| download | sparse-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |
