i965/cfg: Add a foreach_inst_in_block_reverse_safe macro.
authorMatt Turner <mattst88@gmail.com>
Wed, 31 Dec 2014 00:14:43 +0000 (16:14 -0800)
committerMatt Turner <mattst88@gmail.com>
Sat, 24 Jan 2015 01:57:39 +0000 (17:57 -0800)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/mesa/drivers/dri/i965/brw_cfg.h

index 48bca9f918ce765ca10542aaa5fddb1ebea4d673..3b1bd16194cc98ada1d0f32a3e6e76c4fafbf327 100644 (file)
@@ -314,6 +314,9 @@ struct cfg_t {
 #define foreach_inst_in_block_reverse(__type, __inst, __block) \
    foreach_in_list_reverse(__type, __inst, &(__block)->instructions)
 
+#define foreach_inst_in_block_reverse_safe(__type, __inst, __block) \
+   foreach_in_list_reverse_safe(__type, __inst, &(__block)->instructions)
+
 #define foreach_inst_in_block_starting_from(__type, __scan_inst, __inst, __block) \
    for (__type *__scan_inst = (__type *)__inst->next;          \
         !__scan_inst->is_tail_sentinel();                      \