From: Kenneth Graunke Date: Tue, 6 Aug 2013 08:12:54 +0000 (-0700) Subject: i965/fs: Rename num_vars to num_vgrfs in live interval analysis. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5af8388110595f6324d697f0b468047c779f1079;p=mesa.git i965/fs: Rename num_vars to num_vgrfs in live interval analysis. num_vars was shorthand for the number of virtual GRFs. num_vgrfs is a bit clearer. Plus, the next patch will introduce "vars" which are distinct from vgrfs. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- 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 18ba30aad6b..8abed8fdfbd 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp @@ -138,7 +138,7 @@ fs_live_variables::fs_live_variables(fs_visitor *v, cfg_t *cfg) { mem_ctx = ralloc_context(cfg->mem_ctx); - num_vars = v->virtual_grf_count; + num_vgrfs = v->virtual_grf_count; bd = rzalloc_array(mem_ctx, struct block_data, cfg->num_blocks); bitset_words = BITSET_WORDS(v->virtual_grf_count); @@ -163,19 +163,18 @@ fs_live_variables::~fs_live_variables() void fs_visitor::calculate_live_intervals() { - int num_vars = this->virtual_grf_count; - if (this->live_intervals_valid) return; - int *start = ralloc_array(mem_ctx, int, num_vars); - int *end = ralloc_array(mem_ctx, int, num_vars); + int num_vgrfs = this->virtual_grf_count; + int *start = ralloc_array(mem_ctx, int, num_vgrfs); + int *end = ralloc_array(mem_ctx, int, num_vgrfs); ralloc_free(this->virtual_grf_start); ralloc_free(this->virtual_grf_end); this->virtual_grf_start = start; this->virtual_grf_end = end; - for (int i = 0; i < num_vars; i++) { + for (int i = 0; i < num_vgrfs; i++) { start[i] = MAX_INSTRUCTION; end[i] = -1; } @@ -243,7 +242,7 @@ fs_visitor::calculate_live_intervals() fs_live_variables livevars(this, &cfg); for (int b = 0; b < cfg.num_blocks; b++) { - for (int i = 0; i < num_vars; i++) { + for (int i = 0; i < num_vgrfs; i++) { if (BITSET_TEST(livevars.bd[b].livein, i)) { start[i] = MIN2(start[i], cfg.blocks[b]->start_ip); end[i] = MAX2(end[i], cfg.blocks[b]->start_ip); diff --git a/src/mesa/drivers/dri/i965/brw_fs_live_variables.h b/src/mesa/drivers/dri/i965/brw_fs_live_variables.h index e2274391541..c518755c50c 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_live_variables.h +++ b/src/mesa/drivers/dri/i965/brw_fs_live_variables.h @@ -65,7 +65,7 @@ public: cfg_t *cfg; void *mem_ctx; - int num_vars; + int num_vgrfs; int bitset_words; /** Per-basic-block information on live variables */