diff --git a/.pick_status.json b/.pick_status.json index 957f89b4dac..e4f742b79a5 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1404,7 +1404,7 @@ "description": "brw: Track the largest VGRF size in liveness analysis", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/intel/compiler/brw_fs_live_variables.cpp b/src/intel/compiler/brw_fs_live_variables.cpp index 6197fa59d97..1e09476aef2 100644 --- a/src/intel/compiler/brw_fs_live_variables.cpp +++ b/src/intel/compiler/brw_fs_live_variables.cpp @@ -254,10 +254,13 @@ fs_live_variables::fs_live_variables(const fs_visitor *s) num_vgrfs = s->alloc.count; num_vars = 0; + max_vgrf_size = 0; var_from_vgrf = linear_alloc_array(lin_ctx, int, num_vgrfs); for (int i = 0; i < num_vgrfs; i++) { var_from_vgrf[i] = num_vars; num_vars += s->alloc.sizes[i]; + + max_vgrf_size = MAX2(max_vgrf_size, s->alloc.sizes[i]); } vgrf_from_var = linear_alloc_array(lin_ctx, int, num_vars); diff --git a/src/intel/compiler/brw_fs_live_variables.h b/src/intel/compiler/brw_fs_live_variables.h index 60ecca43c96..8b64290b0a8 100644 --- a/src/intel/compiler/brw_fs_live_variables.h +++ b/src/intel/compiler/brw_fs_live_variables.h @@ -111,6 +111,8 @@ public: int num_vgrfs; int bitset_words; + unsigned max_vgrf_size; + /** @{ * Final computed live ranges for each var (each component of each virtual * GRF).