diff options
author | Kenneth Graunke <[email protected]> | 2013-08-06 02:17:24 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2013-10-10 15:54:15 -0700 |
commit | 4b821a97b5fcdc4c530d5455c43196be09830322 (patch) | |
tree | 888ba829138508d624ac04b52ee030c1b76461a7 /src | |
parent | 45ffaeccaf412f322605a7c7488c6ab0d85fc4b6 (diff) |
i965/fs: Create a helper function for invalidating live intervals.
For now, this simply sets live_intervals_valid = false, but in the
future it will do something more sophisticated.
Based on a patch by Eric Anholt.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 21 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.h | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_cse.cpp | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp | 6 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp | 2 |
7 files changed, 21 insertions, 15 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 02383363d43..d1aed42966a 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -1443,7 +1443,7 @@ fs_visitor::split_virtual_grfs() } } } - this->live_intervals_valid = false; + invalidate_live_intervals(); } /** @@ -1868,7 +1868,7 @@ fs_visitor::dead_code_eliminate() } if (progress) - live_intervals_valid = false; + invalidate_live_intervals(); return progress; } @@ -2026,7 +2026,7 @@ fs_visitor::dead_code_eliminate_local() _mesa_hash_table_destroy(ht, NULL); if (progress) - live_intervals_valid = false; + invalidate_live_intervals(); return progress; } @@ -2085,9 +2085,8 @@ fs_visitor::register_coalesce_2() inst->remove(); /* We don't need to recalculate live intervals inside the loop despite - * flagging live_intervals_valid because we only use live intervals for - * the interferes test, and we must have had a situation where the - * intervals were: + * invalidating them; we only use them for the interferes test, and we + * must have had a situation where the intervals were: * * from to * ^ @@ -2103,7 +2102,7 @@ fs_visitor::register_coalesce_2() * otherwise it will conflict with "to" when we try to coalesce "to" * into Rw anyway. */ - live_intervals_valid = false; + invalidate_live_intervals(); progress = true; continue; @@ -2244,7 +2243,7 @@ fs_visitor::register_coalesce() } if (progress) - live_intervals_valid = false; + invalidate_live_intervals(); return progress; } @@ -2407,7 +2406,7 @@ fs_visitor::compute_to_mrf() } if (progress) - live_intervals_valid = false; + invalidate_live_intervals(); return progress; } @@ -2478,7 +2477,7 @@ fs_visitor::remove_duplicate_mrf_writes() } if (progress) - live_intervals_valid = false; + invalidate_live_intervals(); return progress; } @@ -2745,7 +2744,7 @@ fs_visitor::lower_uniform_pull_constant_loads() inst->opcode = FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD_GEN7; inst->src[1] = payload; - this->live_intervals_valid = false; + invalidate_live_intervals(); } else { /* Before register allocation, we didn't tell the scheduler about the * MRF we use. We know it's safe to use this MRF because nothing diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index 5c7089daff1..c8f10c39ea6 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.h +++ b/src/mesa/drivers/dri/i965/brw_fs.h @@ -290,6 +290,7 @@ public: void compact_virtual_grfs(); void move_uniform_array_access_to_pull_constants(); void setup_pull_constants(); + void invalidate_live_intervals(); void calculate_live_intervals(); bool opt_algebraic(); bool opt_cse(); 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 5acef207af3..fb6fe184f33 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp @@ -562,7 +562,7 @@ fs_visitor::opt_copy_propagate() ralloc_free(mem_ctx); if (progress) - live_intervals_valid = false; + invalidate_live_intervals(); return progress; } diff --git a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp index 61b3aeb5ac1..d8ed4be7b0a 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp @@ -209,7 +209,7 @@ fs_visitor::opt_cse_local(bblock_t *block, exec_list *aeb) ralloc_free(mem_ctx); if (progress) - this->live_intervals_valid = false; + invalidate_live_intervals(); return progress; } diff --git a/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp b/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp index 4e9825f1e7c..099eeaa0bbb 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp @@ -197,6 +197,12 @@ fs_live_variables::~fs_live_variables() #define MAX_INSTRUCTION (1 << 30) +void +fs_visitor::invalidate_live_intervals() +{ + this->live_intervals_valid = false; +} + /** * Compute the live intervals for each virtual GRF. * diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp index b9102d97e1f..68501021eed 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp @@ -658,5 +658,5 @@ fs_visitor::spill_reg(int spill_reg) } } - this->live_intervals_valid = false; + invalidate_live_intervals(); } diff --git a/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp b/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp index 5530683df84..735ad93561e 100644 --- a/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp +++ b/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp @@ -1138,7 +1138,7 @@ fs_visitor::schedule_instructions(bool post_reg_alloc) dispatch_width, sched.time); } - this->live_intervals_valid = false; + invalidate_live_intervals(); } void |