aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-08-15 09:53:25 -0700
committerAlyssa Rosenzweig <[email protected]>2019-08-19 08:32:17 -0700
commit2f92479ffcfc9119729b55d1f49217c90993bf06 (patch)
tree8f6de2ca0cf388fe58a83316d2b2120a49683902 /src
parent84580c6dbc31a65fe9170e1db3dcecd9bac63ba0 (diff)
pan/midgard: Add mir_foreach_src
This is repeated often enough. Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/panfrost/midgard/compiler.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h
index 6f953d48cb8..217ab317090 100644
--- a/src/panfrost/midgard/compiler.h
+++ b/src/panfrost/midgard/compiler.h
@@ -381,6 +381,9 @@ mir_next_op(struct midgard_instruction *ins)
_entry_##v = _mesa_set_next_entry(blk->predecessors, _entry_##v), \
v = (struct midgard_block *) (_entry_##v ? _entry_##v->key : NULL))
+#define mir_foreach_src(ins, v) \
+ for (unsigned v = 0; v < ARRAY_SIZE(ins->ssa_args.src); ++v)
+
static inline midgard_instruction *
mir_last_in_block(struct midgard_block *block)
{