{
return valu_instrs == valu_nop && trans_instrs == trans_nop && salu_cycles == 0;
}
+
+ UNUSED void print(FILE* output) const
+ {
+ if (valu_instrs != valu_nop)
+ fprintf(output, "valu_instrs: %u\n", valu_instrs);
+ if (valu_cycles)
+ fprintf(output, "valu_cycles: %u\n", valu_cycles);
+ if (trans_instrs != trans_nop)
+ fprintf(output, "trans_instrs: %u\n", trans_instrs);
+ if (trans_cycles)
+ fprintf(output, "trans_cycles: %u\n", trans_cycles);
+ if (salu_cycles)
+ fprintf(output, "salu_cycles: %u\n", salu_cycles);
+ }
};
uint8_t
events &= ~(event_valu | event_trans | event_salu);
}
}
+
+ UNUSED void print(FILE* output) const
+ {
+ fprintf(output, "logical: %u\n", logical);
+ imm.print(output);
+ delay.print(output);
+ if (events)
+ fprintf(output, "events: %u\n", events);
+ if (counters)
+ fprintf(output, "counters: %u\n", counters);
+ if (!wait_on_read)
+ fprintf(output, "wait_on_read: %u\n", wait_on_read);
+ if (!logical)
+ fprintf(output, "logical: %u\n", logical);
+ if (vmem_types)
+ fprintf(output, "vmem_types: %u\n", vmem_types);
+ }
};
struct wait_ctx {
{
entry.remove_counter(counter);
}
+
+ UNUSED void print(FILE* output) const
+ {
+ fprintf(output, "exp_nonzero: %u\n", exp_nonzero);
+ fprintf(output, "vm_nonzero: %u\n", vm_nonzero);
+ fprintf(output, "lgkm_nonzero: %u\n", lgkm_nonzero);
+ fprintf(output, "vs_nonzero: %u\n", vs_nonzero);
+ fprintf(output, "pending_flat_lgkm: %u\n", pending_flat_lgkm);
+ fprintf(output, "pending_flat_vm: %u\n", pending_flat_vm);
+ for (const auto& entry : gpr_map) {
+ fprintf(output, "gpr_map[%c%u] = {\n", entry.first.reg() >= 256 ? 'v' : 's',
+ entry.first.reg() & 0xff);
+ entry.second.print(output);
+ fprintf(output, "}\n");
+ }
+
+ for (unsigned i = 0; i < storage_count; i++) {
+ if (!barrier_imm[i].empty() || barrier_events[i]) {
+ fprintf(output, "barriers[%u] = {\n", i);
+ barrier_imm[i].print(output);
+ fprintf(output, "events: %u\n", barrier_events[i]);
+ fprintf(output, "}\n");
+ }
+ }
+ }
};
uint8_t
vs == unset_counter;
}
+void
+wait_imm::print(FILE* output) const
+{
+ if (exp != unset_counter)
+ fprintf(output, "exp: %u\n", exp);
+ if (vm != unset_counter)
+ fprintf(output, "vm: %u\n", vm);
+ if (lgkm != unset_counter)
+ fprintf(output, "lgkm: %u\n", lgkm);
+ if (vs != unset_counter)
+ fprintf(output, "vs: %u\n", vs);
+}
+
bool
should_form_clause(const Instruction* a, const Instruction* b)
{