[Mesa-dev] [PATCH 5/5] i965: remove GLSL IR optimisation loop
Timothy Arceri
timothy.arceri at collabora.com
Wed Jan 18 04:02:03 UTC 2017
Seem this breaks a bunch of interpolation related tests for some
reason. But my main aim was to get thoughts on these numbers and if we
are ready to switch this stuff off.
On Wed, 2017-01-18 at 13:12 +1100, Timothy Arceri wrote:
> Run time for shader-db on my machine goes from ~750 seconds to
> ~630 seconds.
>
> shader-db results BDW:
>
> total instructions in shared programs: 12968880 -> 12968298 (-0.00%)
> instructions in affected programs: 1467035 -> 1466453 (-0.04%)
> helped: 3632
> HURT: 3331
>
> total cycles in shared programs: 246501486 -> 246566354 (0.03%)
> cycles in affected programs: 208986974 -> 209051842 (0.03%)
> helped: 24215
> HURT: 34884
>
> total spills in shared programs: 14560 -> 14498 (-0.43%)
> spills in affected programs: 2270 -> 2208 (-2.73%)
> helped: 17
> HURT: 2
>
> total fills in shared programs: 19671 -> 19632 (-0.20%)
> fills in affected programs: 2060 -> 2021 (-1.89%)
> helped: 17
> HURT: 2
>
> LOST: 17
> GAINED: 40
>
> Most of the hurt shaders are 1-2 instructions, with what looks like a
> max of 7.
>
> I've looked at the worst cycles regressions and as far as I can tell
> its just
> a scheduling difference.
> ---
> src/mesa/drivers/dri/i965/brw_link.cpp | 15 +--------------
> 1 file changed, 1 insertion(+), 14 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_link.cpp
> b/src/mesa/drivers/dri/i965/brw_link.cpp
> index 4159756..bee9ce9 100644
> --- a/src/mesa/drivers/dri/i965/brw_link.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_link.cpp
> @@ -134,20 +134,7 @@ process_glsl_ir(struct brw_context *brw,
> lower_noise(shader->ir);
> lower_quadop_vector(shader->ir, false);
>
> - bool progress;
> - do {
> - progress = false;
> -
> - if (compiler->scalar_stage[shader->Stage]) {
> - if (shader->Stage == MESA_SHADER_VERTEX ||
> - shader->Stage == MESA_SHADER_FRAGMENT)
> - brw_do_channel_expressions(shader->ir);
> - brw_do_vector_splitting(shader->ir);
> - }
> -
> - progress = do_common_optimization(shader->ir, true, true,
> - options, ctx-
> >Const.NativeIntegers) || progress;
> - } while (progress);
> + do_dead_code(shader->ir, true);
>
> validate_ir_tree(shader->ir);
>
More information about the mesa-dev
mailing list