summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2012-09-03 08:25:13 -0400
committerTom Stellard <[email protected]>2012-09-19 19:25:53 -0400
commit9282adcae9b05399ae0e44881db1f8b0e8368d0a (patch)
tree2235049c2e30d7ad143b0ce61bd8be9c2f42bef2 /src
parente0f64a837f58d50b4eb7d3d38ad6f188e767c045 (diff)
r300/compiler: Don't create register classes for inputs
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/r300/compiler/radeon_pair_regalloc.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/gallium/drivers/r300/compiler/radeon_pair_regalloc.c b/src/gallium/drivers/r300/compiler/radeon_pair_regalloc.c
index 85bb248b127..12594c81966 100644
--- a/src/gallium/drivers/r300/compiler/radeon_pair_regalloc.c
+++ b/src/gallium/drivers/r300/compiler/radeon_pair_regalloc.c
@@ -539,7 +539,6 @@ static void do_advanced_regalloc(struct regalloc_state * s)
unsigned int i, j, index, input_node, node_count, node_index;
unsigned int * node_classes;
- unsigned int * input_classes;
struct rc_instruction * inst;
struct rc_list * var_ptr;
struct rc_list * variables;
@@ -554,8 +553,6 @@ static void do_advanced_regalloc(struct regalloc_state * s)
node_count = rc_list_count(variables);
node_classes = memory_pool_malloc(&s->C->Pool,
node_count * sizeof(unsigned int));
- input_classes = memory_pool_malloc(&s->C->Pool,
- s->NumInputs * sizeof(unsigned int));
for (var_ptr = variables, node_index = 0; var_ptr;
var_ptr = var_ptr->Next, node_index++) {
@@ -610,7 +607,7 @@ static void do_advanced_regalloc(struct regalloc_state * s)
rc_for_all_reads_mask(inst, scan_read_callback, s);
}
- /* Create classes for input registers */
+ /* Compute the writemask for inputs. */
for (i = 0; i < s->NumInputs; i++) {
unsigned int chan, class_id, writemask = 0;
for (chan = 0; chan < 4; chan++) {
@@ -619,14 +616,6 @@ static void do_advanced_regalloc(struct regalloc_state * s)
}
}
s->Input[i].Writemask = writemask;
- if (!writemask) {
- continue;
- }
-
- class_id = ra_alloc_reg_class(regs);
- input_classes[i] = class_id;
- ra_class_add_reg(regs, class_id,
- get_reg_id(s->Input[i].Index, writemask));
}
ra_set_finalize(regs, NULL);
@@ -663,8 +652,6 @@ static void do_advanced_regalloc(struct regalloc_state * s)
if (!s->Input[i].Writemask) {
continue;
}
- ra_set_node_class(graph, node_count + input_node,
- input_classes[i]);
for (var_ptr = variables, node_index = 0;
var_ptr; var_ptr = var_ptr->Next, node_index++) {
struct rc_variable * var = var_ptr->Item;