diff options
author | Eric Anholt <[email protected]> | 2011-01-18 00:33:35 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2011-01-18 10:17:44 -0800 |
commit | 604022abed537d8066ddece5d8a4bbf08e93a2d5 (patch) | |
tree | 309e4af60efdd915938fcb1d4bc92c31a4d4715a /src/mesa | |
parent | 7cf648da632595d1997d50a9fa92701ade61ff63 (diff) |
ra: Take advantage of the adjacency list in ra_select() too.
Reduces runtime of glsl-fs-convolution-1 another 13.9% +/- 0.6% (n=5).
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/program/register_allocate.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/program/register_allocate.c b/src/mesa/program/register_allocate.c index 5de929e29ac..e96909af5e2 100644 --- a/src/mesa/program/register_allocate.c +++ b/src/mesa/program/register_allocate.c @@ -336,14 +336,15 @@ ra_select(struct ra_graph *g) continue; /* Check if any of our neighbors conflict with this register choice. */ - for (i = 0; i < g->count; i++) { - if (g->nodes[n].adjacency[i] && - !g->nodes[i].in_stack && - g->regs->regs[r].conflicts[g->nodes[i].reg]) { + for (i = 0; i < g->nodes[n].adjacency_count; i++) { + unsigned int n2 = g->nodes[n].adjacency_list[i]; + + if (!g->nodes[n2].in_stack && + g->regs->regs[r].conflicts[g->nodes[n2].reg]) { break; } } - if (i == g->count) + if (i == g->nodes[n].adjacency_count) break; } if (r == g->regs->count) |