diff options
author | Matt Turner <[email protected]> | 2014-07-11 20:36:39 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-07-14 11:27:52 -0700 |
commit | aba15d93a64e4f6619f641e252a7bc6c43442a29 (patch) | |
tree | 4cefcbeb71da22707676e2d3cdfc35618a759048 | |
parent | 1ca6b5d2e8a32644a5ddd6c6c0ec0193e6f7e772 (diff) |
i965/vec4: Move aeb list into opt_cse_local.
Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4.h | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_cse.cpp | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h index 87247ea1ec2..3d0df7785eb 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.h +++ b/src/mesa/drivers/dri/i965/brw_vec4.h @@ -384,7 +384,7 @@ public: bool dead_code_eliminate(); bool virtual_grf_interferes(int a, int b); bool opt_copy_propagation(); - bool opt_cse_local(bblock_t *, exec_list *); + bool opt_cse_local(bblock_t *block); bool opt_cse(); bool opt_algebraic(); bool opt_register_coalesce(); diff --git a/src/mesa/drivers/dri/i965/brw_vec4_cse.cpp b/src/mesa/drivers/dri/i965/brw_vec4_cse.cpp index eeaa743e15f..7bb016dcce2 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_cse.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_cse.cpp @@ -124,9 +124,10 @@ instructions_match(vec4_instruction *a, vec4_instruction *b) } bool -vec4_visitor::opt_cse_local(bblock_t *block, exec_list *aeb) +vec4_visitor::opt_cse_local(bblock_t *block) { bool progress = false; + exec_list aeb; void *cse_ctx = ralloc_context(NULL); @@ -141,7 +142,7 @@ vec4_visitor::opt_cse_local(bblock_t *block, exec_list *aeb) { bool found = false; - foreach_in_list_use_after(aeb_entry, entry, aeb) { + foreach_in_list_use_after(aeb_entry, entry, &aeb) { /* Match current instruction's expression against those in AEB. */ if (instructions_match(inst, entry->generator)) { found = true; @@ -155,7 +156,7 @@ vec4_visitor::opt_cse_local(bblock_t *block, exec_list *aeb) aeb_entry *entry = ralloc(cse_ctx, aeb_entry); entry->tmp = src_reg(); /* file will be BAD_FILE */ entry->generator = inst; - aeb->push_tail(entry); + aeb.push_tail(entry); } else { /* This is at least our second sighting of this expression. * If we don't have a temporary already, make one. @@ -196,7 +197,7 @@ vec4_visitor::opt_cse_local(bblock_t *block, exec_list *aeb) } } - foreach_in_list_safe(aeb_entry, entry, aeb) { + foreach_in_list_safe(aeb_entry, entry, &aeb) { /* Kill all AEB entries that write a different value to or read from * the flag register if we just wrote it. */ @@ -260,9 +261,8 @@ vec4_visitor::opt_cse() for (int b = 0; b < cfg.num_blocks; b++) { bblock_t *block = cfg.blocks[b]; - exec_list aeb; - progress = opt_cse_local(block, &aeb) || progress; + progress = opt_cse_local(block) || progress; } return progress; |