aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-11-28 10:05:06 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:05:08 -0700
commite533ccc8e3665fa22a1e6ae11b217d0e5601f08c (patch)
tree7be9761d40ac9af99154e616ce351b2bf609f272 /simplify.c
parentExpose the "trivial common parent" logic that we use for phi (diff)
downloadsparse-e533ccc8e3665fa22a1e6ae11b217d0e5601f08c.tar.gz
sparse-e533ccc8e3665fa22a1e6ae11b217d0e5601f08c.tar.bz2
sparse-e533ccc8e3665fa22a1e6ae11b217d0e5601f08c.zip
Make list-ptr remove/replace take a count.
It will assrt if it can't find that many entries. Zero means "all the ones you can find", aka old behaviour.
Diffstat (limited to 'simplify.c')
-rw-r--r--simplify.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/simplify.c b/simplify.c
index a52b6e7..25b5e6b 100644
--- a/simplify.c
+++ b/simplify.c
@@ -159,9 +159,7 @@ static int clean_up_phi(struct instruction *insn)
static inline void remove_usage(pseudo_t p, pseudo_t *usep)
{
if (has_use_list(p)) {
- int deleted;
- deleted = delete_ptr_list_entry((struct ptr_list **)&p->users, usep);
- assert(deleted == 1);
+ delete_ptr_list_entry((struct ptr_list **)&p->users, usep, 1);
if (!p->users)
kill_instruction(p->def);
}