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.
This commit is contained in:
@@ -787,7 +787,6 @@ bool vir_is_raw_mov(struct qinst *inst);
|
||||
bool vir_is_tex(struct qinst *inst);
|
||||
bool vir_is_add(struct qinst *inst);
|
||||
bool vir_is_mul(struct qinst *inst);
|
||||
bool vir_is_float_input(struct qinst *inst);
|
||||
bool vir_writes_r3(const struct v3d_device_info *devinfo, struct qinst *inst);
|
||||
bool vir_writes_r4(const struct v3d_device_info *devinfo, struct qinst *inst);
|
||||
struct qreg vir_follow_movs(struct v3d_compile *c, struct qreg reg);
|
||||
|
Reference in New Issue
Block a user