freedreno/ir3: rename ir3_block::bd
authorRob Clark <robclark@freedesktop.org>
Thu, 3 Dec 2015 15:21:32 +0000 (10:21 -0500)
committerRob Clark <robclark@freedesktop.org>
Fri, 4 Dec 2015 15:27:09 +0000 (10:27 -0500)
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>
src/gallium/drivers/freedreno/ir3/ir3.h
src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
src/gallium/drivers/freedreno/ir3/ir3_ra.c

index cac7d4d..89b9310 100644 (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;
index 8617704..eb24120 100644 (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)
index ae7282e..74755eb 100644 (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)) {