aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/program/register_allocate.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-10-04 10:53:47 +0200
committermarha <marha@users.sourceforge.net>2012-10-04 10:53:47 +0200
commit0130346adbce7e6b2422429887fc46c76806d845 (patch)
tree1b88028d42d79ab8062581d361a720b04a87fbc0 /mesalib/src/mesa/program/register_allocate.c
parent7ed9dbafdbc724c1030404f29678559134de559b (diff)
downloadvcxsrv-0130346adbce7e6b2422429887fc46c76806d845.tar.gz
vcxsrv-0130346adbce7e6b2422429887fc46c76806d845.tar.bz2
vcxsrv-0130346adbce7e6b2422429887fc46c76806d845.zip
randrproto mesa pixman git update 4 oct 2012
randrproto: 4fcbd8584e55ff789522a38a41a33c34446d1455 mesa: 185d6df3c10a7ff5defe163af614bfc41088910b pixman: 2e17b6dd4ee7c32684fb7ffc70d3ad3ebf7cb2ef
Diffstat (limited to 'mesalib/src/mesa/program/register_allocate.c')
-rw-r--r--mesalib/src/mesa/program/register_allocate.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mesalib/src/mesa/program/register_allocate.c b/mesalib/src/mesa/program/register_allocate.c
index 97d4e331c..88793dbdc 100644
--- a/mesalib/src/mesa/program/register_allocate.c
+++ b/mesalib/src/mesa/program/register_allocate.c
@@ -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) {