*/
void
-fs_live_variables::setup_one_read(struct block_data *bd, fs_inst *inst,
+fs_live_variables::setup_one_read(struct fs_block_data *bd, fs_inst *inst,
int ip, const fs_reg ®)
{
int var = var_from_reg(reg);
}
void
-fs_live_variables::setup_one_write(struct block_data *bd, fs_inst *inst,
+fs_live_variables::setup_one_write(struct fs_block_data *bd, fs_inst *inst,
int ip, const fs_reg ®)
{
int var = var_from_reg(reg);
if (block->num > 0)
assert(cfg->blocks[block->num - 1]->end_ip == ip - 1);
- struct block_data *bd = &block_data[block->num];
+ struct fs_block_data *bd = &block_data[block->num];
foreach_inst_in_block(fs_inst, inst, block) {
/* Set use[] for this instruction */
cont = false;
foreach_block_reverse (block, cfg) {
- struct block_data *bd = &block_data[block->num];
+ struct fs_block_data *bd = &block_data[block->num];
/* Update liveout */
foreach_list_typed(bblock_link, child_link, link, &block->children) {
- struct block_data *child_bd = &block_data[child_link->block->num];
+ struct fs_block_data *child_bd = &block_data[child_link->block->num];
for (int i = 0; i < bitset_words; i++) {
BITSET_WORD new_liveout = (child_bd->livein[i] &
cont = false;
foreach_block (block, cfg) {
- const struct block_data *bd = &block_data[block->num];
+ const struct fs_block_data *bd = &block_data[block->num];
foreach_list_typed(bblock_link, child_link, link, &block->children) {
- struct block_data *child_bd = &block_data[child_link->block->num];
+ struct fs_block_data *child_bd = &block_data[child_link->block->num];
for (int i = 0; i < bitset_words; i++) {
const BITSET_WORD new_def = bd->defout[i] & ~child_bd->defin[i];
fs_live_variables::compute_start_end()
{
foreach_block (block, cfg) {
- struct block_data *bd = &block_data[block->num];
+ struct fs_block_data *bd = &block_data[block->num];
for (int w = 0; w < bitset_words; w++) {
BITSET_WORD livedefin = bd->livein[w] & bd->defin[w];
end[i] = -1;
}
- block_data= rzalloc_array(mem_ctx, struct block_data, cfg->num_blocks);
+ block_data = rzalloc_array(mem_ctx, struct fs_block_data, cfg->num_blocks);
bitset_words = BITSET_WORDS(num_vars);
for (int i = 0; i < cfg->num_blocks; i++) {
namespace brw {
-struct block_data {
+struct fs_block_data {
/**
* Which variables are defined before being used in the block.
*
/** @} */
/** Per-basic-block information on live variables */
- struct block_data *block_data;
+ struct fs_block_data *block_data;
protected:
void setup_def_use();
- void setup_one_read(struct block_data *bd, fs_inst *inst, int ip,
+ void setup_one_read(struct fs_block_data *bd, fs_inst *inst, int ip,
const fs_reg ®);
- void setup_one_write(struct block_data *bd, fs_inst *inst, int ip,
+ void setup_one_write(struct fs_block_data *bd, fs_inst *inst, int ip,
const fs_reg ®);
void compute_live_variables();
void compute_start_end();
assert(cfg->blocks[block->num - 1]->end_ip == ip - 1);
foreach_inst_in_block(vec4_instruction, inst, block) {
- struct block_data *bd = &block_data[block->num];
+ struct vec4_block_data *bd = &block_data[block->num];
/* Set use[] for this instruction */
for (unsigned int i = 0; i < 3; i++) {
cont = false;
foreach_block_reverse (block, cfg) {
- struct block_data *bd = &block_data[block->num];
+ struct vec4_block_data *bd = &block_data[block->num];
/* Update liveout */
foreach_list_typed(bblock_link, child_link, link, &block->children) {
- struct block_data *child_bd = &block_data[child_link->block->num];
+ struct vec4_block_data *child_bd = &block_data[child_link->block->num];
for (int i = 0; i < bitset_words; i++) {
BITSET_WORD new_liveout = (child_bd->livein[i] &
mem_ctx = ralloc_context(NULL);
num_vars = alloc.total_size * 8;
- block_data = rzalloc_array(mem_ctx, struct block_data, cfg->num_blocks);
+ block_data = rzalloc_array(mem_ctx, struct vec4_block_data, cfg->num_blocks);
bitset_words = BITSET_WORDS(num_vars);
for (int i = 0; i < cfg->num_blocks; i++) {
this->live_intervals = new(mem_ctx) vec4_live_variables(alloc, cfg);
foreach_block (block, cfg) {
- struct block_data *bd = &live_intervals->block_data[block->num];
+ struct vec4_block_data *bd = &live_intervals->block_data[block->num];
for (int i = 0; i < live_intervals->num_vars; i++) {
if (BITSET_TEST(bd->livein, i)) {