freedreno/ir3: rename ir3_block::bd

We'll need to add similar for ir3_instruction, but following the pattern
to use 'id' seems confusing.  Let's just go w/ generic 'data' as the
name.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
This commit is contained in:
Rob Clark 2015-12-03 10:21:32 -05:00
parent d566382a98
commit 8e52344dc1
3 changed files with 11 additions and 11 deletions

View File

@ -401,7 +401,7 @@ struct ir3_block {
/* used for per-pass extra block data. Mainly used right
* now in RA step to track livein/liveout.
*/
void *bd;
void *data;
#ifdef DEBUG
uint32_t serialno;

View File

@ -329,12 +329,12 @@ struct ir3_nir_block_data {
static struct ir3_nir_block_data *
get_block_data(struct ir3_compile *ctx, struct ir3_block *block)
{
if (!block->bd) {
if (!block->data) {
struct ir3_nir_block_data *bd = ralloc_size(ctx, sizeof(*bd) +
((ctx->num_arrays + 1) * sizeof(bd->arrs[0])));
block->bd = bd;
block->data = bd;
}
return block->bd;
return block->data;
}
static void
@ -397,7 +397,7 @@ get_var(struct ir3_compile *ctx, nir_variable *var)
pred_block && (pred_block->predecessors->entries < 2) && !defn;
pred_block = nir_block_pred(pred_block)) {
struct ir3_block *pblock = get_block(ctx, pred_block);
struct ir3_nir_block_data *pbd = pblock->bd;
struct ir3_nir_block_data *pbd = pblock->data;
if (!pbd)
continue;
defn = pbd->arrs[arr->aid];
@ -452,7 +452,7 @@ add_array_phi_srcs(struct ir3_compile *ctx, nir_block *nblock,
BITSET_SET(visited, nblock->index);
block = get_block(ctx, nblock);
bd = block->bd;
bd = block->data;
if (bd && bd->arrs[av->aid]) {
struct ir3_array_value *dav = bd->arrs[av->aid];
@ -472,7 +472,7 @@ add_array_phi_srcs(struct ir3_compile *ctx, nir_block *nblock,
static void
resolve_array_phis(struct ir3_compile *ctx, struct ir3_block *block)
{
struct ir3_nir_block_data *bd = block->bd;
struct ir3_nir_block_data *bd = block->data;
unsigned bitset_words = BITSET_WORDS(ctx->impl->num_blocks);
if (!bd)

View File

@ -590,7 +590,7 @@ ra_block_compute_live_ranges(struct ir3_ra_ctx *ctx, struct ir3_block *block)
bd->livein = rzalloc_array(bd, BITSET_WORD, bitset_words);
bd->liveout = rzalloc_array(bd, BITSET_WORD, bitset_words);
block->bd = bd;
block->data = bd;
list_for_each_entry (struct ir3_instruction, instr, &block->instr_list, node) {
struct ir3_instruction *src;
@ -692,7 +692,7 @@ ra_compute_livein_liveout(struct ir3_ra_ctx *ctx)
bool progress = false;
list_for_each_entry (struct ir3_block, block, &ctx->ir->block_list, node) {
struct ir3_ra_block_data *bd = block->bd;
struct ir3_ra_block_data *bd = block->data;
/* update livein: */
for (unsigned i = 0; i < bitset_words; i++) {
@ -713,7 +713,7 @@ ra_compute_livein_liveout(struct ir3_ra_ctx *ctx)
if (!succ)
continue;
succ_bd = succ->bd;
succ_bd = succ->data;
for (unsigned i = 0; i < bitset_words; i++) {
BITSET_WORD new_liveout =
@ -749,7 +749,7 @@ ra_add_interference(struct ir3_ra_ctx *ctx)
/* extend start/end ranges based on livein/liveout info from cfg: */
unsigned bitset_words = BITSET_WORDS(ctx->alloc_count);
list_for_each_entry (struct ir3_block, block, &ir->block_list, node) {
struct ir3_ra_block_data *bd = block->bd;
struct ir3_ra_block_data *bd = block->data;
for (unsigned i = 0; i < bitset_words; i++) {
if (BITSET_TEST(bd->livein, i)) {