aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-12-13 20:54:38 -0800
committerJason Ekstrand <[email protected]>2016-12-29 16:02:44 -0800
commitbaf1aa1334c61d505cde7e132b5f1bf4fa44a22c (patch)
treeb13d3fbf7fa63a77f4ecb97f5642d0b811c9423d /src/compiler
parentfb181196deac2e3a070c49a29803e53cc7cc7f9b (diff)
nir: Add foreach_register helper macros
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/nir/nir.h5
1 files changed, 5 insertions, 0 deletions
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,