glsl: Rename safe_reverse -> reverse_safe.
authorMatt Turner <mattst88@gmail.com>
Mon, 30 Nov 2015 17:24:23 +0000 (09:24 -0800)
committerMatt Turner <mattst88@gmail.com>
Tue, 1 Dec 2015 22:48:55 +0000 (14:48 -0800)
To match existing foreach_in_list_reverse_safe.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
src/glsl/list.h
src/glsl/nir/nir.c
src/glsl/nir/nir.h

index 15fcd4abd1c486ded6e39a049c27a7fc60e1b32c..a1c4d82b01725269c0ad53a453146837c175ba5c 100644 (file)
@@ -688,7 +688,7 @@ inline void exec_node::insert_before(exec_list *before)
         __node = __next, __next =                                          \
            exec_node_data(__type, (__next)->__field.next, __field))
 
-#define foreach_list_typed_safe_reverse(__type, __node, __field, __list)   \
+#define foreach_list_typed_reverse_safe(__type, __node, __field, __list)   \
    for (__type * __node =                                                  \
            exec_node_data(__type, (__list)->tail_pred, __field),           \
                * __prev =                                                  \
index bfec11e53fffa8b24ca7e84c23887c19ff5f1b90..35fc1de2e01c1f91a40b1b5b7c5870dedd272125 100644 (file)
@@ -1376,13 +1376,13 @@ static inline bool
 foreach_if(nir_if *if_stmt, nir_foreach_block_cb cb, bool reverse, void *state)
 {
    if (reverse) {
-      foreach_list_typed_safe_reverse(nir_cf_node, node, node,
+      foreach_list_typed_reverse_safe(nir_cf_node, node, node,
                                       &if_stmt->else_list) {
          if (!foreach_cf_node(node, cb, reverse, state))
             return false;
       }
 
-      foreach_list_typed_safe_reverse(nir_cf_node, node, node,
+      foreach_list_typed_reverse_safe(nir_cf_node, node, node,
                                       &if_stmt->then_list) {
          if (!foreach_cf_node(node, cb, reverse, state))
             return false;
@@ -1406,7 +1406,7 @@ static inline bool
 foreach_loop(nir_loop *loop, nir_foreach_block_cb cb, bool reverse, void *state)
 {
    if (reverse) {
-      foreach_list_typed_safe_reverse(nir_cf_node, node, node, &loop->body) {
+      foreach_list_typed_reverse_safe(nir_cf_node, node, node, &loop->body) {
          if (!foreach_cf_node(node, cb, reverse, state))
             return false;
       }
@@ -1466,7 +1466,7 @@ nir_foreach_block_reverse(nir_function_impl *impl, nir_foreach_block_cb cb,
    if (!cb(impl->end_block, state))
       return false;
 
-   foreach_list_typed_safe_reverse(nir_cf_node, node, node, &impl->body) {
+   foreach_list_typed_reverse_safe(nir_cf_node, node, node, &impl->body) {
       if (!foreach_cf_node(node, cb, true, state))
          return false;
    }
index 524717a0fda9ab6e317263b9bb513b9473d90be7..e161b70fa186d8b17f28838a8fcd0cf75d720c53 100644 (file)
@@ -1276,8 +1276,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)
+#define nir_foreach_instr_reverse_safe(block, instr) \
+   foreach_list_typed_reverse_safe(nir_instr, instr, node, &(block)->instr_list)
 
 typedef struct nir_if {
    nir_cf_node cf_node;