summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_register_allocate.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2015-05-29 18:19:42 -0700
committerEric Anholt <eric@anholt.net>2015-05-29 22:09:53 -0700
commit78c773bb3646295e4a4f1fe7d6d10f05758ee48b (patch)
tree03c7c8693810c71bf4a5a90ee8781fc2670d1426 /src/gallium/drivers/vc4/vc4_register_allocate.c
parent21a22a61c02a1d1807ff03df8eb8fa16ebdd1b74 (diff)
downloadexternal_mesa3d-78c773bb3646295e4a4f1fe7d6d10f05758ee48b.zip
external_mesa3d-78c773bb3646295e4a4f1fe7d6d10f05758ee48b.tar.gz
external_mesa3d-78c773bb3646295e4a4f1fe7d6d10f05758ee48b.tar.bz2
vc4: Convert from simple_list.h to list.h
list.h is a nicer and more familiar set of list functions/macros.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_register_allocate.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_register_allocate.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/gallium/drivers/vc4/vc4_register_allocate.c b/src/gallium/drivers/vc4/vc4_register_allocate.c
index f40547b..3b0b890 100644
--- a/src/gallium/drivers/vc4/vc4_register_allocate.c
+++ b/src/gallium/drivers/vc4/vc4_register_allocate.c
@@ -161,7 +161,6 @@ node_to_temp_priority(const void *in_a, const void *in_b)
struct qpu_reg *
vc4_register_allocate(struct vc4_context *vc4, struct vc4_compile *c)
{
- struct simple_node *node;
struct node_to_temp_map map[c->num_temps];
uint32_t temp_to_node[c->num_temps];
uint32_t def[c->num_temps];
@@ -189,9 +188,7 @@ vc4_register_allocate(struct vc4_context *vc4, struct vc4_compile *c)
/* Compute the live ranges so we can figure out interference.
*/
uint32_t ip = 0;
- foreach(node, &c->instructions) {
- struct qinst *inst = (struct qinst *)node;
-
+ list_for_each_entry(struct qinst, inst, &c->instructions, link) {
if (inst->dst.file == QFILE_TEMP) {
def[inst->dst.index] = ip;
use[inst->dst.index] = ip;
@@ -227,9 +224,7 @@ vc4_register_allocate(struct vc4_context *vc4, struct vc4_compile *c)
}
/* Figure out our register classes and preallocated registers*/
- foreach(node, &c->instructions) {
- struct qinst *inst = (struct qinst *)node;
-
+ list_for_each_entry(struct qinst, inst, &c->instructions, link) {
switch (inst->op) {
case QOP_FRAG_Z:
ra_set_node_reg(g, temp_to_node[inst->dst.index],