From: Jason Ekstrand Date: Wed, 14 Dec 2016 04:54:38 +0000 (-0800) Subject: nir: Add foreach_register helper macros X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=baf1aa1334c61d505cde7e132b5f1bf4fa44a22c;p=mesa.git nir: Add foreach_register helper macros --- 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,