intel/compiler: Move all live interval analysis results into vec4_live_variables
This moves the following methods that are currently defined in vec4_visitor (even though they are side products of the liveness analysis computation) and are already implemented in brw_vec4_live_variables.cpp: > int var_range_start(unsigned v, unsigned n) const; > int var_range_end(unsigned v, unsigned n) const; > bool virtual_grf_interferes(int a, int b) const; > int *virtual_grf_start; > int *virtual_grf_end; It makes sense for them to be part of the vec4_live_variables object, because they have the same lifetime as other liveness analysis results and because this will allow some extra validation to happen wherever they are accessed in order to make sure that we only ever use up-to-date liveness analysis results. The naming of the virtual_grf_start/end arrays was rather misleading, they were indexed by variable rather than by vgrf, this renames them start/end to match the FS liveness analysis pass. The churn in the definition of var_range_start/end is just in order to avoid a collision between the start/end arrays and local variables declared with the same name. 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
ba73e606f6
commit
48dfb30f92
@@ -215,7 +215,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 (virtual_grf_interferes(i, j)) {
|
||||
if (live_intervals->vgrfs_interfere(i, j)) {
|
||||
ra_add_node_interference(g, i, j);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user