summaryrefslogtreecommitdiffstats
path: root/src/broadcom/qpu/qpu_instr.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2019-02-04 10:35:40 -0800
committerEric Anholt <[email protected]>2019-02-05 15:46:04 -0800
commit940501a446ea954a4437c49d0683e5e7f9681bad (patch)
tree541efd77308688b71d075619ded667d564267ae7 /src/broadcom/qpu/qpu_instr.h
parente5c6938590e5e495ce4f3f07dbdd53ca67297462 (diff)
v3d: Fix copy-propagation of input unpacks.
I had a single function for "does this do float input unpacking" with two major flaws: It was missing the most common thing to try to copy propagate a f32 input nunpack to (the VFPACK to an FP16 render target) along with several other ALU ops, and also would try to propagate an f32 unpack into a VFMUL which only does f16 unpacks. instructions in affected programs: 659232 -> 655895 (-0.51%) uniforms in affected programs: 132613 -> 135336 (2.05%) and a couple of programs increase their thread counts. The uniforms hit appears to be a pattern in generated code of doing (-a >= a) comparisons, which when a is abs(b) can result in the abs instruction being copy propagated once but not fully DCEed.
Diffstat (limited to 'src/broadcom/qpu/qpu_instr.h')
-rw-r--r--src/broadcom/qpu/qpu_instr.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/broadcom/qpu/qpu_instr.h b/src/broadcom/qpu/qpu_instr.h
index 1e2dcb78af6..a77430ff882 100644
--- a/src/broadcom/qpu/qpu_instr.h
+++ b/src/broadcom/qpu/qpu_instr.h
@@ -464,5 +464,7 @@ bool v3d_qpu_reads_flags(const struct v3d_qpu_instr *inst) ATTRIBUTE_CONST;
bool v3d_qpu_writes_flags(const struct v3d_qpu_instr *inst) ATTRIBUTE_CONST;
bool v3d_qpu_sig_writes_address(const struct v3d_device_info *devinfo,
const struct v3d_qpu_sig *sig) ATTRIBUTE_CONST;
+bool v3d_qpu_unpacks_f32(const struct v3d_qpu_instr *inst) ATTRIBUTE_CONST;
+bool v3d_qpu_unpacks_f16(const struct v3d_qpu_instr *inst) ATTRIBUTE_CONST;
#endif