Lines Matching full:nodes
34 * edges in the graph between nodes that interfere (can't be allocated
41 * That likely causes other nodes to become trivially colorable as well.
43 * Then during the "select" process, nodes are popped off of that
118 * List of which nodes this node interferes with. This should be
150 struct ra_node *nodes;
151 unsigned int count; /**< count of nodes. */
298 g->nodes[n1].adjacency[n2] = GL_TRUE;
299 g->nodes[n1].adjacency_list[g->nodes[n1].adjacency_count] = n2;
300 g->nodes[n1].adjacency_count++;
311 g->nodes = rzalloc_array(g, struct ra_node, count);
317 g->nodes[i].adjacency = rzalloc_array(g, GLboolean, count);
318 g->nodes[i].adjacency_list = ralloc_array(g, unsigned int, count);
319 g->nodes[i].adjacency_count = 0;
321 g->nodes[i].reg = NO_REG;
331 g->nodes[n].class = class;
338 if (!g->nodes[n1].adjacency[n2]) {
348 int n_class = g->nodes[n].class;
350 for (j = 0; j < g->nodes[n].adjacency_count; j++) {
351 unsigned int n2 = g->nodes[n].adjacency_list[j];
352 unsigned int n2_class = g->nodes[n2].class;
354 if (n != n2 && !g->nodes[n2].in_stack) {
364 * trivially-colorable nodes into a stack of nodes to be colored,
367 * Returns GL_TRUE if all nodes were removed from the graph. GL_FALSE
381 if (g->nodes[i].in_stack || g->nodes[i].reg != NO_REG)
387 g->nodes[i].in_stack = GL_TRUE;
394 if (!g->nodes[i].in_stack)
402 * Pops nodes from the stack back into the graph, coloring them with
405 * If all nodes were trivially colorable, then this must succeed. If
416 struct ra_class *c = g->regs->classes[g->nodes[n].class];
426 for (i = 0; i < g->nodes[n].adjacency_count; i++) {
427 unsigned int n2 = g->nodes[n].adjacency_list[i];
429 if (!g->nodes[n2].in_stack &&
430 g->regs->regs[r].conflicts[g->nodes[n2].reg]) {
434 if (i == g->nodes[n].adjacency_count)
440 g->nodes[n].reg = r;
441 g->nodes[n].in_stack = GL_FALSE;
449 * Optimistic register coloring: Just push the remaining nodes
451 * if they succeed then the locally-colorable nodes are still
461 if (g->nodes[i].in_stack || g->nodes[i].reg != NO_REG)
466 g->nodes[i].in_stack = GL_TRUE;
482 return g->nodes[n].reg;
490 * input data). These nodes do not end up in the stack during
499 g->nodes[n].reg = reg;
500 g->nodes[n].in_stack = GL_FALSE;
508 int n_class = g->nodes[n].class;
515 for (j = 0; j < g->nodes[n].adjacency_count; j++) {
516 unsigned int n2 = g->nodes[n].adjacency_list[j];
518 unsigned int n2_class = g->nodes[n2].class;
529 * the pq test, or -1 if there are no spillable nodes.
539 float cost = g->nodes[n].spill_cost;
557 * Only nodes with a spill cost set (cost != 0.0) will be considered
563 g->nodes[n].spill_cost = cost;