[Mesa-dev] [PATCH] i965/fs: Copy propagate from load_payload.

Matt Turner mattst88 at gmail.com
Tue Jun 10 16:26:18 PDT 2014


---
I'm planning to squash this in to make Abdiel's patches easier
to merge.

 src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
index ee601c7..cc6e86f 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
@@ -42,7 +42,7 @@ namespace { /* avoid conflict with opt_copy_propagation_elements */
 struct acp_entry : public exec_node {
    fs_reg dst;
    fs_reg src;
-   bool is_from_load_payload;
+   enum opcode opcode;
 };
 
 struct block_data {
@@ -288,7 +288,7 @@ fs_visitor::try_copy_propagate(fs_inst *inst, int arg, acp_entry *entry)
    if (entry->src.file == IMM)
       return false;
 
-   if (entry->is_from_load_payload &&
+   if (entry->opcode == SHADER_OPCODE_LOAD_PAYLOAD &&
        inst->opcode == SHADER_OPCODE_LOAD_PAYLOAD)
       return false;
 
@@ -574,7 +574,7 @@ fs_visitor::opt_copy_propagate_local(void *copy_prop_ctx, bblock_t *block,
 	 acp_entry *entry = ralloc(copy_prop_ctx, acp_entry);
 	 entry->dst = inst->dst;
 	 entry->src = inst->src[0];
-         entry->is_from_load_payload = false;
+         entry->opcode = inst->opcode;
 	 acp[entry->dst.reg % ACP_HASH_SIZE].push_tail(entry);
       } else if (inst->opcode == SHADER_OPCODE_LOAD_PAYLOAD &&
                  inst->dst.file == GRF) {
@@ -584,7 +584,7 @@ fs_visitor::opt_copy_propagate_local(void *copy_prop_ctx, bblock_t *block,
                entry->dst = inst->dst;
                entry->dst.reg_offset = i;
                entry->src = inst->src[i];
-               entry->is_from_load_payload = true;
+               entry->opcode = inst->opcode;
                if (!entry->dst.equals(inst->src[i])) {
                   acp[entry->dst.reg % ACP_HASH_SIZE].push_tail(entry);
                } else {
-- 
1.8.3.2



More information about the mesa-dev mailing list