The fs_visitor argument of fs_inst::regs_read() wasn't used at all.
Reviewed-by: Matt Turner <mattst88@gmail.com>
}
int
-fs_inst::regs_read(fs_visitor *v, int arg) const
+fs_inst::regs_read(int arg) const
{
if (is_tex() && arg == 0 && src[0].file == GRF) {
return mlen;
for (int i = 0; i < inst->sources; i++) {
if (inst->src[i].file == GRF) {
int reg = vgrf_to_reg[inst->src[i].reg] + inst->src[i].reg_offset;
- for (int j = 1; j < inst->regs_read(this, i); j++)
+ for (int j = 1; j < inst->regs_read(i); j++)
split_points[reg + j] = false;
}
}
*/
if (inst->src[arg].reg_offset < entry->dst.reg_offset ||
(inst->src[arg].reg_offset * 32 + inst->src[arg].subreg_offset +
- inst->regs_read(this, arg) * inst->src[arg].stride * 32) >
+ inst->regs_read(arg) * inst->src[arg].stride * 32) >
(entry->dst.reg_offset + entry->regs_written) * 32)
return false;
*/
if (inst->src[i].reg_offset < entry->dst.reg_offset ||
(inst->src[i].reg_offset * 32 + inst->src[i].subreg_offset +
- inst->regs_read(this, i) * inst->src[i].stride * 32) >
+ inst->regs_read(i) * inst->src[i].stride * 32) >
(entry->dst.reg_offset + entry->regs_written) * 32)
continue;
if (inst->src[i].file == GRF) {
int var = live_intervals->var_from_reg(inst->src[i]);
- for (int j = 0; j < inst->regs_read(this, i); j++) {
+ for (int j = 0; j < inst->regs_read(i); j++) {
BITSET_SET(live, var + j);
}
}
if (reg.file != GRF)
continue;
- for (int j = 0; j < inst->regs_read(v, i); j++) {
+ for (int j = 0; j < inst->regs_read(i); j++) {
setup_one_read(bd, inst, ip, reg);
reg.reg_offset++;
}
for (unsigned int i = 0; i < inst->sources; i++) {
if (inst->src[i].file == GRF &&
inst->src[i].reg == spill_reg) {
- int regs_read = inst->regs_read(this, i);
+ int regs_read = inst->regs_read(i);
int subset_spill_offset = (spill_offset +
REG_SIZE * inst->src[i].reg_offset);
fs_reg unspill_dst(GRF, alloc.allocate(regs_read));
#include "brw_shader.h"
class fs_inst;
-class fs_visitor;
class fs_reg : public backend_reg {
public:
bool overwrites_reg(const fs_reg ®) const;
bool is_send_from_grf() const;
bool is_partial_write() const;
- int regs_read(fs_visitor *v, int arg) const;
+ int regs_read(int arg) const;
bool can_do_source_mods(struct brw_context *brw);
bool reads_flag() const;
for (int i = 0; i < inst->sources; i++) {
if (inst->src[i].file == GRF) {
if (post_reg_alloc) {
- for (int r = 0; r < inst->regs_read(v, i); r++)
+ for (int r = 0; r < inst->regs_read(i); r++)
add_dep(last_grf_write[inst->src[i].reg + r], n);
} else {
- for (int r = 0; r < inst->regs_read(v, i); r++) {
+ for (int r = 0; r < inst->regs_read(i); r++) {
add_dep(last_grf_write[inst->src[i].reg * 16 + inst->src[i].reg_offset + r], n);
}
}
for (int i = 0; i < inst->sources; i++) {
if (inst->src[i].file == GRF) {
if (post_reg_alloc) {
- for (int r = 0; r < inst->regs_read(v, i); r++)
+ for (int r = 0; r < inst->regs_read(i); r++)
add_dep(n, last_grf_write[inst->src[i].reg + r]);
} else {
- for (int r = 0; r < inst->regs_read(v, i); r++) {
+ for (int r = 0; r < inst->regs_read(i); r++) {
add_dep(n, last_grf_write[inst->src[i].reg * 16 + inst->src[i].reg_offset + r]);
}
}