i965: Fix Crystal Well PCI IDs.
[mesa.git] / src / mesa / program / register_allocate.c
index 97d4e331c910c3eefb0b12e06e6825ea0cdd5a7a..88793dbdc1e2f7e7831f51d1566bd8f1613f8729 100644 (file)
@@ -555,6 +555,13 @@ ra_get_best_spill_node(struct ra_graph *g)
       if (cost <= 0.0)
         continue;
 
+      /* Only consider registers for spilling if they are still in the
+       * interference graph (those on the stack have already been proven to be
+       * allocatable without spilling).
+       */
+      if (g->nodes[n].in_stack)
+         continue;
+
       benefit = ra_get_spill_benefit(g, n);
 
       if (benefit / cost > best_benefit) {