Lines Matching defs:live

34  *   is mainly because phi destinations and live-through values have to be
39 compute_block_liveness(struct ir3_liveness *live, struct ir3_block *block,
42 memcpy(tmp_live, live->live_out[block->index],
74 memcpy(live->live_in[block->index], tmp_live,
81 if (tmp_live[j] & ~live->live_out[pred->index][j])
83 live->live_out[pred->index][j] |= tmp_live[j];
93 if (!BITSET_TEST(live->live_out[pred->index], name)) {
95 BITSET_SET(live->live_out[pred->index], name);
103 BITSET_FOREACH_SET (name, tmp_live, live->definitions_count) {
104 struct ir3_register *reg = live->definitions[name];
107 if (!BITSET_TEST(live->live_out[pred->index], name)) {
109 BITSET_SET(live->live_out[pred->index], name);
120 struct ir3_liveness *live = rzalloc(mem_ctx, struct ir3_liveness);
125 array_insert(live, live->definitions, NULL);
133 dst->name = live->definitions_count;
134 array_insert(live, live->definitions, dst);
139 live->block_count = block_count;
141 unsigned bitset_words = BITSET_WORDS(live->definitions_count);
142 BITSET_WORD *tmp_live = ralloc_array(live, BITSET_WORD, bitset_words);
143 live->live_in = ralloc_array(live, BITSET_WORD *, block_count);
144 live->live_out = ralloc_array(live, BITSET_WORD *, block_count);
148 live->live_in[block->index] =
149 rzalloc_array(live, BITSET_WORD, bitset_words);
150 live->live_out[block->index] =
151 rzalloc_array(live, BITSET_WORD, bitset_words);
159 compute_block_liveness(live, block, tmp_live, bitset_words);
163 return live;
166 /* Return true if "def" is live after "instr". It's assumed that "def"
170 ir3_def_live_after(struct ir3_liveness *live, struct ir3_register *def,
173 /* If it's live out then it's definitely live at the instruction. */
174 if (BITSET_TEST(live->live_out[instr->block->index], def->name))
177 /* If it's not live in and not defined in the same block then the live
181 !BITSET_TEST(live->live_in[instr->block->index], def->name))