vc4: Coalesce instructions using VPM reads into the VPM read.
authorVarad Gautam <varadgautam@gmail.com>
Mon, 7 Mar 2016 19:31:59 +0000 (01:01 +0530)
committerEric Anholt <eric@anholt.net>
Tue, 15 Mar 2016 20:09:24 +0000 (13:09 -0700)
commite103b52aec773537d2821d8acc42ac9caa2a4b17
treef4ac5bce2da4a9faf98e6fb801a8506ffdfcbbe3
parent00bdbb22a92a40472ef47d22b26926ac8f542826
vc4: Coalesce instructions using VPM reads into the VPM read.

This is done instead of copy propagating the VPM reads into the
instructions using them, because VPM reads have to stay in order.

shader-db results:
total instructions in shared programs: 78509 -> 78114 (-0.50%)
instructions in affected programs:     5203 -> 4808 (-7.59%)
total estimated cycles in shared programs: 234670 -> 234318 (-0.15%)
estimated cycles in affected programs:     5345 -> 4993 (-6.59%)

Signed-off-by: Varad Gautam <varadgautam@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Rhys Kidd <rhyskidd@gmail.com>
src/gallium/drivers/vc4/vc4_opt_vpm.c
src/gallium/drivers/vc4/vc4_qir.c
src/gallium/drivers/vc4/vc4_qir.h