pan/midgard: Don't use no_spill for memory spill src
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 6 Dec 2019 20:28:08 +0000 (15:28 -0500)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 12 Dec 2019 16:42:07 +0000 (11:42 -0500)
I'm not totally sure why this would *break* things, but it's certainly
not necessary and it does break things. Somehow this gives the RA more
freedom, fixing some spill issues.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/panfrost/midgard/midgard_ra.c

index 9749ebb9ceba0566e1aa0d04c84e17ce3bf852f2..2fe406d6e7aec77e495942ead488594136428f36 100644 (file)
@@ -691,8 +691,10 @@ mir_choose_spill_node(
                 if (ins->no_spill & (1 << l->spill_class)) {
                         lcra_set_node_spill_cost(l, ins->dest, -1);
 
-                        mir_foreach_src(ins, s)
-                                lcra_set_node_spill_cost(l, ins->src[s], -1);
+                        if (l->spill_class != REG_CLASS_WORK) {
+                                mir_foreach_src(ins, s)
+                                        lcra_set_node_spill_cost(l, ins->src[s], -1);
+                        }
                 }
         }