From: Connor Abbott Date: Wed, 15 Jul 2015 19:01:20 +0000 (-0700) Subject: nir: add nir_foreach_instr_safe_reverse() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eaf799ddff9f2583d6dee5a0db36fa0a1162fde6;p=mesa.git nir: add nir_foreach_instr_safe_reverse() Reviewed-by: Kenneth Graunke Reviewed-by: Jason Ekstrand Signed-off-by: Connor Abbott --- diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h index 0db1fc3076e..62cdbd4a5fb 100644 --- a/src/glsl/nir/nir.h +++ b/src/glsl/nir/nir.h @@ -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;