/* live_in[s] = GEN[s] + (live_out[s] - KILL[s]) */
bi_foreach_dest(ins, d) {
- if (bi_is_ssa(ins->dest[d]))
- live[ins->dest[d].value] &= ~bi_writemask(ins, d);
+ live[ins->dest[d].value] &= ~bi_writemask(ins, d);
}
bi_foreach_ssa_src(ins, src) {
* interfering with the destination */
bi_foreach_dest(ins, d) {
- assert(bi_is_ssa(ins->dest[d]));
unsigned node = ins->dest[d].value;
/* Don't allocate to anything that's read later as a
default_affinity &= BITFIELD64_MASK(48) << 8;
bi_foreach_instr_global(ctx, ins) {
- bi_foreach_dest(ins, d) {
- assert(bi_is_ssa(ins->dest[d]));
-
+ bi_foreach_dest(ins, d)
l->affinity[ins->dest[d].value] = default_affinity;
- }
/* Blend shaders expect the src colour to be in r0-r3 */
if (ins->op == BI_OPCODE_BLEND &&
src.offset = i;
bi_mov_i32_to(&b, I->dest[i], src);
- if (bi_is_ssa(I->dest[i]) && I->dest[i].value < first_reg)
+ if (I->dest[i].value < first_reg)
remap[I->dest[i].value] = src;
}
} else if (I->op == BI_OPCODE_COLLECT_I32) {
bi_index dest = I->dest[0];
assert(dest.offset == 0);
- assert(((bi_is_ssa(dest) && dest.value < first_reg) || I->nr_srcs == 1) && "nir_lower_phis_to_scalar");
+ assert(((dest.value < first_reg) || I->nr_srcs == 1) && "nir_lower_phis_to_scalar");
bi_foreach_src(I, i) {
if (bi_is_null(I->src[i]))
bool all_null = true;
bi_foreach_dest(ins, d) {
- if (!bi_is_ssa(ins->dest[d]))
- all_null = false;
- else if (live[ins->dest[d].value] & bi_writemask(ins, d))
+ if (live[ins->dest[d].value] & bi_writemask(ins, d))
all_null = false;
}
if (I->op != BI_OPCODE_PHI)
break;
- assert(bi_is_ssa(I->dest[0]));
-
/* Assign a register for the phi */
bi_index reg = bi_temp(ctx);
assert(reg.value >= first_reg);