pan_liveness_kill(live, bi_get_node(ins->dest[0]), max, bi_writemask(ins));
bi_foreach_src(ins, src) {
- unsigned node = bi_get_node(ins->src[src]);
- unsigned bytemask = bi_bytemask_of_read_components(ins, ins->src[src]);
+ unsigned count = bi_count_read_registers(ins, src);
+ unsigned rmask = (1 << (4 * count)) - 1;
+ uint16_t mask = (rmask << (4 * ins->src[src].offset));
- pan_liveness_gen(live, node, max, bytemask);
+ unsigned node = bi_get_node(ins->src[src]);
+ pan_liveness_gen(live, node, max, mask);
}
}
return 1;
}
-uint16_t
-bi_bytemask_of_read_components(bi_instr *ins, bi_index node)
-{
- uint16_t mask = 0x0;
-
- bi_foreach_src(ins, s) {
- if (!bi_is_equiv(ins->src[s], node)) continue;
-
- unsigned count = bi_count_read_registers(ins, s);
- unsigned rmask = (1 << (4 * count)) - 1;
- mask |= (rmask << (4 * node.offset));
- }
-
- return mask;
-}
-
unsigned
bi_writemask(bi_instr *ins)
{
bool bi_has_arg(bi_instr *ins, bi_index arg);
unsigned bi_count_read_registers(bi_instr *ins, unsigned src);
-uint16_t bi_bytemask_of_read_components(bi_instr *ins, bi_index node);
unsigned bi_writemask(bi_instr *ins);
bi_clause * bi_next_clause(bi_context *ctx, pan_block *block, bi_clause *clause);
bool bi_side_effects(enum bi_opcode op);