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:
Francisco Jerez
2016-03-13 16:33:39 -07:00
committed by Matt Turner
parent ea44de6d8c
commit acf24df201
8 changed files with 29 additions and 57 deletions

View File

@@ -201,8 +201,7 @@ vec4_visitor::reg_allocate()
if (0)
return reg_allocate_trivial();
calculate_live_intervals();
const vec4_live_variables &live = live_analysis.require();
int node_count = alloc.count;
int first_payload_node = node_count;
node_count += payload_reg_count;
@@ -215,7 +214,7 @@ vec4_visitor::reg_allocate()
ra_set_node_class(g, i, compiler->vec4_reg_set.classes[size - 1]);
for (unsigned j = 0; j < i; j++) {
if (live_intervals->vgrfs_interfere(i, j)) {
if (live.vgrfs_interfere(i, j)) {
ra_add_node_interference(g, i, j);
}
}