From 8e704dca7f6bf21ca4a3fdbbae928fe17ed0174d Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 10 Nov 2016 14:37:36 -0800 Subject: [PATCH] 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 ab343ee3134..a067fbb33e8 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: -- 2.30.2