summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bespilldaemel.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/bespilldaemel.c
parent5512229a51005fec43bac48ff09c64251b392754 (diff)
all: Add and use QSORT() and QSORT_ARR().
Diffstat (limited to 'ir/be/bespilldaemel.c')
-rw-r--r--ir/be/bespilldaemel.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ir/be/bespilldaemel.c b/ir/be/bespilldaemel.c
index 8fad8cb..384bb1a 100644
--- a/ir/be/bespilldaemel.c
+++ b/ir/be/bespilldaemel.c
@@ -18,6 +18,8 @@
* Spilling in this context means placing a spill instruction behind the
* definition of the value and a reload before each usage.
*/
+
+#include "../../adt/util.h"
#include "debug.h"
#include "irnodeset.h"
@@ -169,8 +171,7 @@ static void do_spilling(ir_nodeset_t *live_nodes, ir_node *node)
assert(c == n_live_nodes);
/* sort spill candidates */
- qsort(candidates, n_live_nodes, sizeof(candidates[0]),
- compare_spill_candidates_desc);
+ QSORT(candidates, n_live_nodes, compare_spill_candidates_desc);
/* spill cheapest ones */
size_t cand_idx = 0;