vc4: Add a "qir_for_each_inst_inorder" macro and use it in many places.
authorEric Anholt <eric@anholt.net>
Fri, 8 Jul 2016 22:24:34 +0000 (15:24 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 12 Jul 2016 22:47:25 +0000 (15:47 -0700)
commitd3cdbf6fd817ae5e7a8a72bcc3f43cc1b04a709b
treeab412a1f54b31304e5d0ed1df2d5e4e188916d52
parent6858f059246b2cf6b969b050154dcb7307a03833
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)
12 files changed:
src/gallium/drivers/vc4/vc4_opt_algebraic.c
src/gallium/drivers/vc4/vc4_opt_constant_folding.c
src/gallium/drivers/vc4/vc4_opt_copy_propagation.c
src/gallium/drivers/vc4/vc4_opt_small_immediates.c
src/gallium/drivers/vc4/vc4_opt_vpm.c
src/gallium/drivers/vc4/vc4_program.c
src/gallium/drivers/vc4/vc4_qir.h
src/gallium/drivers/vc4/vc4_qir_lower_uniforms.c
src/gallium/drivers/vc4/vc4_qir_validate.c
src/gallium/drivers/vc4/vc4_qpu_emit.c
src/gallium/drivers/vc4/vc4_register_allocate.c
src/gallium/drivers/vc4/vc4_reorder_uniforms.c