diff options
author | Eric Anholt <eric@anholt.net> | 2016-07-08 15:24:34 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2016-07-12 15:47:25 -0700 |
commit | d3cdbf6fd817ae5e7a8a72bcc3f43cc1b04a709b (patch) | |
tree | ab412a1f54b31304e5d0ed1df2d5e4e188916d52 /src/gallium/drivers/vc4/vc4_qir.h | |
parent | 6858f059246b2cf6b969b050154dcb7307a03833 (diff) |
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_qir.h')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_qir.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qir.h b/src/gallium/drivers/vc4/vc4_qir.h index 2f4b71a3dfa..315f403e43b 100644 --- a/src/gallium/drivers/vc4/vc4_qir.h +++ b/src/gallium/drivers/vc4/vc4_qir.h @@ -719,4 +719,7 @@ qir_LOAD_IMM(struct vc4_compile *c, uint32_t val) qir_reg(QFILE_LOAD_IMM, val), c->undef)); } +#define qir_for_each_inst_inorder(inst, c) \ + list_for_each_entry(struct qinst, inst, &c->instructions, link) + #endif /* VC4_QIR_H */ |