Mesa (master): i965/fs: Rename num_vars to num_vgrfs in live interval analysis.
Eric Anholt
anholt at kemper.freedesktop.org
Thu Oct 10 23:30:15 UTC 2013
Module: Mesa
Branch: master
Commit: 5af8388110595f6324d697f0b468047c779f1079
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5af8388110595f6324d697f0b468047c779f1079
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Tue Aug 6 01:12:54 2013 -0700
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 <kenneth at whitecape.org>
Reviewed-by: Eric Anholt <eric at anholt.net>
---
.../drivers/dri/i965/brw_fs_live_variables.cpp | 13 ++++++-------
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 18ba30a..8abed8f 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 e227439..c518755 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 */
More information about the mesa-commit
mailing list