OSDN Git Service

i965: Copy propagate before doing variable index lowering.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 30 Apr 2016 04:12:15 +0000 (21:12 -0700)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 24 Jun 2016 20:25:00 +0000 (21:25 +0100)
commit335193107aea7f4ddaa2d91678eaf1d4bfd607d3
tree7223c8354b002405976510c5b3c181f5a50cb90e
parent32bb867118978f185c00c1fe34a58b6d55a543e8
i965: Copy propagate before doing variable index lowering.

The scalar backend currently doesn't support variable indexing on
temporary arrays, but it does support it on uniform arrays, and
some stages support it for input arrays.  Make sure these are
propagated through before exploding indirects into piles of
if-ladders unnecessarily.

On Broadwell, no instruction count change in shader-db.

total cycles in shared programs: 80675652 -> 80674928 (-0.00%)
cycles in affected programs: 649972 -> 649248 (-0.11%)
helped: 386
HURT: 165

This will help avoid code quality regressions in a future commit.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
(cherry picked from commit f7741c521119ce147215d94a4c238e84fc8b1130)
src/mesa/drivers/dri/i965/brw_link.cpp