summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_opt_copy_propagation.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2016-07-08 15:24:34 -0700
committerEric Anholt <eric@anholt.net>2016-07-12 15:47:25 -0700
commitd3cdbf6fd817ae5e7a8a72bcc3f43cc1b04a709b (patch)
treeab412a1f54b31304e5d0ed1df2d5e4e188916d52 /src/gallium/drivers/vc4/vc4_opt_copy_propagation.c
parent6858f059246b2cf6b969b050154dcb7307a03833 (diff)
downloadexternal_mesa3d-d3cdbf6fd817ae5e7a8a72bcc3f43cc1b04a709b.zip
external_mesa3d-d3cdbf6fd817ae5e7a8a72bcc3f43cc1b04a709b.tar.gz
external_mesa3d-d3cdbf6fd817ae5e7a8a72bcc3f43cc1b04a709b.tar.bz2
vc4: Add a "qir_for_each_inst_inorder" macro and use it in many places.
We have the prior list_foreach() all over the code, but I need to move where instructions live as part of adding support for control flow. Start by just converting to a helper iterator macro. (The simpler "qir_for_each_inst()" will be used for the for-each-inst-in-a-block iterator macro later)
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_opt_copy_propagation.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_opt_copy_propagation.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc4/vc4_opt_copy_propagation.c b/src/gallium/drivers/vc4/vc4_opt_copy_propagation.c
index 0eee5c3..a180f04 100644
--- a/src/gallium/drivers/vc4/vc4_opt_copy_propagation.c
+++ b/src/gallium/drivers/vc4/vc4_opt_copy_propagation.c
@@ -40,7 +40,7 @@ qir_opt_copy_propagation(struct vc4_compile *c)
bool progress = false;
bool debug = false;
- list_for_each_entry(struct qinst, inst, &c->instructions, link) {
+ qir_for_each_inst_inorder(inst, c) {
int nsrc = qir_get_op_nsrc(inst->op);
for (int i = 0; i < nsrc; i++) {
if (inst->src[i].file != QFILE_TEMP)