X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Futil%2Fregister_allocate.c;fp=src%2Futil%2Fregister_allocate.c;h=56517b5161cd834b817cffe42b1e8310ba984ea5;hb=36aed70b591f7f4f642b26f46f7928be6d137e7b;hp=85453d2529021dba62847e3b7608ea8009acd2c4;hpb=b3efa2a4da206112f6c9b5adb2df37c2efe646e6;p=mesa.git diff --git a/src/util/register_allocate.c b/src/util/register_allocate.c index 85453d25290..56517b5161c 100644 --- a/src/util/register_allocate.c +++ b/src/util/register_allocate.c @@ -171,8 +171,7 @@ struct ra_graph { unsigned int alloc; /**< count of nodes allocated. */ - unsigned int (*select_reg_callback)(struct ra_graph *g, BITSET_WORD *regs, - void *data); + ra_select_reg_callback select_reg_callback; void *select_reg_callback_data; /* Temporary data for the algorithm to scratch around in */ @@ -565,9 +564,7 @@ ra_resize_interference_graph(struct ra_graph *g, unsigned int count) } void ra_set_select_reg_callback(struct ra_graph *g, - unsigned int (*callback)(struct ra_graph *g, - BITSET_WORD *regs, - void *data), + ra_select_reg_callback callback, void *data) { g->select_reg_callback = callback; @@ -868,7 +865,7 @@ ra_select(struct ra_graph *g) return false; } - r = g->select_reg_callback(g, select_regs, g->select_reg_callback_data); + r = g->select_reg_callback(n, select_regs, g->select_reg_callback_data); } else { /* Find the lowest-numbered reg which is not used by a member * of the graph adjacent to us.