diff options
author | Jason Ekstrand <[email protected]> | 2019-05-09 09:46:41 -0500 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2019-05-14 12:30:22 -0500 |
commit | 7720ad65ae2cda1e08df162014c6903c654730af (patch) | |
tree | 13bcf763bad961462873b6d626f2fc7af40701ed /src | |
parent | 34810f42373639ee811885d251b97e56e8695e72 (diff) |
util/ra: Get rid of tabs
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/util/register_allocate.c | 48 | ||||
-rw-r--r-- | src/util/register_allocate.h | 8 |
2 files changed, 28 insertions, 28 deletions
diff --git a/src/util/register_allocate.c b/src/util/register_allocate.c index 500540bfdd9..fce01c5dbb7 100644 --- a/src/util/register_allocate.c +++ b/src/util/register_allocate.c @@ -518,33 +518,33 @@ ra_simplify(struct ra_graph *g) progress = false; for (i = g->count - 1; i >= 0; i--) { - if (g->nodes[i].in_stack || g->nodes[i].reg != NO_REG) - continue; - - if (pq_test(g, i)) { - decrement_q(g, i); - g->stack[g->stack_count] = i; - g->stack_count++; - g->nodes[i].in_stack = true; - progress = true; - } else { - unsigned int new_q_total = g->nodes[i].q_total; - if (new_q_total < lowest_q_total) { - best_optimistic_node = i; - lowest_q_total = new_q_total; - } - } + if (g->nodes[i].in_stack || g->nodes[i].reg != NO_REG) + continue; + + if (pq_test(g, i)) { + decrement_q(g, i); + g->stack[g->stack_count] = i; + g->stack_count++; + g->nodes[i].in_stack = true; + progress = true; + } else { + unsigned int new_q_total = g->nodes[i].q_total; + if (new_q_total < lowest_q_total) { + best_optimistic_node = i; + lowest_q_total = new_q_total; + } + } } if (!progress && best_optimistic_node != ~0U) { if (stack_optimistic_start == UINT_MAX) stack_optimistic_start = g->stack_count; - decrement_q(g, best_optimistic_node); - g->stack[g->stack_count] = best_optimistic_node; - g->stack_count++; - g->nodes[best_optimistic_node].in_stack = true; - progress = true; + decrement_q(g, best_optimistic_node); + g->stack[g->stack_count] = best_optimistic_node; + g->stack_count++; + g->nodes[best_optimistic_node].in_stack = true; + progress = true; } } @@ -752,7 +752,7 @@ ra_get_best_spill_node(struct ra_graph *g) float benefit; if (cost <= 0.0f) - continue; + continue; if (g->nodes[n].in_stack) continue; @@ -760,8 +760,8 @@ ra_get_best_spill_node(struct ra_graph *g) benefit = ra_get_spill_benefit(g, n); if (benefit / cost > best_benefit) { - best_benefit = benefit / cost; - best_node = n; + best_benefit = benefit / cost; + best_node = n; } } diff --git a/src/util/register_allocate.h b/src/util/register_allocate.h index 7c40542641b..d3448a11c77 100644 --- a/src/util/register_allocate.h +++ b/src/util/register_allocate.h @@ -52,9 +52,9 @@ struct ra_regs *ra_alloc_reg_set(void *mem_ctx, unsigned int count, void ra_set_allocate_round_robin(struct ra_regs *regs); unsigned int ra_alloc_reg_class(struct ra_regs *regs); void ra_add_reg_conflict(struct ra_regs *regs, - unsigned int r1, unsigned int r2); + unsigned int r1, unsigned int r2); void ra_add_transitive_reg_conflict(struct ra_regs *regs, - unsigned int base_reg, unsigned int reg); + unsigned int base_reg, unsigned int reg); void ra_make_reg_conflicts_transitive(struct ra_regs *regs, unsigned int reg); void ra_class_add_reg(struct ra_regs *regs, unsigned int c, unsigned int reg); void ra_set_num_conflicts(struct ra_regs *regs, unsigned int class_a, @@ -73,7 +73,7 @@ void ra_set_finalize(struct ra_regs *regs, unsigned int **conflicts); * graph. */ struct ra_graph *ra_alloc_interference_graph(struct ra_regs *regs, - unsigned int count); + unsigned int count); void ra_set_node_class(struct ra_graph *g, unsigned int n, unsigned int c); void ra_set_select_reg_callback(struct ra_graph *g, unsigned int (*callback)(struct ra_graph *g, @@ -81,7 +81,7 @@ void ra_set_select_reg_callback(struct ra_graph *g, void *data), void *data); void ra_add_node_interference(struct ra_graph *g, - unsigned int n1, unsigned int n2); + unsigned int n1, unsigned int n2); /** @} */ /** @{ Graph-coloring register allocation */ |