diff options
author | Jason Ekstrand <[email protected]> | 2019-05-09 17:05:31 -0500 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2019-05-14 12:30:22 -0500 |
commit | e1511f1d4c3949b107fda284ea9117632b9ef61d (patch) | |
tree | 1e284c107052ff37425422ec4978fa4b673408ff /src/util/register_allocate.c | |
parent | 9d6d1f47e784df5941412f1e7f8946c65cb55c8d (diff) |
util/ra: Only update q_total if the reg is not assigned
We only use q_total if the reg is not assigned so there's no point in
updating it if the reg is not assigned. This has no known perf benefit
but it will reduce churn in a future commit.
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/util/register_allocate.c')
-rw-r--r-- | src/util/register_allocate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/register_allocate.c b/src/util/register_allocate.c index 9493f578dba..0c62ad3865c 100644 --- a/src/util/register_allocate.c +++ b/src/util/register_allocate.c @@ -484,7 +484,7 @@ decrement_q(struct ra_graph *g, unsigned int n) unsigned int n2 = g->nodes[n].adjacency_list[i]; unsigned int n2_class = g->nodes[n2].class; - if (!BITSET_TEST(g->in_stack, n2)) { + if (!BITSET_TEST(g->in_stack, n2) && g->nodes[n2].reg == NO_REG) { assert(g->nodes[n2].q_total >= g->regs->classes[n2_class]->q[n_class]); g->nodes[n2].q_total -= g->regs->classes[n2_class]->q[n_class]; } |