diff options
author | Kenneth Graunke <[email protected]> | 2013-08-06 01:12:54 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2013-10-10 15:54:14 -0700 |
commit | 5af8388110595f6324d697f0b468047c779f1079 (patch) | |
tree | 9c6e97fa3941fff68959c72e52bb2095e4b1c0aa /src/mesa | |
parent | 701e9af15f9cedd8c1dbad417d195ee2a46e07bf (diff) |
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 <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp | 13 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_live_variables.h | 2 |
2 files changed, 7 insertions, 8 deletions
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 */ |