From 90d6457eba4b88229beae64c94ee8e33753313c0 Mon Sep 17 00:00:00 2001 From: Mary Guillemard Date: Fri, 2 Aug 2024 09:42:33 +0200 Subject: [PATCH] bi: Add bi_foreach_ssa_dest Will be used for DCE and helper invocations pass changes. Signed-off-by: Mary Guillemard Reviewed-by: Boris Brezillon Part-of: --- src/.clang-format | 1 + src/panfrost/compiler/compiler.h | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/.clang-format b/src/.clang-format index 63eb3802324..daeebdd3ce1 100644 --- a/src/.clang-format +++ b/src/.clang-format @@ -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 diff --git a/src/panfrost/compiler/compiler.h b/src/panfrost/compiler/compiler.h index a4a3f53dad2..67cb6c39951 100644 --- a/src/panfrost/compiler/compiler.h +++ b/src/panfrost/compiler/compiler.h @@ -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)