Skip to content

nir: remove unreachable loop terminators

Timothy Arceri requested to merge tarceri/mesa:more_loop_unroll into main
Remove the conditional break statements associated with all
terminators that are associated with a fixed iteration count,
except for the one associated with the limiting terminator.

This logic matches similiar functionality that exists in the
old GLSL IR unrolling code.

This change helps a piglit test pass on the r300 driver once
we switch off the old GLSL IR unrolling code.

Shader-db results IRIS (BDW):

total instructions in shared programs: 17538619 -> 17538595 (<.01%)
instructions in affected programs: 216 -> 192 (-11.11%)
helped: 3
HURT: 0
helped stats (abs) min: 7 max: 10 x̄: 8.00 x̃: 7
helped stats (rel) min: 10.00% max: 12.07% x̄: 11.38% x̃: 12.07%

total cycles in shared programs: 858674910 -> 858672810 (<.01%)
cycles in affected programs: 79540 -> 77440 (-2.64%)
helped: 3
HURT: 0
helped stats (abs) min: 620 max: 800 x̄: 700.00 x̃: 680
helped stats (rel) min: 2.45% max: 2.83% x̄: 2.63% x̃: 2.62%

Merge request reports