#include "brw_vec4.h"
#include "glsl/glsl_types.h"
#include "glsl/ir_optimization.h"
-#include "glsl/ir_print_visitor.h"
using namespace brw;
class schedule_node : public exec_node
{
public:
- schedule_node(backend_instruction *inst, const struct intel_context *intel)
+ schedule_node(backend_instruction *inst, const struct brw_context *brw)
{
this->inst = inst;
this->child_array_size = 0;
/* We can't measure Gen6 timings directly but expect them to be much
* closer to Gen7 than Gen4.
*/
- if (intel->gen >= 6)
- set_latency_gen7(intel->is_haswell);
+ if (brw->gen >= 6)
+ set_latency_gen7(brw->is_haswell);
else
set_latency_gen4();
}
void
instruction_scheduler::add_inst(backend_instruction *inst)
{
- schedule_node *n = new(mem_ctx) schedule_node(inst, bv->intel);
+ schedule_node *n = new(mem_ctx) schedule_node(inst, bv->brw);
assert(!inst->is_head_sentinel());
assert(!inst->is_tail_sentinel());
(inst->src[i].fixed_hw_reg.file ==
BRW_GENERAL_REGISTER_FILE)) {
if (post_reg_alloc) {
- for (int r = 0; r < reg_width; r++)
+ int size = reg_width;
+ if (inst->src[i].fixed_hw_reg.vstride == BRW_VERTICAL_STRIDE_0)
+ size = 1;
+ for (int r = 0; r < size; r++)
add_dep(last_grf_write[inst->src[i].fixed_hw_reg.nr + r], n);
} else {
add_dep(last_fixed_grf_write, n);
(inst->src[i].fixed_hw_reg.file ==
BRW_GENERAL_REGISTER_FILE)) {
if (post_reg_alloc) {
- for (int r = 0; r < reg_width; r++)
+ int size = reg_width;
+ if (inst->src[i].fixed_hw_reg.vstride == BRW_VERTICAL_STRIDE_0)
+ size = 1;
+ for (int r = 0; r < size; r++)
add_dep(n, last_grf_write[inst->src[i].fixed_hw_reg.nr + r]);
} else {
add_dep(n, last_fixed_grf_write);
add_dep(last_mrf_write[inst->base_mrf + i], n);
}
- if (inst->predicate) {
+ if (inst->depends_on_flags()) {
assert(last_conditional_mod);
add_dep(last_conditional_mod, n);
}
add_dep(n, last_mrf_write[inst->base_mrf + i], 2);
}
- if (inst->predicate) {
+ if (inst->depends_on_flags()) {
add_dep(n, last_conditional_mod);
}