Mesa (master): vc4: Use register allocator CLASS_BIT_R0_R3 to clean up CLASS_B.

Eric Anholt anholt at kemper.freedesktop.org
Sun Nov 13 03:24:18 UTC 2016


Module: Mesa
Branch: master
Commit: 8e704dca7f6bf21ca4a3fdbbae928fe17ed0174d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8e704dca7f6bf21ca4a3fdbbae928fe17ed0174d

Author: Eric Anholt <eric at anholt.net>
Date:   Thu Nov 10 14:37:36 2016 -0800

vc4: Use register allocator CLASS_BIT_R0_R3 to clean up CLASS_B.

We have had no reason to separate ability to store in an accumulator from
ability to store in B, but with FS threading, we need to be able to force
values to be stored only in the physical regfiles.

---

 src/gallium/drivers/vc4/vc4_register_allocate.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/vc4/vc4_register_allocate.c b/src/gallium/drivers/vc4/vc4_register_allocate.c
index ab343ee..a067fbb 100644
--- a/src/gallium/drivers/vc4/vc4_register_allocate.c
+++ b/src/gallium/drivers/vc4/vc4_register_allocate.c
@@ -166,7 +166,7 @@ node_to_temp_priority(const void *in_a, const void *in_b)
 }
 
 #define CLASS_BIT_A			(1 << 0)
-#define CLASS_BIT_B_OR_ACC		(1 << 1)
+#define CLASS_BIT_B			(1 << 1)
 #define CLASS_BIT_R4			(1 << 2)
 #define CLASS_BIT_R0_R3			(1 << 4)
 
@@ -212,7 +212,7 @@ vc4_register_allocate(struct vc4_context *vc4, struct vc4_compile *c)
          * incrementally remove bits that the temp definitely can't be in.
          */
         memset(class_bits,
-               CLASS_BIT_A | CLASS_BIT_B_OR_ACC | CLASS_BIT_R4,
+               CLASS_BIT_A | CLASS_BIT_B | CLASS_BIT_R4 | CLASS_BIT_R0_R3,
                sizeof(class_bits));
 
         int ip = 0;
@@ -285,10 +285,10 @@ vc4_register_allocate(struct vc4_context *vc4, struct vc4_compile *c)
                 int node = temp_to_node[i];
 
                 switch (class_bits[i]) {
-                case CLASS_BIT_A | CLASS_BIT_B_OR_ACC | CLASS_BIT_R4:
+                case CLASS_BIT_A | CLASS_BIT_B | CLASS_BIT_R4 | CLASS_BIT_R0_R3:
                         ra_set_node_class(g, node, vc4->reg_class_any);
                         break;
-                case CLASS_BIT_A | CLASS_BIT_B_OR_ACC:
+                case CLASS_BIT_A | CLASS_BIT_B | CLASS_BIT_R0_R3:
                         ra_set_node_class(g, node, vc4->reg_class_a_or_b_or_acc);
                         break;
                 case CLASS_BIT_A | CLASS_BIT_R4:




More information about the mesa-commit mailing list