[Mesa-dev] V6 Loop unrolling in NIR
Timothy Arceri
timothy.arceri at collabora.com
Tue Dec 6 01:12:18 UTC 2016
Again thanks to Jason and Connor for their feedback, and to
Thomas for getting this work started.
V6: Is mainly just a rebase but fixes a few regressions cause by
ralloc() being fixed recently to not zero out memory. There is also a fix for
the analysis pass for detecting jump instructions when a block contains nested
ifs.
Fixes piglit test for HSW and IVB:
spec/arb_tessellation_shader/execution/variable-indexing/tes-both-input-array-vec4-index-rd.shader_test
total instructions in shared programs: 8528769 -> 8528534 (-0.00%)
instructions in affected programs: 46967 -> 46732 (-0.50%)
helped: 62
HURT: 92
total cycles in shared programs: 67260892 -> 67248082 (-0.02%)
cycles in affected programs: 3178716 -> 3165906 (-0.40%)
helped: 1154
HURT: 1118
total loops in shared programs: 1868 -> 1214 (-35.01%)
loops in affected programs: 687 -> 33 (-95.20%)
helped: 655
HURT: 17
LOST: 5
GAINED: 0
Most of the HURT instruction count is caused by patch 2. Where the binary
search implemented in the NIR variable indexing lowering pass can result in
more instructions than the GLSL IR version.
The HURT loops are caused by a couple of different things that can be
addressed in a follow up series. For example handling if statements
that contain a break but also other instructions, and different ways of
incrementing the induction variable e.g multiplication.
More information about the mesa-dev
mailing list