i965: Call insert and remove functions from exec_node directly.
authorMatt Turner <mattst88@gmail.com>
Wed, 3 Sep 2014 00:53:04 +0000 (17:53 -0700)
committerMatt Turner <mattst88@gmail.com>
Wed, 24 Sep 2014 16:42:46 +0000 (09:42 -0700)
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/brw_cfg.cpp
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
src/mesa/drivers/dri/i965/brw_shader.h

index ac6f5e0e801e5f9a872f9ec0a8a1392006e39604..bb49a0ae955b6a0ba659dd9a82c64bd7ebacbf16 100644 (file)
@@ -180,7 +180,7 @@ cfg_t::cfg_t(exec_list *instructions)
 
       switch (inst->opcode) {
       case BRW_OPCODE_IF:
-         inst->remove();
+         inst->exec_node::remove();
          cur->instructions.push_tail(inst);
 
         /* Push our information onto a stack so we can recover from
@@ -203,7 +203,7 @@ cfg_t::cfg_t(exec_list *instructions)
         break;
 
       case BRW_OPCODE_ELSE:
-         inst->remove();
+         inst->exec_node::remove();
          cur->instructions.push_tail(inst);
 
          cur_else = cur;
@@ -226,7 +226,7 @@ cfg_t::cfg_t(exec_list *instructions)
             set_next_block(&cur, cur_endif, ip - 1);
          }
 
-         inst->remove();
+         inst->exec_node::remove();
          cur->instructions.push_tail(inst);
 
          if (cur_else) {
@@ -277,12 +277,12 @@ cfg_t::cfg_t(exec_list *instructions)
             set_next_block(&cur, cur_do, ip - 1);
          }
 
-         inst->remove();
+         inst->exec_node::remove();
          cur->instructions.push_tail(inst);
         break;
 
       case BRW_OPCODE_CONTINUE:
-         inst->remove();
+         inst->exec_node::remove();
          cur->instructions.push_tail(inst);
 
         cur->add_successor(mem_ctx, cur_do);
@@ -295,7 +295,7 @@ cfg_t::cfg_t(exec_list *instructions)
         break;
 
       case BRW_OPCODE_BREAK:
-         inst->remove();
+         inst->exec_node::remove();
          cur->instructions.push_tail(inst);
 
         cur->add_successor(mem_ctx, cur_while);
@@ -308,7 +308,7 @@ cfg_t::cfg_t(exec_list *instructions)
         break;
 
       case BRW_OPCODE_WHILE:
-         inst->remove();
+         inst->exec_node::remove();
          cur->instructions.push_tail(inst);
 
         cur->add_successor(mem_ctx, cur_do);
@@ -320,7 +320,7 @@ cfg_t::cfg_t(exec_list *instructions)
         break;
 
       default:
-         inst->remove();
+         inst->exec_node::remove();
          cur->instructions.push_tail(inst);
         break;
       }
index d32aa1f5e388fa402c071d6a734efdae863feb3d..4f7f69a6ec7d559df7e85171b2f283148cbf1eab 100644 (file)
@@ -2524,8 +2524,8 @@ fs_visitor::try_replace_with_sel()
 
       /* Remove the matched instructions; we'll emit a SEL to replace them. */
       while (!if_inst->next->is_tail_sentinel())
-         if_inst->next->remove();
-      if_inst->remove();
+         if_inst->next->exec_node::remove();
+      if_inst->exec_node::remove();
 
       /* Only the last source register can be a constant, so if the MOV in
        * the "then" clause uses a constant, we need to put it in a temporary.
@@ -2828,7 +2828,7 @@ void
 fs_visitor::emit(exec_list list)
 {
    foreach_in_list_safe(fs_inst, inst, &list) {
-      inst->remove();
+      inst->exec_node::remove();
       emit(inst);
    }
 }
index 35a2b9635a3daf62b91e73d6a479e3d31eeb650a..f0d4f857cf1a52ddd75a23de212c66dc906e2d8c 100644 (file)
@@ -90,11 +90,8 @@ struct backend_instruction : public exec_node {
    bool reads_accumulator_implicitly() const;
    bool writes_accumulator_implicitly(struct brw_context *brw) const;
 
-   using exec_node::remove;
    void remove(bblock_t *block);
-   using exec_node::insert_after;
    void insert_after(bblock_t *block, backend_instruction *inst);
-   using exec_node::insert_before;
    void insert_before(bblock_t *block, backend_instruction *inst);
    void insert_before(bblock_t *block, exec_list *list);