pan/midgard: Add imov->fmov optimization
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 23 Aug 2019 23:14:13 +0000 (16:14 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 26 Aug 2019 18:42:33 +0000 (11:42 -0700)
commit9c328ea66ea0a85ac35704da1b50e7820297f709
treeb8b15da86a359eb95b2889ac950ebf30401078d3
parent0acb5c1774d8759ca5ee4c61a13ee745768b4d2d
pan/midgard: Add imov->fmov optimization

When moving constants, if switching to a floating-point representation
doesn't break anything, we'd rather have an fmov than an imov,
permitting inlining the constant in many circumstances.

total quadwords in shared programs: 3408 -> 3366 (-1.23%)
quadwords in affected programs: 1188 -> 1146 (-3.54%)
helped: 41
HURT: 0
helped stats (abs) min: 1 max: 2 x̄: 1.02 x̃: 1
helped stats (rel) min: 0.19% max: 25.00% x̄: 9.65% x̃: 11.11%
95% mean confidence interval for quadwords value: -1.07 -0.98
95% mean confidence interval for quadwords %-change: -11.38% -7.93%
Quadwords are helped.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/panfrost/midgard/compiler.h
src/panfrost/midgard/meson.build
src/panfrost/midgard/midgard_compile.c
src/panfrost/midgard/midgard_opt_float.c [new file with mode: 0644]