Commit fb0611df authored by Emma Anholt's avatar Emma Anholt
Browse files

v3d: Fix detection of TMU write sequences in register spilling.

We can't use the QPU functions to detect this until register allocation is
done and we've moved inst->dst into inst->qpu.

Fixes bad TMU sequences from register spilling in
parent 18894a5e
......@@ -33,6 +33,13 @@
#define PHYS_COUNT 64
static inline bool
qinst_writes_tmu(struct qinst *inst)
return (inst->dst.file == QFILE_MAGIC &&
static bool
is_last_ldtmu(struct qinst *inst, struct qblock *block)
......@@ -40,7 +47,7 @@ is_last_ldtmu(struct qinst *inst, struct qblock *block)
&block->instructions, link) {
if (scan_inst->qpu.sig.ldtmu)
return false;
if (v3d_qpu_writes_tmu(&scan_inst->qpu))
if (qinst_writes_tmu(scan_inst))
return true;
......@@ -138,7 +145,7 @@ v3d_choose_spill_node(struct v3d_compile *c, struct ra_graph *g,
inst->qpu.alu.add.op == V3D_QPU_A_TMUWT)
in_tmu_operation = false;
if (v3d_qpu_writes_tmu(&inst->qpu))
if (qinst_writes_tmu(inst))
in_tmu_operation = true;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment