bi: Add bi_foreach_ssa_dest

Will be used for DCE and helper invocations pass changes.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30484>
This commit is contained in:
Mary Guillemard
2024-08-02 09:42:33 +02:00
parent 091df61138
commit 90d6457eba
2 changed files with 5 additions and 0 deletions

View File

@@ -309,6 +309,7 @@ ForEachMacros:
- bi_foreach_instr_in_tuple
- bi_foreach_predecessor
- bi_foreach_src
- bi_foreach_ssa_dest
- bi_foreach_ssa_src
- bi_foreach_successor
- cs_emit

View File

@@ -1051,6 +1051,10 @@ bi_src_index(nir_src *src)
for (unsigned v = 0; v < ins->nr_srcs; ++v) \
if (ins->src[v].type == BI_INDEX_NORMAL)
#define bi_foreach_ssa_dest(ins, v) \
bi_foreach_dest(ins, v) \
if (ins->dest[v].type == BI_INDEX_NORMAL)
#define bi_foreach_instr_and_src_in_tuple(tuple, ins, s) \
bi_foreach_instr_in_tuple(tuple, ins) \
bi_foreach_src(ins, s)