From: Sebastian Buchwald Date: Mon, 1 Dec 2008 18:10:45 +0000 (+0000) Subject: Use more bucket functions. X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=937c4900d4b165a27178d0c80cbe6f61fcdd1a3d;p=libfirm Use more bucket functions. [r24208] --- diff --git a/heuristical.c b/heuristical.c index cd8b38e62..c6dcc2d8d 100644 --- a/heuristical.c +++ b/heuristical.c @@ -207,7 +207,6 @@ static void reorder_node(pbqp_node *node) unsigned old_bucket_len; unsigned old_bucket_index; pbqp_node **old_bucket; - pbqp_node *other; if (!buckets_filled) return; @@ -237,10 +236,7 @@ static void reorder_node(pbqp_node *node) assert(old_bucket[old_bucket_index] == node); /* Delete node from old bucket... */ - other = old_bucket[old_bucket_len - 1]; - other->bucket_index = old_bucket_index; - old_bucket[old_bucket_index] = other; - ARR_SHRINKLEN(node_buckets[old_arity], old_bucket_len - 1); + node_bucket_remove(&node_buckets[old_arity], node); /* ..and add to new one. */ node->bucket_index = node_bucket_get_length(node_buckets[arity]);