summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beprefalloc.c
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2014-03-29 10:13:39 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2014-04-10 10:33:55 +0200
commit1966adc74b7dc4a47f556d36628019beeb3f6d0d (patch)
treeb742c3a080dc2fd527d77849651ca2d8a547fb1a /ir/be/beprefalloc.c
parent5512229a51005fec43bac48ff09c64251b392754 (diff)
all: Add and use QSORT() and QSORT_ARR().
Diffstat (limited to 'ir/be/beprefalloc.c')
-rw-r--r--ir/be/beprefalloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ir/be/beprefalloc.c b/ir/be/beprefalloc.c
index a1e142b..cd3ea17 100644
--- a/ir/be/beprefalloc.c
+++ b/ir/be/beprefalloc.c
@@ -538,7 +538,7 @@ static void fill_sort_candidates(reg_pref_t *regprefs,
regprefs[r].pref = pref;
}
/* TODO: use a stable sort here to avoid unnecessary register jumping */
- qsort(regprefs, n_regs, sizeof(regprefs[0]), compare_reg_pref);
+ QSORT(regprefs, n_regs, compare_reg_pref);
}
static bool try_optimistic_split(ir_node *to_split, ir_node *before,
@@ -1696,7 +1696,7 @@ static void determine_block_order(void)
}
/* sort array by block costs */
- qsort(blocklist, n_blocks, sizeof(blocklist[0]), cmp_block_costs);
+ QSORT_ARR(blocklist, cmp_block_costs);
ir_reserve_resources(irg, IR_RESOURCE_BLOCK_VISITED);
inc_irg_block_visited(irg);