intel/compiler/vec4: Switch liveness analysis to IR analysis framework
This involves wrapping vec4_live_variables in a BRW_ANALYSIS object and hooking it up to invalidate_analysis() so it's properly invalidated. Seems like a lot of churn but it's fairly straightforward. The vec4_visitor invalidate_ and calculate_live_intervals() methods are no longer necessary after this change. Reviewed-by: Matt Turner <mattst88@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4012>
This commit is contained in:
committed by
Matt Turner
parent
ea44de6d8c
commit
acf24df201
@@ -1253,8 +1253,7 @@ vec4_visitor::opt_register_coalesce()
|
||||
{
|
||||
bool progress = false;
|
||||
int next_ip = 0;
|
||||
|
||||
calculate_live_intervals();
|
||||
const vec4_live_variables &live = live_analysis.require();
|
||||
|
||||
foreach_block_and_inst_safe (block, vec4_instruction, inst, cfg) {
|
||||
int ip = next_ip;
|
||||
@@ -1296,8 +1295,7 @@ vec4_visitor::opt_register_coalesce()
|
||||
/* Can't coalesce this GRF if someone else was going to
|
||||
* read it later.
|
||||
*/
|
||||
if (live_intervals->var_range_end(
|
||||
var_from_reg(alloc, dst_reg(inst->src[0])), 8) > ip)
|
||||
if (live.var_range_end(var_from_reg(alloc, dst_reg(inst->src[0])), 8) > ip)
|
||||
continue;
|
||||
|
||||
/* We need to check interference with the final destination between this
|
||||
@@ -2672,6 +2670,7 @@ void
|
||||
vec4_visitor::invalidate_analysis(brw::analysis_dependency_class c)
|
||||
{
|
||||
backend_shader::invalidate_analysis(c);
|
||||
live_analysis.invalidate(c);
|
||||
}
|
||||
|
||||
bool
|
||||
|
||||
Reference in New Issue
Block a user