summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2014-07-11 20:35:31 -0700
committerMatt Turner <[email protected]>2014-07-14 11:27:52 -0700
commitbdbaa9ab5be23861fdab3dca38c0728cc9ee24bc (patch)
treed0e80216f6d20c328f5ee4fda0745187fd672006 /src/mesa
parent0f679f0ab5afc8c1469453b922d37ae7216136a4 (diff)
i965/fs: Move aeb list into opt_cse_local.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.h2
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_cse.cpp12
2 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h
index 6f169dcf4c8..9c76bd236b1 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_fs.h
@@ -334,7 +334,7 @@ public:
void calculate_register_pressure();
bool opt_algebraic();
bool opt_cse();
- bool opt_cse_local(bblock_t *block, exec_list *aeb);
+ bool opt_cse_local(bblock_t *block);
bool opt_copy_propagate();
bool try_copy_propagate(fs_inst *inst, int arg, acp_entry *entry);
bool opt_copy_propagate_local(void *mem_ctx, bblock_t *block,
diff --git a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
index 57278011580..90a8a143691 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
@@ -166,9 +166,10 @@ instructions_match(fs_inst *a, fs_inst *b)
}
bool
-fs_visitor::opt_cse_local(bblock_t *block, exec_list *aeb)
+fs_visitor::opt_cse_local(bblock_t *block)
{
bool progress = false;
+ exec_list aeb;
void *cse_ctx = ralloc_context(NULL);
@@ -180,7 +181,7 @@ fs_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;
@@ -194,7 +195,7 @@ fs_visitor::opt_cse_local(bblock_t *block, exec_list *aeb)
aeb_entry *entry = ralloc(cse_ctx, aeb_entry);
entry->tmp = reg_undef;
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.
@@ -264,7 +265,7 @@ fs_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.
*/
@@ -322,9 +323,8 @@ fs_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;