summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2014-06-28 19:52:04 -0700
committerMatt Turner <[email protected]>2014-07-01 08:55:52 -0700
commitec1b2d6aa075c678f0eb0405be64253450f995a1 (patch)
tree3984ba6f0996836d31a83764933081b1bae39819 /src/mesa
parent021094481cc8d2d6dd199e39fd77818bb22b6e64 (diff)
i965: Mark fields in the live interval classes protected.
cfg, for instance, is a pointer to a local variable in calculate_live_intervals, certainly not valid after that function has returned. Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_live_variables.h22
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_live_variables.h13
2 files changed, 19 insertions, 16 deletions
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 82575d8287f..5a7dd279b3c 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_live_variables.h
+++ b/src/mesa/drivers/dri/i965/brw_fs_live_variables.h
@@ -60,19 +60,9 @@ public:
fs_live_variables(fs_visitor *v, cfg_t *cfg);
~fs_live_variables();
- void setup_def_use();
- void setup_one_read(bblock_t *block, fs_inst *inst, int ip, fs_reg reg);
- void setup_one_write(bblock_t *block, fs_inst *inst, int ip, fs_reg reg);
- void compute_live_variables();
- void compute_start_end();
-
bool vars_interfere(int a, int b);
int var_from_reg(fs_reg *reg);
- fs_visitor *v;
- cfg_t *cfg;
- void *mem_ctx;
-
/** Map from virtual GRF number to index in block_data arrays. */
int *var_from_vgrf;
@@ -98,6 +88,18 @@ public:
/** Per-basic-block information on live variables */
struct block_data *bd;
+
+protected:
+ void setup_def_use();
+ void setup_one_read(bblock_t *block, fs_inst *inst, int ip, fs_reg reg);
+ void setup_one_write(bblock_t *block, fs_inst *inst, int ip, fs_reg reg);
+ void compute_live_variables();
+ void compute_start_end();
+
+ fs_visitor *v;
+ cfg_t *cfg;
+ void *mem_ctx;
+
};
} /* namespace brw */
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_live_variables.h b/src/mesa/drivers/dri/i965/brw_vec4_live_variables.h
index b2d8b339822..03cc813782e 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_live_variables.h
+++ b/src/mesa/drivers/dri/i965/brw_vec4_live_variables.h
@@ -58,18 +58,19 @@ public:
vec4_live_variables(vec4_visitor *v, cfg_t *cfg);
~vec4_live_variables();
+ int num_vars;
+ int bitset_words;
+
+ /** Per-basic-block information on live variables */
+ struct block_data *bd;
+
+protected:
void setup_def_use();
void compute_live_variables();
vec4_visitor *v;
cfg_t *cfg;
void *mem_ctx;
-
- int num_vars;
- int bitset_words;
-
- /** Per-basic-block information on live variables */
- struct block_data *bd;
};
} /* namespace brw */