nir: add nir_foreach_instr_safe_reverse()
authorConnor Abbott <connor.w.abbott@intel.com>
Wed, 15 Jul 2015 19:01:20 +0000 (12:01 -0700)
committerConnor Abbott <connor.w.abbott@intel.com>
Fri, 17 Jul 2015 16:49:53 +0000 (09:49 -0700)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Signed-off-by: Connor Abbott <connor.w.abbott@intel.com>
src/glsl/nir/nir.h

index 0db1fc3076e18d624d52f8dd7d5b6d7dd3e12e80..62cdbd4a5fbb6ef2b2b5ba900e4033fee8ea5d16 100644 (file)
@@ -1233,6 +1233,8 @@ nir_block_last_instr(nir_block *block)
    foreach_list_typed_reverse(nir_instr, instr, node, &(block)->instr_list)
 #define nir_foreach_instr_safe(block, instr) \
    foreach_list_typed_safe(nir_instr, instr, node, &(block)->instr_list)
+#define nir_foreach_instr_safe_reverse(block, instr) \
+   foreach_list_typed_safe_reverse(nir_instr, instr, node, &(block)->instr_list)
 
 typedef struct nir_if {
    nir_cf_node cf_node;