[Mesa-dev] [PATCH v2 0/1] Do not require all components to apply opt_vector_float()
Matt Turner
mattst88 at gmail.com
Thu Dec 3 11:04:59 PST 2015
On Wed, Dec 2, 2015 at 7:43 AM, Juan A. Suarez Romero
<jasuarez at igalia.com> wrote:
> This patch, based on Matt suggestion, replaces the former two ones, as it gets
> better results.
>
> Basically, so far opt_vector_float() is only applied when the 4 components of
> the register are written with MOV. This patch changes the behaviour so it
> doesn't require to write the 4 components to apply it.
>
> Results obtained with shader-db tests are:
>
> total instructions in shared programs: 6819484 -> 6811698 (-0.11%)
> instructions in affected programs: 387245 -> 379459 (-2.01%)
> total loops in shared programs: 1971 -> 1971 (0.00%)
> helped: 3980
> HURT: 0
> GAINED: 3
> LOST: 0
The GAINED: 3 is almost certainly because of a sporadic failure in
shader-db (or Mesa...?) during the baseline shader-db run. When you
ran shader-db with your patch applied, the same failure didn't occur,
so report.py thinks this means 3 programs were gained. When I see
things like that, I manually rerun that specific shader and append its
results to the appropriate file and rerun report.py.
> Which are better than the ones obtained in the first version.
>
> Couple of final comments:
>
> * In the original version Matt commented about a bug in
> opt_dead_code_eliminate(). As he already wrote a patch, I'm just waiting for
> him to send it.
I sent it ("[PATCH] i965: Don't mark dead instructions' sources
live.") Nov 25 (and Cc'd you). Ken reviewed it, and I pushed it two
days ago as commit 48b4e88.
> * Matt commented also about a possible improvement in an example that allows
> evaluating at compile-time. As it is a different optimization, I'm not
> covering it on this patch, and rather letting it for a future improvement.
>
> * I commented about a wrong application of opt_vector_float() in an example Matt
> found. He told that probably it lacks resetting last_reg to -1. This patch is
> covering that error.
Excellent, thank you!
More information about the mesa-dev
mailing list