Lines Matching refs: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
122 * it allocates the nodes.
516 int n1_class = g->nodes[n1].class;
517 int n2_class = g->nodes[n2].class;
518 g->nodes[n1].q_total += g->regs->classes[n1_class]->q[n2_class];
520 util_dynarray_append(&g->nodes[n1].adjacency_list, unsigned int, n2);
529 int n1_class = g->nodes[n1].class;
530 int n2_class = g->nodes[n2].class;
531 g->nodes[n1].q_total -= g->regs->classes[n1_class]->q[n2_class];
533 util_dynarray_delete_unordered(&g->nodes[n1].adjacency_list, unsigned int,
548 g->nodes = rerzalloc(g, g->nodes, struct ra_node, g->alloc, alloc);
553 /* Initialize new nodes. */
555 struct ra_node* node = g->nodes + i;
613 g->nodes[n].class = class->index;
620 return g->regs->classes[g->nodes[n].class];
649 util_dynarray_foreach(&g->nodes[n].adjacency_list, unsigned int, n2p) {
653 util_dynarray_clear(&g->nodes[n].adjacency_list);
660 int n_class = g->nodes[n].class;
661 if (g->nodes[n].tmp.q_total < g->regs->classes[n_class]->p) {
670 if (g->nodes[n].tmp.q_total < g->tmp.min_q_total[i] ||
671 (g->nodes[n].tmp.q_total == g->tmp.min_q_total[i] &&
673 g->tmp.min_q_total[i] = g->nodes[n].tmp.q_total;
682 int n_class = g->nodes[n].class;
686 util_dynarray_foreach(&g->nodes[n].adjacency_list, unsigned int, n2p) {
688 unsigned int n2_class = g->nodes[n2].class;
692 assert(g->nodes[n2].tmp.q_total >= g->regs->classes[n2_class]->q[n_class]);
693 g->nodes[n2].tmp.q_total -= g->regs->classes[n2_class]->q[n_class];
708 * trivially-colorable nodes into a stack of nodes to be colored,
711 * If we encounter a case where we can't push any nodes on the stack, then
738 g->nodes[n].reg = g->nodes[n].forced_reg;
739 g->nodes[n].tmp.q_total = g->nodes[n].q_total;
740 if (g->nodes[n].reg != NO_REG)
783 * one of these nodes to the stack. It needs to be
792 if (g->nodes[n].tmp.q_total < g->tmp.min_q_total[i]) {
793 g->tmp.min_q_total[i] = g->nodes[n].tmp.q_total;
835 util_dynarray_foreach(&g->nodes[n].adjacency_list, unsigned int, n2p) {
840 ra_class_allocations_conflict(g->regs->classes[g->nodes[n].class], r,
841 g->regs->classes[g->nodes[n2].class], g->nodes[n2].reg)) {
842 return &g->nodes[n2];
858 struct ra_class *c = g->regs->classes[g->nodes[n].class];
863 /* Remove any regs that conflict with nodes that we're adjacent to and have
866 util_dynarray_foreach(&g->nodes[n].adjacency_list, unsigned int, n2p) {
867 struct ra_node *n2 = &g->nodes[*n2p];
892 * Pops nodes from the stack back into the graph, coloring them with
895 * If all nodes were trivially colorable, then this must succeed. If
911 struct ra_class *c = g->regs->classes[g->nodes[n].class];
956 g->nodes[n].reg = r;
959 /* Rotate the starting point except for any nodes above the lowest
961 * at allocating optimistically colorable nodes is highly dependent on
962 * the way that the previous nodes popped off the stack are laid out.
964 * file and decreases the number of nearby nodes assigned to the same
988 if (g->nodes[n].forced_reg != NO_REG)
989 return g->nodes[n].forced_reg;
991 return g->nodes[n].reg;
999 * input data). These nodes do not end up in the stack during
1010 g->nodes[n].forced_reg = reg;
1017 int n_class = g->nodes[n].class;
1024 util_dynarray_foreach(&g->nodes[n].adjacency_list, unsigned int, n2p) {
1026 unsigned int n2_class = g->nodes[n2].class;
1036 * the pq test, or -1 if there are no spillable nodes.
1045 /* Consider any nodes that we colored successfully or the node we failed to
1047 * only considered these nodes, so spilling any other ones would not result
1051 float cost = g->nodes[n].spill_cost;
1072 * Only nodes with a spill cost set (cost != 0.0) will be considered
1078 g->nodes[n].spill_cost = cost;