From baf1aa1334c61d505cde7e132b5f1bf4fa44a22c Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 13 Dec 2016 20:54:38 -0800 Subject: [PATCH] nir: Add foreach_register helper macros --- src/compiler/nir/nir.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index c97eff5fbbc..71983be0344 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -373,6 +373,11 @@ typedef struct nir_register { struct list_head if_uses; } nir_register; +#define nir_foreach_register(reg, reg_list) \ + foreach_list_typed(nir_register, reg, node, reg_list) +#define nir_foreach_register_safe(reg, reg_list) \ + foreach_list_typed_safe(nir_register, reg, node, reg_list) + typedef enum { nir_instr_type_alu, nir_instr_type_call, -- 2.30.2