void
fs_instruction_scheduler::calculate_deps()
{
- const bool gen6plus = v->brw->gen >= 6;
-
/* Pre-register-allocation, this tracks the last write per VGRF (so
* different reg_offsets within it can interfere when they shouldn't).
* After register allocation, reg_offsets are gone and we track individual
} else {
add_dep(last_fixed_grf_write, n);
}
- } else if (inst->src[i].is_accumulator() && gen6plus) {
+ } else if (inst->src[i].is_accumulator()) {
add_dep(last_accumulator_write, n);
} else if (inst->src[i].file != BAD_FILE &&
inst->src[i].file != IMM &&
}
if (inst->reads_accumulator_implicitly()) {
- if (gen6plus) {
- add_dep(last_accumulator_write, n);
- } else {
- add_barrier_deps(n);
- }
+ add_dep(last_accumulator_write, n);
}
/* write-after-write deps. */
} else {
last_fixed_grf_write = n;
}
- } else if (inst->dst.is_accumulator() && gen6plus) {
+ } else if (inst->dst.is_accumulator()) {
add_dep(last_accumulator_write, n);
last_accumulator_write = n;
} else if (inst->dst.file != BAD_FILE &&
last_conditional_mod[inst->flag_subreg] = n;
}
- if (inst->writes_accumulator) {
- if (gen6plus) {
- add_dep(last_accumulator_write, n);
- last_accumulator_write = n;
- } else {
- add_barrier_deps(n);
- }
+ if (inst->writes_accumulator_implicitly(v->brw->gen) &&
+ !inst->dst.is_accumulator()) {
+ add_dep(last_accumulator_write, n);
+ last_accumulator_write = n;
}
}
} else {
add_dep(n, last_fixed_grf_write);
}
- } else if (inst->src[i].is_accumulator() && gen6plus) {
+ } else if (inst->src[i].is_accumulator()) {
add_dep(n, last_accumulator_write);
} else if (inst->src[i].file != BAD_FILE &&
inst->src[i].file != IMM &&
}
if (inst->reads_accumulator_implicitly()) {
- if (gen6plus) {
- add_dep(n, last_accumulator_write);
- } else {
- add_barrier_deps(n);
- }
+ add_dep(n, last_accumulator_write);
}
/* Update the things this instruction wrote, so earlier reads
} else {
last_fixed_grf_write = n;
}
- } else if (inst->dst.is_accumulator() && gen6plus) {
+ } else if (inst->dst.is_accumulator()) {
last_accumulator_write = n;
} else if (inst->dst.file != BAD_FILE &&
!inst->dst.is_null()) {
last_conditional_mod[inst->flag_subreg] = n;
}
- if (inst->writes_accumulator) {
- if (gen6plus) {
- last_accumulator_write = n;
- } else {
- add_barrier_deps(n);
- }
+ if (inst->writes_accumulator_implicitly(v->brw->gen)) {
+ last_accumulator_write = n;
}
}
}
void
vec4_instruction_scheduler::calculate_deps()
{
- const bool gen6plus = v->brw->gen >= 6;
-
schedule_node *last_grf_write[grf_count];
schedule_node *last_mrf_write[BRW_MAX_MRF];
schedule_node *last_conditional_mod = NULL;
(inst->src[i].fixed_hw_reg.file ==
BRW_GENERAL_REGISTER_FILE)) {
add_dep(last_fixed_grf_write, n);
- } else if (inst->src[i].is_accumulator() && gen6plus) {
+ } else if (inst->src[i].is_accumulator()) {
assert(last_accumulator_write);
add_dep(last_accumulator_write, n);
} else if (inst->src[i].file != BAD_FILE &&
}
if (inst->reads_accumulator_implicitly()) {
- if (gen6plus) {
- assert(last_accumulator_write);
- add_dep(last_accumulator_write, n);
- } else {
- add_barrier_deps(n);
- }
+ assert(last_accumulator_write);
+ add_dep(last_accumulator_write, n);
}
/* write-after-write deps. */
} else if (inst->dst.file == HW_REG &&
inst->dst.fixed_hw_reg.file == BRW_GENERAL_REGISTER_FILE) {
last_fixed_grf_write = n;
- } else if (inst->dst.is_accumulator() && gen6plus) {
+ } else if (inst->dst.is_accumulator()) {
add_dep(last_accumulator_write, n);
last_accumulator_write = n;
} else if (inst->dst.file != BAD_FILE &&
last_conditional_mod = n;
}
- if (inst->writes_accumulator) {
- if (gen6plus) {
- add_dep(last_accumulator_write, n);
- last_accumulator_write = n;
- } else {
- add_barrier_deps(n);
- }
+ if (inst->writes_accumulator_implicitly(v->brw->gen) &&
+ !inst->dst.is_accumulator()) {
+ add_dep(last_accumulator_write, n);
+ last_accumulator_write = n;
}
}
(inst->src[i].fixed_hw_reg.file ==
BRW_GENERAL_REGISTER_FILE)) {
add_dep(n, last_fixed_grf_write);
- } else if (inst->src[i].is_accumulator() && gen6plus) {
+ } else if (inst->src[i].is_accumulator()) {
add_dep(n, last_accumulator_write);
} else if (inst->src[i].file != BAD_FILE &&
inst->src[i].file != IMM &&
}
if (inst->reads_accumulator_implicitly()) {
- if (gen6plus) {
- add_dep(n, last_accumulator_write);
- } else {
- add_barrier_deps(n);
- }
+ add_dep(n, last_accumulator_write);
}
/* Update the things this instruction wrote, so earlier reads
} else if (inst->dst.file == HW_REG &&
inst->dst.fixed_hw_reg.file == BRW_GENERAL_REGISTER_FILE) {
last_fixed_grf_write = n;
- } else if (inst->dst.is_accumulator() && gen6plus) {
+ } else if (inst->dst.is_accumulator()) {
last_accumulator_write = n;
} else if (inst->dst.file != BAD_FILE &&
!inst->dst.is_null()) {
last_conditional_mod = n;
}
- if (inst->writes_accumulator) {
- if (gen6plus) {
- last_accumulator_write = n;
- } else {
- add_barrier_deps(n);
- }
+ if (inst->writes_accumulator_implicitly(v->brw->gen)) {
+ last_accumulator_write = n;
}
}
}