void
instruction_scheduler::compute_delay(schedule_node *n)
{
- const bool glassy = use_ips(mode);
-
if (!n->child_count) {
n->delay = issue_time(n->inst);
} else {
if (!n->children[i]->delay)
compute_delay(n->children[i]);
- if (glassy)
- n->delay = MAX2(n->delay, n->platency + n->children[i]->delay);
- else
- n->delay = MAX2(n->delay, n->latency + n->children[i]->delay);
+ n->delay = MAX2(n->delay, n->platency + n->children[i]->delay);
}
}
}
void
fs_instruction_scheduler::calculate_deps(bool bu)
{
- const bool glassy = use_ips(mode);
const bool gen6plus = v->brw->gen >= 6;
/* Pre-register-allocation, this tracks the last write per VGRF (so
for (int r = 0; r < reg_width * inst->regs_read(v, i); r++)
add_dep(bu, last_grf_write[inst->src[i].reg + r], n);
} else {
- if (glassy) {
- fs_inst* writer = last_grf_write[inst->src[i].reg] ?
- (fs_inst*)last_grf_write[inst->src[i].reg]->inst : 0;
- fs_inst* reader = (fs_inst*)n->inst;
-
- if (reader && writer)
- if (conflict(&writer->dst, writer->regs_written,
- &reader->src[i], reader->regs_read(v, i)))
+ fs_inst* writer = last_grf_write[inst->src[i].reg] ?
+ (fs_inst*)last_grf_write[inst->src[i].reg]->inst : 0;
+ fs_inst* reader = (fs_inst*)n->inst;
+
+ if (reader && writer)
+ if (conflict(&writer->dst, writer->regs_written,
+ &reader->src[i], reader->regs_read(v, i)))
add_dep(bu, last_grf_write[inst->src[i].reg], n);
- } else {
- add_dep(bu, last_grf_write[inst->src[i].reg], n);
- }
}
} else if (inst->src[i].file == HW_REG &&
(inst->src[i].fixed_hw_reg.file ==
} else if (inst->src[i].file != BAD_FILE &&
inst->src[i].file != IMM &&
inst->src[i].file != UNIFORM &&
- (!glassy || (inst->src[i].file != HW_REG ||
- inst->src[i].fixed_hw_reg.file != IMM))) {
+ (inst->src[i].file != HW_REG ||
+ inst->src[i].fixed_hw_reg.file != IMM)) {
assert(inst->src[i].file != MRF);
add_barrier_deps(bu, n);
}
for (int r = 0; r < reg_width * inst->regs_read(v, i); r++)
add_dep(bu, n, last_grf_write[inst->src[i].reg + r]);
} else {
- if (glassy) {
- fs_inst* writer = last_grf_write[inst->src[i].reg] ?
- (fs_inst*)last_grf_write[inst->src[i].reg]->inst : 0;
- fs_inst* reader = (fs_inst*)n->inst;
-
- if (reader && writer)
- if (conflict(&writer->dst, writer->regs_written,
- &reader->src[i], reader->regs_read(v, i)))
+ fs_inst* writer = last_grf_write[inst->src[i].reg] ?
+ (fs_inst*)last_grf_write[inst->src[i].reg]->inst : 0;
+ fs_inst* reader = (fs_inst*)n->inst;
+
+ if (reader && writer)
+ if (conflict(&writer->dst, writer->regs_written,
+ &reader->src[i], reader->regs_read(v, i)))
add_dep(bu, n, last_grf_write[inst->src[i].reg]);
- } else {
- add_dep(bu, n, last_grf_write[inst->src[i].reg]);
- }
}
} else if (inst->src[i].file == HW_REG &&
(inst->src[i].fixed_hw_reg.file ==
} else if (inst->src[i].file != BAD_FILE &&
inst->src[i].file != IMM &&
inst->src[i].file != UNIFORM &&
- (!glassy || (inst->src[i].file != HW_REG ||
- inst->src[i].fixed_hw_reg.file != IMM))) {
+ (inst->src[i].file != HW_REG ||
+ inst->src[i].fixed_hw_reg.file != IMM)) {
assert(inst->src[i].file != MRF);
add_barrier_deps(bu, n);
}