i965/vec4: Make try_copy_propagate() static.
authorMatt Turner <mattst88@gmail.com>
Tue, 24 Jun 2014 05:16:02 +0000 (22:16 -0700)
committerMatt Turner <mattst88@gmail.com>
Wed, 25 Jun 2014 20:00:56 +0000 (13:00 -0700)
Now that can_do_source_mods() isn't part of the visitor, this doesn't
need to be either.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_vec4.h
src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp

index 554e0450e71b69147bc265bc11e991da95b87e8b..366198c115fa8f1dce2fb9f0c58030e972b7bf86 100644 (file)
@@ -496,9 +496,6 @@ public:
                               vec4_instruction *pre_rhs_inst,
                               vec4_instruction *last_rhs_inst);
 
-   bool try_copy_propagate(vec4_instruction *inst, int arg,
-                           src_reg *values[4]);
-
    /** Walks an exec_list of ir_instruction and sends it through this visitor. */
    void visit_instructions(const exec_list *list);
 
index d992a864fc19116cbefda8df2aef91c2c761aeac..2019d157df95d9bdaf15762e07d4667f7d35d12f 100644 (file)
@@ -211,9 +211,9 @@ is_logic_op(enum opcode opcode)
            opcode == BRW_OPCODE_NOT);
 }
 
-bool
-vec4_visitor::try_copy_propagate(vec4_instruction *inst, int arg,
-                                 src_reg *values[4])
+static bool
+try_copy_propagate(struct brw_context *brw, vec4_instruction *inst,
+                   int arg, src_reg *values[4])
 {
    /* For constant propagation, we only handle the same constant
     * across all 4 channels.  Some day, we should handle the 8-bit
@@ -368,7 +368,7 @@ vec4_visitor::opt_copy_propagation()
            continue;
 
         if (try_constant_propagate(brw, inst, i, values) ||
-            try_copy_propagate(inst, i, values))
+            try_copy_propagate(brw, inst, i, values))
            progress = true;
       }